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

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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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