Can two functions declare variables(non static) with the same name.
There is nothing like a virtual constructor of a class.
Which of the following is not recommended in a header file?
How the constants are declared?
Which looping process checks the test condition at the end of the loop?
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 is the output of this program? 1.#include
2.using namespace std;
3.enum test {
4.A = 32, B, C
5.};
6.int main()
7.{
8.cout << A << B<< C;
9.return 0;
10.}
The data elements in structure are also known as what?
Identify the correct sentence regarding inequality between reference and pointer.
What is the output of this program? 1.#include
2.using namespace std;
3.#define PI 3.14159
4.int main ()
5.{
6.float r = 2;
7.float circle;
8.circle = 2 * PI * r;
9.cout << circle;
10.return 0;
11.}
Implementation dependent aspects about an implementation can be found in ____
Which of the following is true about const member functions?
The two types of file structure existing in VSAM file are
Which of three sizes of floating point types should be used when extended precision is required?
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;
8.return 0;
.}
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int const p = 5;
6.cout << ++p;
7.return 0;
8.}
Which of the following is a valid floating point literal?
Which is used to indicate single precision value?
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 *p;
6.void *vp;
7.if (vp == p);
8.cout << "equal";
9.return 0;
10.}
The difference between x and ‘x’ is
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int array[] = {10, 20, 30};
6.cout << -2[array];
7.return 0;
8.}
Identify the incorrect statement
Which of the following is not true about preprocessor directives
Pick the right option Statement 1:A definition is also a declaration.
Statement 2:An identifier can be declared just once.
Which of the following correctly describes the meaning of‘namespace’ feature in C++?
Minimum number of temporary variable needed to swap the contents of 2 variables is:
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.}
In a C language ‘3’ represents
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);
To which of these enumerators can be assigned?
Which one of the following is not a valid reserved keyword in C++
Which of the following accesses the seventh element stored in array?
Which one of the following is not a fundamental data type in C++
What is the value of the following 8-bit integer after all statements are executed?
int x = 1;
x = x << 7;
x = x >> 7;