The size of an object or a type can be determined using which operator?
What will be output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i = 3;
6.int l = i / -2;
7.int k = i % -2;
8.cout << l << k;
9.return 0;
10.}
What will be output of this function? 1.int main()
2.{
3.register int i = 1;
4.int *ptr = &i;
5.cout << *ptr;
6.return 0;
7.}
Which type is best suited to represent the logical values?
Can two functions declare variables(non static) with the same name.
Which of the following languages is a subset of C++ language?
Choose the correct option. extern int i;
int i;
Which of the following below is /are a valid iterator type?
What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
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 Difference between struct and class in terms of Access Modifier?
Which of the following language is not supported by C++?
Which datatype is used to represent the absence of parameters?
Which of the following is not a valid conditional inclusions in preprocessor directives
Class derived: public base1, public base2 { } is an example of
Which of the following belongs to the set of character types?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5;
6.float b;
7.cout << sizeof(++a + b);
8.cout << a;
9.return 0;
10.}
What is the output of this program? 1.#include
2.using namespace std;
3.void swap(int &a, int &b);
4.int main()
5.{
6.int a = 5, b = 10;
7.swap(a, b);
8.cout << "In main " << a << b;
9.return 0;
10.}
11.void swap(int &a, int &b)
12.{
13.int temp;
14.temp = a;
15.a = b;
16.b = temp;
17.cout << "In swap " << a << b;
18.}
What are the parts of the literal constants?
Which of the following correctly declares an array?
Which of the following is true about const member functions?
In C++, what is the sign of character data type by default?
Which of the following is not a valid conditional inclusions in preprocessor directives
Which of the following will not return a value?
The default access level assigned to members of a class is ___________.
Which of the following is not a file operation:
What is the output of this program? 1.#include
2.using namespace std;
3.enum cat {
4.temp = 7
5.};
6.int main()
7.{
8.int age = 14;
9.age /= temp;
10.cout << "If you were cat, you would be " << age << endl;
11.return 0;
12.}
What is the output of this program?
1.#include
2.using namespace std;
3.int main()
4.{
5.int *p;
6.void *vp;
7.if (vp == p);
8.cout << "equal";
9.return 0;
10.}
Which of the following is not one of the sizes of the floating point types?
Regarding following statement which of the statements is true? const int a = 100;
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float num1 = 1.1;
6.double num2 = 1.1;
7.if(num1 == num2)
8.cout << "stanford";
9.else
10.cout << "harvard";
11.return 0;
12.}
Which variable does equals in size with enum variable?
Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
The difference between x and ‘x’ is
Each pass through a loop is called a/an
What will happen when the structure is declared?