SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
1. Show assembly language corresponding to the following C++ statement: while (x<=10) {
S=S+x; x++; }
2. Show the difference between compiler output and interpreter output for the following source
input: A = 25; B = -25; if (A>B) cout<
3. Show the lexical tokens corresponding to the following C++ source input: if (x>=16.5) x=x*.1;
else cout<
4. Show the sequence of atoms put out by the parser, and show the syntax tree corresponding to
the following C++ source input: S = A + C D * S - D / S;
5. Show, in assembly language for a machine of your choice, the output of the code generator for
the following atom string: (SUB,X,Y,Temp1) (ADD,W,Z,Temp2) (TEST,Temp1,>,Temp2,L1)
(JUMP,L2) (LBL,L1) (MOVE,X,Y) (JUMP,L3) (LBL,L2) (MOVE,Y,X) (LBL,L3)
6. If the only computer you have is a Mac (for which you already have a C++ compiler), show how
you can produce a C++ compiler for the SUN computer, without writing any assembly or machine
language.
. Show how Ada compiler can be bootstrapped in two steps on a PC computer

Weitere ähnliche Inhalte

Ähnlich wie 1 Show assembly language corresponding to the following C++.pdf

Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its function
Frankie Jones
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
HebaEng
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
Romain Francois
 
Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computer
Martial Kouadio
 

Ähnlich wie 1 Show assembly language corresponding to the following C++.pdf (20)

Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its function
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
Perm winter school 2014.01.31
Perm winter school 2014.01.31Perm winter school 2014.01.31
Perm winter school 2014.01.31
 
Lex and Yacc ppt
Lex and Yacc pptLex and Yacc ppt
Lex and Yacc ppt
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
 
CH06 (1).PPT
CH06 (1).PPTCH06 (1).PPT
CH06 (1).PPT
 
Ch04
Ch04Ch04
Ch04
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
 
Al2ed chapter17
Al2ed chapter17Al2ed chapter17
Al2ed chapter17
 
Faster Python, FOSDEM
Faster Python, FOSDEMFaster Python, FOSDEM
Faster Python, FOSDEM
 
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurProblem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
 
BeepBeep 3: A declarative event stream query engine (EDOC 2015)
BeepBeep 3: A declarative event stream query engine (EDOC 2015)BeepBeep 3: A declarative event stream query engine (EDOC 2015)
BeepBeep 3: A declarative event stream query engine (EDOC 2015)
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
Seminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mmeSeminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mme
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917
 
Foxpro (1)
Foxpro (1)Foxpro (1)
Foxpro (1)
 
Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computer
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 

Mehr von amir421526

1 The upper level of the informatics stack Focuses on in.pdf
1 The upper level of the informatics stack Focuses on in.pdf1 The upper level of the informatics stack Focuses on in.pdf
1 The upper level of the informatics stack Focuses on in.pdf
amir421526
 
1 The proton motive force PMF generated by the electron t.pdf
1 The proton motive force PMF generated by the electron t.pdf1 The proton motive force PMF generated by the electron t.pdf
1 The proton motive force PMF generated by the electron t.pdf
amir421526
 
1 The Great Wars In a land far far away there lived a mig.pdf
1 The Great Wars In a land far far away there lived a mig.pdf1 The Great Wars In a land far far away there lived a mig.pdf
1 The Great Wars In a land far far away there lived a mig.pdf
amir421526
 

Mehr von amir421526 (20)

1 Trkiye esnek bir kur rejimine sahiptir Geniletici bir m.pdf
1 Trkiye esnek bir kur rejimine sahiptir Geniletici bir m.pdf1 Trkiye esnek bir kur rejimine sahiptir Geniletici bir m.pdf
1 Trkiye esnek bir kur rejimine sahiptir Geniletici bir m.pdf
 
1 True or False Magma and Lava are both Melted Rock the.pdf
1 True or False Magma and Lava are both Melted Rock the.pdf1 True or False Magma and Lava are both Melted Rock the.pdf
1 True or False Magma and Lava are both Melted Rock the.pdf
 
1 Transaction management deals with the problems of always .pdf
1 Transaction management deals with the problems of always .pdf1 Transaction management deals with the problems of always .pdf
1 Transaction management deals with the problems of always .pdf
 
1 To what extent do you think people choose their own heal.pdf
1 To what extent do you think people choose their own heal.pdf1 To what extent do you think people choose their own heal.pdf
1 To what extent do you think people choose their own heal.pdf
 
1 three additional features EmployeeID int salary as d.pdf
1 three additional features EmployeeID int salary as d.pdf1 three additional features EmployeeID int salary as d.pdf
1 three additional features EmployeeID int salary as d.pdf
 
1 Tiene sentido que Spanish Vines considere ingresar al me.pdf
1 Tiene sentido que Spanish Vines considere ingresar al me.pdf1 Tiene sentido que Spanish Vines considere ingresar al me.pdf
1 Tiene sentido que Spanish Vines considere ingresar al me.pdf
 
