If class A is friend of class B and if class B is friend of class C, which of the following is true?
What will be output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i = 3;
6.int l = i / -2;
7.int k = i % -2;
8.cout << l << k;
9.return 0;
10.}
What will be used when terminating a structure?
What is the output of this program? 1.#include
2.#include
3.using namespace std;
4.int main()
5.{
6.cout << setprecision(17);
7.double d = 0.1;
8.cout << d << endl;
9.return 0;
10.}
What is the value of p? 1.#include 2.
3.using namespace std;
4.int main()
5.{
6.int p;
7.bool a = true;
8.bool b = false;
9.int x = 10;
10.int y = 5;
11.p = ((x | y) + (a + b));
12.cout << p;
13.return 0;
14.}
In a C language ‘3’ represents
The constants are also called as
Which of the following statements are true? int f(float)
Identify the correct sentence regarding inequality between reference and pointer.
In a group of nested loops, which loop is executed the most number of times?
Which of the following keyword supports dynamic method resolution?
What is the output of this program? 1.#include
2.using namespace std;
3.enum cat {
4.temp = 7
5.};
6.int main()
7.{
8.int age = 14;
9.age /= temp;
10.cout << "If you were cat, you would be " << age << endl;
11.return 0;
12.}
Choose the incorrect option
Which of the two operators ++ and — work for the bool datatype in C++?
What does the following statement mean? int (*fp)(char*)
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.char *ptr;
6.char Str[] = "abcdefg";
7.ptr = Str;
8.ptr += 5;
9.cout << ptr;
10.return 0;
11.}
Which one of the following is not a possible state for a pointer.
Is bool a fundamental datatype in C++?
What is the output of this program? 1.#include
2.using namespace std;
3.#define PI 3.14159
4.int main ()
5.{
6.float r = 2;
7.float circle;
8.circle = 2 * PI * r;
9.cout << circle;
10.return 0;
11.}
Observe following program and answer 100 class Example{public: int a,b,c; Example(){a=b=c=1;} //Constructor 1 Example(int a){a = a; b = c = 1;} //Constructor 2 Example(int a,int b){a = a; b = b; c = 1;} //Constructor 3 Example(int a,int b,int c){ a = a; b = b; c = c;} //Constructor 4 } In the above example of constructor overloading, the following statement will call which constructor Example obj = new Example (1,2,3);
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5, b = 10, c = 15;
6.int *arr[ ] = {&a, &b, &c};
7.cout << arr[1];
8.return 0;
9.}
The output of this program is int a = 10; void main(){ int a = 20; cout << a << ::a;}
What’s wrong? while( (i < 10) && (i > 24))
Each pass through a loop is called a/an
Evaluate the following (false && true) || false || true
C++ provides facility to specify that the compiler should match function calls with the correct definition at the run time. This process is called as
Which of the following operator cannot be overloaded?
Identify the incorrect option.
Which variable does equals in size with enum variable?
How to declare a wide character in string literal?
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
What is the implicit pointer that is passed as the first argument for nonstatic member functions?
Which of the following is a valid destructor of the class name “Country”
What does a escape code represent?
Which is used to indicate single precision value?
Which of the following below can perform conversions between pointers to related classes?