51. What is std in C++?
52. What is dynamic binding?
53. What happens if the following line is executed in C and C++?
const int a;
const int a;
54. 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;
}
#include<stdio.h>
struct STRUCT
{
int a = 5;
int func()
{
printf("%d\n", a);
}
};
int main()
{
struct STRUCT s;
s.func();
return 0;
}
55. 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;
}
#include<iostream>
using namespace std;
class A
{
~A(){
cout<<"Destructor called\n";
}
};
int main()
{
A *a1 = new A();
A *a2 = new A();
return 0;
}
56. Which of the following is called extraction/get from operator?
57. Which of the following is called address operator?
58. What is name mangling in C++?
59. What is the size of a boolean variable in C++?
60. What is the size of a character literal in C and C++?
Read More Section(Introduction to C plus plus)
Each Section contains maximum 100 MCQs question on Introduction to C plus plus. To get more questions visit other sections.