What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float f1 = 0.5;
6.double f2 = 0.5;
7.if(f1 == 0.5f)
8.cout << "equal";
9.else
10.cout << "not equal";
11.return 0;
12.}
How do we define a constructor?
Which of the following statements are false?
Which looping process checks the test condition at the end of the loop?
The value 132.54 can represented using which data type?
What is the output of this program? 1.#include
2.int main()
3.{
4.char a = '\012';
5. printf("%d", a);
6.return 0;
7.}
Void pointer can point to which type of objects?
What will happen when the structure is declared?
Which of the following belongs to the set of character types?
STL is based on which of the following programming paradigms?
What is the value of p? 1.#include 2.
3.using namespace std;
4.int main()
5.{
6.int p;
7.bool a = true;
8.bool b = false;
9.int x = 10;
10.int y = 5;
11.p = ((x | y) + (a + b));
12.cout << p;
13.return 0;
14.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int arr[] = {4, 5, 6, 7};
6.int *p = (arr + 1);
7.cout << *arr + 9;
8.return 0;
9.}
What is the output of this program? 1.include
2.using namespace std;
3.int g = 100;
4.int main()
5.{
6.int a;
7.{
8.int b;
9.b = 20;
10.a = 35;
11.g = 65;
12.cout << b << a << g;
13.}
14.a = 50;
15.cout << a << g;
16.return 0;
17.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5, b = 10, c = 15;
6.int arr[3] = {&a, &b, &c};
7.cout << *arr[*arr[1] - 8];
8.return 0;
9.}
Which of the following is the most general exception handler that catches exception of any type?
Which of the two operators ++ and — work for the bool datatype in C++?
What will be the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 8;
6.cout << "ANDing integer 'a' with 'true' :" << a && true;
7.return 0;
8.}
What are the parts of the literal constants?
What is the Difference between struct and class in terms of Access Modifier?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 10;
6.if (a < 10) {
7.for (i = 0; i < 10; i++)
8.cout << i;
9.}
10.else {
11.cout << i;
12.}
13.return 0;
14.}
Which of the following statements are false?
What is the output of this program? 1.include
2.using namespace std;
3.int main()
4.{
5.int a = 9;
6.int & aref = a;
7.a++;
8.cout << "The value of a is " << aref;
9.return 0;
10.}
The output of this program is int a = 10; void main(){ int a = 20; cout << a << ::a;}
Which one of the following is not a valid reserved keyword in C++
What is the value of the bool? bool is_int(789.54)
Which of the following is a valid destructor of the class name “Country”
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int num1 = 10;
6.float num2 = 20;
7.cout << sizeof(num1 + num2);
8.return 0;
9.}
Which of the following relationship is known as inheritancerelationship?
What is the output of this program? 1.#include
2.using namespace std;
3.enum colour {
4.green, red, blue, white, yellow, pink
5.};
6.int main()
7.{
8.cout << green<< red<< blue<< white<< yellow<< pink;
9.return 0;
10}
What is the output of this program?
1.#include
2.using namespace std;
3.int main()
4.{
5.int n = 5;
6.void *p = &n;
7.int *pi = static_cast(p);
8.cout << *pi << endl;
9.return 0;
10.}
Which of these expressions will return true if the input integer v is a power of two?
Which of the following is/are advantages of cellular partitioned structure:
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
Which of the two operators ++ and — work for the bool datatype in C++?
Which of the following gives the memory address of the first element in array?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int num = 0x20 + 020 + 20;
6.cout << sizeof(num)<<'\n';
7.return 0;
8.}
What happens when a pointer is deleted twice?
Is the size of character literals different in C and C++?