score:0


Q - Where is the variable specified correctly?
#include <iostream>

using namespace std;
void f() { 
   static int i; 
   
   ++i; 
   cout << i << " "; 
}

int main() { 
   f(); 
   f(); 
   f(); 
}
#include <iostream>

using namespace std;
int main() { 
   int i = 13, j = 60;
   
   i^=j;
   j^=i;
   i^=j;
   cout << i << " " << j;
}
Q - How can we make an class act as an interface in C++?
#include <iostream>

using namespace std;
int main() { 
   int x = 5;

   if(x==5) {	
      if(x==5) break;
      cout << "Hello";
   } 

   cout << "Hi"; 
}
Q - What is the output of the following program?

#include <iostream>

using namespace std;
int main() {
   char *s = "C++";
   
	cout << s << " ";
	s++;
	cout << s << " ";
}
Q - From the below class choose the proper definition of the member function f().

template 

class abc {
   void f();
};
 
#include <iostream>
using namespace std;
 
int main () {
   // local variable declaration:
   int x = 1;

   switch(x) {
   case 1 :
      cout  <<  "Hi!"  <<  endl; 
      break;
   default :
      cout  <<  "Hello!"  <<  endl;
   }
}
Q - An inline function can execute faster than a normal function.
Q - What is the output of the following program?

int main() {
}
Q - Choose the option not applicable for the constructor.
Q - What is the output of the following program?

#include <iostream>

using namespace std;
int main() { 

   int i = 1, j = 2, k = 3, r; 

   r = (i, j, k);

   cout << r << endl;

}
Q - Which type of data file is analogous to an audio cassette tape?
Q - Choose the invalid identifier from the below
Q - What is the size of the following union definition?

#include <iostream>

using namespace std;
int main() {
   union abc { 
      char a, b, c, d, e, f, g, h; 
      
      int i;
   };
   cout << sizeof(abc) << endl;
}
Q - Runtime polymorphism is done using.
Q - A trigraph character begins with
Q - Choose the pure virtual function definition from the following.
Q - What is the full form of RTTI.
Q - We can have varying number of arguments for the overloaded form of () operator.