1 The upper level of the informatics stack Focuses on in.pdf
1 The upper level of the informatics stack Focuses on in.pdf1 The upper level of the informatics stack Focuses on in.pdf
1 The upper level of the informatics stack Focuses on in.pdf
 
1 The table below is the data for an economy 4 Marks ITE.pdf
1 The table below is the data for an economy 4 Marks ITE.pdf1 The table below is the data for an economy 4 Marks ITE.pdf
1 The table below is the data for an economy 4 Marks ITE.pdf
 
1 The Successiveapproximation converter has a longer conve.pdf
1 The Successiveapproximation converter has a longer conve.pdf1 The Successiveapproximation converter has a longer conve.pdf
1 The Successiveapproximation converter has a longer conve.pdf
 
1 The skin is made up of the and the 2 convey sensations w.pdf
1 The skin is made up of the and the 2 convey sensations w.pdf1 The skin is made up of the and the 2 convey sensations w.pdf
1 The skin is made up of the and the 2 convey sensations w.pdf
 
1 The proton motive force PMF generated by the electron t.pdf
1 The proton motive force PMF generated by the electron t.pdf1 The proton motive force PMF generated by the electron t.pdf
1 The proton motive force PMF generated by the electron t.pdf
 
1 The prebabiity that both bults are red is 2 The erobasic.pdf
1 The prebabiity that both bults are red is 2 The erobasic.pdf1 The prebabiity that both bults are red is 2 The erobasic.pdf
1 The prebabiity that both bults are red is 2 The erobasic.pdf
 
1 The production possibilities frontier I Suppose Japan pro.pdf
1 The production possibilities frontier I Suppose Japan pro.pdf1 The production possibilities frontier I Suppose Japan pro.pdf
1 The production possibilities frontier I Suppose Japan pro.pdf
 
1 The patient a 12yearold boy shows several areas of to.pdf
1 The patient a 12yearold boy shows several areas of to.pdf1 The patient a 12yearold boy shows several areas of to.pdf
1 The patient a 12yearold boy shows several areas of to.pdf
 
1 The Port of Prince Rupert is BCs second largest port an.pdf
1 The Port of Prince Rupert is BCs second largest port an.pdf1 The Port of Prince Rupert is BCs second largest port an.pdf
1 The Port of Prince Rupert is BCs second largest port an.pdf
 
1 The paternal age appears to play an important role on the.pdf
1 The paternal age appears to play an important role on the.pdf1 The paternal age appears to play an important role on the.pdf
1 The paternal age appears to play an important role on the.pdf
 
1 The meteorological Department has issued a statement ment.pdf
1 The meteorological Department has issued a statement ment.pdf1 The meteorological Department has issued a statement ment.pdf
1 The meteorological Department has issued a statement ment.pdf
 
1 The idea underlying _____ is that satisfaction results fr.pdf
1 The idea underlying _____ is that satisfaction results fr.pdf1 The idea underlying _____ is that satisfaction results fr.pdf
1 The idea underlying _____ is that satisfaction results fr.pdf
 
1 The GI tract from esophagus to anus is composed of four t.pdf
1 The GI tract from esophagus to anus is composed of four t.pdf1 The GI tract from esophagus to anus is composed of four t.pdf
1 The GI tract from esophagus to anus is composed of four t.pdf
 
1 The Great Wars In a land far far away there lived a mig.pdf
1 The Great Wars In a land far far away there lived a mig.pdf1 The Great Wars In a land far far away there lived a mig.pdf
1 The Great Wars In a land far far away there lived a mig.pdf
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

1 Show assembly language corresponding to the following C++.pdf

  • 1. 1. Show assembly language corresponding to the following C++ statement: while (x<=10) { S=S+x; x++; } 2. Show the difference between compiler output and interpreter output for the following source input: A = 25; B = -25; if (A>B) cout< 3. Show the lexical tokens corresponding to the following C++ source input: if (x>=16.5) x=x*.1; else cout< 4. Show the sequence of atoms put out by the parser, and show the syntax tree corresponding to the following C++ source input: S = A + C D * S - D / S; 5. Show, in assembly language for a machine of your choice, the output of the code generator for the following atom string: (SUB,X,Y,Temp1) (ADD,W,Z,Temp2) (TEST,Temp1,>,Temp2,L1) (JUMP,L2) (LBL,L1) (MOVE,X,Y) (JUMP,L3) (LBL,L2) (MOVE,Y,X) (LBL,L3) 6. If the only computer you have is a Mac (for which you already have a C++ compiler), show how you can produce a C++ compiler for the SUN computer, without writing any assembly or machine language. . Show how Ada compiler can be bootstrapped in two steps on a PC computer