SlideShare a Scribd company logo
1 of 2
Bansilal Ramnath Agarwal Charitable Trust’s
               Vishwakarma Institute of Technology, Pune. 37

                    Principles of Programming Languages
                               CS 20105 – SE – E

                             Home Assignment 2

Assignment Date: 13th March 2012            Submission Date: 20th March 2012

Answer all 13 questions:

1. What are Imperative Languages? Is there any difference between Imperative
Languages and Procedural Languages?

2. What is meant by operator associativity and operator precedence? If x, y
and z have values 40, 4 and 10 respectively, what will be the values of x, y and
z after executing the following statement:

z+=(x>20 && x<=50)?x++:x/y;

3. What will be the output of following C code:

   #include <stdio.h>
   int main() {
         int i=1;
         if(!i)
                printf(“Hin”);
         else {
                i=0;
                printf(“Hellon”);
                main();
         }
         return 0;
   }




                                                                       Page 1 of 2
4. What will be the output of following C code:
#include <stdio.h>
int main() {
      int i=5;
      while (i<10);
      {
             printf(“%d “,i);
             i++;
      }
      printf(“%d”, i);
      return 0;
}

5. True or False? (for C language)
a. Whatever you can do using ‘for’ you can also do using ‘while’
b. Switch-Case always works for constant integer values
c. Size of a pointer to int is 2 bytes while size of a pointer to char is 1byte
d. Pointers in C are primitive types

6. What is the difference between a “strongly typed” language and a “weekly
typed” language?

7. When do you use “structures” and when do you use “union” in C? Explain
with examples.

8. If p is declared as a pointer to an integer, is there any difference between
*p++ and (*p)++?

9. What is a “reference” type in C++?

10. What is meant by “parameter passing”? What are some parameter passing
methods generally used?

11. What does an “Activation Record” contain?

12. What are generic templates in C++ and what is their use? Explain with an
example.

13. What are containers, algorithms and iterators in C++ STL? What are they
used for?

                                                                            Page 2 of 2

More Related Content

What's hot

What's hot (19)

What are monads?
What are monads?What are monads?
What are monads?
 
CP Handout#8
CP Handout#8CP Handout#8
CP Handout#8
 
CP Handout#9
CP Handout#9CP Handout#9
CP Handout#9
 
CP Handout#10
CP Handout#10CP Handout#10
CP Handout#10
 
Intro cpp
Intro cppIntro cpp
Intro cpp
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
 
Assignment
AssignmentAssignment
Assignment
 
C# programming datatypes
C# programming  datatypesC# programming  datatypes
C# programming datatypes
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
175035 cse lab 01
175035 cse lab 01175035 cse lab 01
175035 cse lab 01
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
Simple uml
Simple umlSimple uml
Simple uml
 
T02 a firstcprogram
T02 a firstcprogramT02 a firstcprogram
T02 a firstcprogram
 
Storage Class
Storage ClassStorage Class
Storage Class
 
Beginner C++ easy slide and simple definition with questions
Beginner C++ easy slide and simple definition with questions Beginner C++ easy slide and simple definition with questions
Beginner C++ easy slide and simple definition with questions
 
C++ problem solving
C++ problem solvingC++ problem solving
C++ problem solving
 
PHP Technical Question
PHP Technical QuestionPHP Technical Question
PHP Technical Question
 
Session 5-exersice
Session 5-exersiceSession 5-exersice
Session 5-exersice
 
C program report tips
C program report tipsC program report tips
C program report tips
 

Viewers also liked

Modulation techniq of modem
Modulation techniq of modemModulation techniq of modem
Modulation techniq of modemAkshay Nagpurkar
 
Microcontrollers and RT programming 3
Microcontrollers and RT programming 3Microcontrollers and RT programming 3
Microcontrollers and RT programming 3SSGMCE SHEGAON
 
Broadband availability in Rural Westmeath
Broadband availability in Rural WestmeathBroadband availability in Rural Westmeath
Broadband availability in Rural WestmeathSirshM
 
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel StudiosTunnel Studios
 
