81. What is static binding?
82. What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int x[100];
int main()
{
cout << x[99] << endl;
}
#include<iostream>
using namespace std;
int x[100];
int main()
{
cout << x[99] << endl;
}
83. Which of the following is accessed by a member function of a class?
84. Which of the following type is provided by C++ but not C?
85. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class A
{
private:
int x;
public:
A(int _x) { x = _x; }
int get() { return x; }
};
class B
{
static A a;
public:
static int get()
{ return a.get(); }
};
int main(void)
{
B b;
cout << b.get();
return 0;
}
#include <iostream>
using namespace std;
class A
{
private:
int x;
public:
A(int _x) { x = _x; }
int get() { return x; }
};
class B
{
static A a;
public:
static int get()
{ return a.get(); }
};
int main(void)
{
B b;
cout << b.get();
return 0;
}
86. What is the other name of compile-time polymorphism?
87. What is the size of a character type in C and C++?
88. Which of the following is the correct difference between cin and scanf()?
89. Which of the following is not a type of inheritance?
90. Which of the following is used for comments in 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.