Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C++ code? #include <iostream> int main(int argc, char const *argv[]) { cout<<"Hello World"; return 0; }
Q2
Which concept is used to implement late binding?
Q3
What will be the output of the following C++ code? #include <iostream> int const s=9; int main() { std::cout << s; return 0; }
Q4
Which of the following is an entry-controlled loop?
Q5
Why this pointer is used?
Q6
What is name mangling in C++?
Q7
What happens if the following line is executed in C and C++? const int a;
Q8
What is the size of a character literal in C and C++?
Q9
Which of the following is called extraction/get from operator?
Q10
Which of the following syntax can be used to use a member of a namespace without including that namespace?
Q11
What is the size of a boolean variable in C++?
Q12
Which of the following is the scope resolution operator?
Q13
Which of the following is called address operator?
Q14
Which of the following is correct about static polymorphism?
Q15
What happens if the following program is executed in C and C++? #include <stdio.h> void main() { printf("Hello World"); }
Q16
What happens if we run the following code in both C and C++? #include<stdio.h> struct STRUCT { int a = 5; int func() { printf("%d\n", a); } }; int main() { struct STRUCT s; s.func(); return 0; }
Q18
Which of the following is correct about static variables?
Q19
What is dynamic binding?
Q21
Which of the following is correct?
Q22
What will be the output of the following C++ code? #include<iostream> using namespace std; class A { ~A(){ cout<<"Destructor called\n"; } }; int main() { A *a1 = new A(); A *a2 = new A(); return 0; }
Q23
What will be the output of the following C++ code? #include<iostream> using namespace std; class A { ~A(){ cout<<"Destructor called\n"; } }; int main() { A a; return 0; }
Q24
What happens if the following program is executed in C and C++? #include <stdio.h> int main(void) { int new = 5; printf("%d", new); }
Q25
Which of the following cannot be used with the virtual keyword?