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