Previous Questions and answers
Chapter 1 Review of C++ Programming

1.---------- operator is the arithmetic assignment operator. June 2017 Score 1
a. >> b. == c. += d. =



2. Which among the following is equivalent to the statement series b=a, a=a+1;
a. b+=a b. b=a++ c. b=++a d. b+=a+b March 2017 Score 1



3. Identity the following C++ tokens. June 2017 Score 2
(a)"welcome" (b) int (c) >= (d) ++



4. Rewrite the following C++ code using if...else statement      June 2018 Score 3
switch (choice) { case 1: cout<<"One"; break; case 0: cout<<"Zero"; break; default: cout<< "End” break; }




5. Write the output of the following code. Justify your answer.    June 2018 Score 3
          for(i=1;i<=5;++i)
               {
                 cout<<'\t'<<i;
                 if(i==3)
                      break;
               } 




6. Define Jump Statements. Explain about any two.		March 2018 Score 3 




7. Explain about nested loops.						March 2018 Score 3

 




8. What is tokens in C++.						March 2020 Score 2
 




9.Write the use of break statement in C++.						March 2020 Score 2
 




10. Rewrite the following code using for loop.						March 2020 Score 2
      sum=0;
      i=0;
      while(i<10)
        {
			sum=sum+i;
			i=i+1;
		}
	 cout<<"sum = "<<sum;		
 




11. What is entry-controlled loop in C++ ? Write the syntax of any one entry-controlled loop. March 2020 Score 3



11. The input operator in C++ is --------. March 2019 Score 1



13. List the type modifiers in C++. March 2019 Score 2



14. Rewrite the following code using for loop.	March 2019 Score 2
      int x=1;
      start:
         cout<<x;
         x=x+5;
         if(x<=50)
           goto start;         
     




15. Compare selection statements 'if' and 'switch'. March 2019 Score 3