1era. Generación - Historia de la Computadora
1era. Generación - Historia de la Computadora1era. Generación - Historia de la Computadora
1era. Generación - Historia de la Computadoratecnologiasiguala
 
Novo marco regulatório da mineração
Novo marco regulatório da mineraçãoNovo marco regulatório da mineração
Novo marco regulatório da mineraçãoimeendo
 
The Me I See in 25 Years
The Me I See in 25 YearsThe Me I See in 25 Years
The Me I See in 25 Yearsmyeshadavis
 

Viewers also liked (20)

Modulation techniq of modem
Modulation techniq of modemModulation techniq of modem
Modulation techniq of modem
 
Microcontrollers and RT programming 3
Microcontrollers and RT programming 3Microcontrollers and RT programming 3
Microcontrollers and RT programming 3
 
Acf.cw.la1.s02.1
Acf.cw.la1.s02.1Acf.cw.la1.s02.1
Acf.cw.la1.s02.1
 
Acf.cw.la3.s07.1
Acf.cw.la3.s07.1Acf.cw.la3.s07.1
Acf.cw.la3.s07.1
 
7th sem syllabus
7th sem syllabus 7th sem syllabus
7th sem syllabus
 
Taxonomy card sort research summary
Taxonomy card sort research summaryTaxonomy card sort research summary
Taxonomy card sort research summary
 
1.network topology
1.network topology1.network topology
1.network topology
 
NCCET Sponsor - Ed2Go
NCCET Sponsor - Ed2GoNCCET Sponsor - Ed2Go
NCCET Sponsor - Ed2Go
 
Privilege levels 80386
Privilege levels 80386Privilege levels 80386
Privilege levels 80386
 
Broadband availability in Rural Westmeath
Broadband availability in Rural WestmeathBroadband availability in Rural Westmeath
Broadband availability in Rural Westmeath
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
hhhh
hhhhhhhh
hhhh
 
Fair shirt orders.
Fair shirt orders.Fair shirt orders.
Fair shirt orders.
 
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios
13/3/12 Pubblicità Italia /// Gemma di Mare in rete con Tunnel Studios
 
1era. Generación - Historia de la Computadora
1era. Generación - Historia de la Computadora1era. Generación - Historia de la Computadora
1era. Generación - Historia de la Computadora
 
Novo marco regulatório da mineração
Novo marco regulatório da mineraçãoNovo marco regulatório da mineração
Novo marco regulatório da mineração
 
Bizikidetza zuzenketa
Bizikidetza zuzenketaBizikidetza zuzenketa
Bizikidetza zuzenketa
 
Regeneracion29
Regeneracion29Regeneracion29
Regeneracion29
 
The Me I See in 25 Years
The Me I See in 25 YearsThe Me I See in 25 Years
The Me I See in 25 Years
 
Doc1
Doc1Doc1
Doc1
 

Similar to Ppl home assignment_unit2

the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxAnkitaVerma776806
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanationsrinath v
 
C++17 not your father’s c++
C++17  not your father’s c++C++17  not your father’s c++
C++17 not your father’s c++Patrick Viafore
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdfchoconyeuquy
 
Datastructure notes
Datastructure notesDatastructure notes
Datastructure notesSrikanth
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentalsZaibi Gondal
 
C prog ppt
C prog pptC prog ppt
C prog pptxinoe
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxKrishanPalSingh39
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing TutorialMahira Banu
 
Puzles C#
Puzles C#Puzles C#
Puzles C#lantoli
 

Similar to Ppl home assignment_unit2 (20)

Aptitute question papers in c
Aptitute question papers in cAptitute question papers in c
Aptitute question papers in c
 
the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptx
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanation
 
C++17 not your father’s c++
C++17  not your father’s c++C++17  not your father’s c++
C++17 not your father’s c++
 
