Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
Which of the following functions below can be used Allocate space for array in memory?
Which of these expressions will make the rightmost set bit zero in an input integer x?
Which of the following language feature is not an access specifier in C++?
Which of the following is a valid destructor of the class name “Country”
The return value of the following code is Class1& test(Class1 obj) Class1 *ptr = new Class1(); _________ return ptr;
If class A is friend of class B and if class B is friend of class C, which of the following is true?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int x = -1;
6.unsigned int y = 2;
7.if(x > y) {
8.cout << "x is greater";
9.} else {
10.cout << "y is greater";
11.}
12.}
The conditional compilation
The output of this program is int a = 10; void main(){ int a = 20; cout << a << ::a;}
What is the range of the floating point numbers?
Statement scanf(“%d”,80);
Which of the two operators ++ and — work for the bool datatype in C++?
How do we declare an ‘interface’ class?
Implementation dependent aspects about an implementation can be found in ____
Which of the two operators ++ and — work for the bool datatype in C++?
The value 132.54 can represented using which data type?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float i = 123.0f;
6.cout << i << endl;
7.return 0;
8.}
Which one of the following is not a valid reserved keyword in C++
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
Which of the following correctly describes C++ language?
Which type is best suited to represent the logical values?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int i;
6.char *arr[] = {"C", "C++", "Java", "VBA"};
7.char *(*ptr)[4] = &arr;
8.cout << ++(*ptr)[2];
9.return 0;
10.}
Which of three sizes of floating point types should be used when extended precision is required?
What does the following statement mean? void a;
Which of the following is a valid floating point literal?
What is the size of wchar_t in C++?
What does the following statement mean? int (*fp)(char*)
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}
What will be the output of this program? 1.#include
2.using namespace std;
3.int array1[] = {1200, 200, 2300, 1230, 1543};
4.int array2[] = {12, 14, 16, 18, 20};
5.int temp, result = 0;
6.int main()
7.{
8.for (temp = 0; temp < 5; temp++) {
9.result += array1[temp];
10.}
11.for (temp = 0; temp < 4; temp++) {
12.result += array2[temp];
13.}
14.cout << result;
15.return 0;
16.}
Which of the following operators can be overloaded?
Regarding following statement which of the statements is true? const int a = 100;
When a language has the capability to produce new data type mean, it can be called as
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.}
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.}
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.}
Which of the following is not a valid conditional inclusions in preprocessor directives