Wednesday 18 June 2014

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON C++ -- SET 2


 TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON C++
 -- SET 2 --


 1. The following C++ code results in

#include "iostream.h"
void main(void)
{
cout<<(int i = 5)<<(int j=6);
}

(a)  compilation error                          (b) run time error

(c) link time error                               (d)  none of the above




2.  Reusability is a desirable feature of a language as it

(a)  decrease the testing time                   (b) lowers the maintence cost

(c)  reduces the compilation time             (d) reduces the execution time



3. Choose the correct statements regarding inline functions.

(a)  It speeds up execution                      (b)  It slows down execution

(c)  It increases the code size                  (d)  It decreases the code size





4.  The statements

int a = 5;

cout<<"FIRST"<<(a<<2)<<"SECOND";

outputs

(a)  FIRST52SECOND                          (b)  FIRST20SECOND

(c)  SECOND25FIRST                           (d) an error message




5. Choose the corrects remarks

(a)  C++ allows any operato to be overloaded.

(b)  Some of the existing cannot be overloaded.

(c)  Operators precedence  cannot be changed.

(d) All of the above.










No comments:

Post a Comment