Introductionof c
Introductionof cIntroductionof c
Introductionof c
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdf
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
Datastructure notes
Datastructure notesDatastructure notes
Datastructure notes
 
C Tutorials
C TutorialsC Tutorials
C Tutorials
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentals
 
C
CC
C
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptx
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing Tutorial
 
Puzles C#
Puzles C#Puzles C#
Puzles C#
 

More from Akshay Nagpurkar (20)

4.osi model
4.osi model4.osi model
4.osi model
 
L6 mecse ncc
L6 mecse nccL6 mecse ncc
L6 mecse ncc
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
1 ip address
1 ip address1 ip address
1 ip address
 
1.lan man wan
1.lan man wan1.lan man wan
1.lan man wan
 
Dcunit4 transmission media
Dcunit4 transmission mediaDcunit4 transmission media
Dcunit4 transmission media
 
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5Ppl for students unit 4 and 5
Ppl for students unit 4 and 5
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5Ppl for students unit 4 and 5
Ppl for students unit 4 and 5
 
234 rb trees2x2
234 rb trees2x2234 rb trees2x2
234 rb trees2x2
 
Ppl home assignment_unit4
Ppl home assignment_unit4Ppl home assignment_unit4
Ppl home assignment_unit4
 
Ppl home assignment_unit5
Ppl home assignment_unit5Ppl home assignment_unit5
Ppl home assignment_unit5
 
3 multiplexing-wdm
3 multiplexing-wdm3 multiplexing-wdm
3 multiplexing-wdm
 
2 multiplexing
2 multiplexing2 multiplexing
2 multiplexing
 
1 multiplexing
1 multiplexing1 multiplexing
1 multiplexing
 
Pcm pulse codemodulation-2
Pcm pulse codemodulation-2Pcm pulse codemodulation-2
Pcm pulse codemodulation-2
 
Ppl home assignment_unit3
Ppl home assignment_unit3Ppl home assignment_unit3
Ppl home assignment_unit3
 
Ppl home assignment_unit1
Ppl home assignment_unit1Ppl home assignment_unit1
Ppl home assignment_unit1
 
Ppl syllabus new
Ppl syllabus newPpl syllabus new
Ppl syllabus new
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Ppl home assignment_unit2

  • 1. Bansilal Ramnath Agarwal Charitable Trust’s Vishwakarma Institute of Technology, Pune. 37 Principles of Programming Languages CS 20105 – SE – E Home Assignment 2 Assignment Date: 13th March 2012 Submission Date: 20th March 2012 Answer all 13 questions: 1. What are Imperative Languages? Is there any difference between Imperative Languages and Procedural Languages? 2. What is meant by operator associativity and operator precedence? If x, y and z have values 40, 4 and 10 respectively, what will be the values of x, y and z after executing the following statement: z+=(x>20 && x<=50)?x++:x/y; 3. What will be the output of following C code: #include <stdio.h> int main() { int i=1; if(!i) printf(“Hin”); else { i=0; printf(“Hellon”); main(); } return 0; } Page 1 of 2
  • 2. 4. What will be the output of following C code: #include <stdio.h> int main() { int i=5; while (i<10); { printf(“%d “,i); i++; } printf(“%d”, i); return 0; } 5. True or False? (for C language) a. Whatever you can do using ‘for’ you can also do using ‘while’ b. Switch-Case always works for constant integer values c. Size of a pointer to int is 2 bytes while size of a pointer to char is 1byte d. Pointers in C are primitive types 6. What is the difference between a “strongly typed” language and a “weekly typed” language? 7. When do you use “structures” and when do you use “union” in C? Explain with examples. 8. If p is declared as a pointer to an integer, is there any difference between *p++ and (*p)++? 9. What is a “reference” type in C++? 10. What is meant by “parameter passing”? What are some parameter passing methods generally used? 11. What does an “Activation Record” contain? 12. What are generic templates in C++ and what is their use? Explain with an example. 13. What are containers, algorithms and iterators in C++ STL? What are they used for? Page 2 of 2