What is the purpose of the 'break' statement in a loop in C++?
Select an option to see the answer and solution.
What is the correct way to define a constant named 'PI' with a value of 3.14159 in C++?
Select an option to see the answer and solution.
What is the output of the following code: cout << (10 % 3); in C++?
Select an option to see the answer and solution.
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;
}
Select an option to see the answer and solution.
What happens if a class does not have a name?
Select an option to see the answer and solution.
Which of the following escape sequence represents carriage return?
Select an option to see the answer and solution.
What are the formal parameters in C++?
Select an option to see the answer and solution.
Which of the following is a static polymorphism mechanism?
Select an option to see the answer and solution.
What if we define the below structure in C and C++?
Select an option to see the answer and solution.
Which of the following is true?
I. All operators in C++ can be overloaded.
II. The basic meaning of an operator can be changed.
Select an option to see the answer and solution.
What is std in C++?
Select an option to see the answer and solution.
What is dynamic binding?
Select an option to see the answer and solution.
What happens if the following line is executed in C and C++?
const int a;
Select an option to see the answer and solution.
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;
}
Select an option to see the answer and solution.
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;
}
Select an option to see the answer and solution.
Which of the following is called extraction/get from operator?
Select an option to see the answer and solution.
Which of the following is called address operator?
Select an option to see the answer and solution.
What is name mangling in C++?
Select an option to see the answer and solution.
What is the size of a boolean variable in C++?
Select an option to see the answer and solution.
What is the size of a character literal in C and C++?
Select an option to see the answer and solution.