41. What is the purpose of the 'break' statement in a loop in C++?
42. What is the correct way to define a constant named 'PI' with a value of 3.14159 in C++?
43. What is the output of the following code: cout << (10 % 3); in C++?
44. What will be the output of the following program in both C and C++?
#include<stdio.h>
int main(int argc, char const *argv[])
{
printf("%d\n", (int)sizeof('a'));
return 0;
}
#include<stdio.h>
int main(int argc, char const *argv[])
{
printf("%d\n", (int)sizeof('a'));
return 0;
}
45. What happens if a class does not have a name?
46. Which of the following escape sequence represents carriage return?
47. What are the formal parameters in C++?
48. Which of the following is a static polymorphism mechanism?
49. What if we define the below structure in C and C++?
50. Which of the following is true?
I. All operators in C++ can be overloaded.
II. The basic meaning of an operator can be changed.
I. All operators in C++ can be overloaded.
II. The basic meaning of an operator can be changed.
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.