Which variable does equals in size with enum variable?
‘Prime area’ in context of file system is defined as
What would be the output of the following program (in 32-bit systems)? 1.#include
2.using namespace std;
3.int main()
4.{
5.cout << sizeof(char);
6.cout << sizeof(int);
7.cout << sizeof(float);
8.return 0;
9.}
Identify the incorrect option.
Observe following program and answer 100 class Example{public: int a,b,c; Example(){a=b=c=1;} //Constructor 1 Example(int a){a = a; b = c = 1;} //Constructor 2 Example(int a,int b){a = a; b = b; c = 1;} //Constructor 3 Example(int a,int b,int c){ a = a; b = b; c = c;} //Constructor 4 } In the above example of constructor overloading, the following statement will call which constructor Example obj = new Example (1,2,3);
*ptr++ is equivalenet to:
Which is used to indicate single precision value?
Which of the following functions below can be used Allocate space for array in memory?
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.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.void a = 10, b = 10;
6.int c;
7.c = a + b;
8.cout << c;
9.return 0;
10.}
Which of the following belongs to the set of character types?
What’s wrong? for (int k = 2, k <=12, k++)
How do we define a constructor?
Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
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.int main()
3.{
4.char a = '\012';
5. printf("%d", a);
6.return 0;
7.}
How do we represent a wide character of the form wchar_t?
How the constants are declared?
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.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
6.cout << *(a[1] + 2) << *(*(a + 1) + 2) << 7.2[1[a]];
7.return 0;
8.}
Is bool a fundamental datatype in C++?
What is the difference between overloaded functions and overridden functions?
What is the output of this program? 1.#include
2.using namespace std;
3.void addprint()
4.{
5.static int s = 1;
6.s++;
7.cout << s;
8.}
9.int main()
10.{
11.addprint();
12.addprint();
13.addprint();
14.return 0;
15}
A continue statement causes execution to skip to
Value of ix+j, if i,j are integer type and ix long type would be
Identify the incorrect option.
Which of the following is not true about preprocessor directives
What happens when a null pointer is converted into bool?
Which looping process is best used when the number of iterations is known?
Can two functions declare variables(non static) with the same name.
The size of an object or a type can be determined using which operator?
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.}
Which of these expressions will isolate the rightmost set bit?
Originally ‘C’ was developed as:
Evaluate the following (false && true) || false || true
The difference between x and ‘x’ is