What will be the output of the this program? 1.#include
2.using namespace std;
3.int main ()
4.{
5.int array[] = {0, 2, 4, 6, 7, 5, 3};
6.int n, result = 0;
7.for (n = 0; n < 8; n++) {
8.result += array[n];
9.}
10.cout << result;
11.return 0;
12.}
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 type of the variables. typedef char* CHAR;. CHAR p,q;
Value of ix+j, if i,j are integer type and ix long type would be
Select the right option: Given the variables p, q are of char type and r, s, t are of int type (1) t = (r * s) / (r + s); (2) t = (p * q) / (r + s);
Void pointer can point to which type of objects?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.char str[5] = "ABC";
6.cout << str[3];
7.cout << str;
8.return 0;
9.}
What will be the output of this program? 1.#include
2.using namespace std;
3. int main()
4.{
5.char c = 74;
6.cout << c;
7.return 0;
8.}
What happens when a pointer is deleted twice?
If a member needs to have unique value for all the objects of that same class, declare the member as
What is the value of the following 8-bit integer after all statements are executed?
int x = 1;
x = x << 7;
x = x >> 7;
Which one of the following is not a possible state for a pointer.
Which value we cannot assign to reference?
When a language has the capability to produce new data type mean, it can be called as
Which datatype is used to represent the absence of parameters?
When is std::bad_alloc exception thrown?
Identify the incorrect statement
Identify the user-defined types from the following?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main ( )
4.{
5.static double i;
6.i = 20;
7.cout << sizeof(i);
8.return 0;
9.}
Which of the following keyword supports dynamic method resolution?
‘Prime area’ in context of file system is defined as
Which of the following below can perform conversions between pointers to related classes?
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 = 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.int a = 9;
6.int & aref = a;
7.a++;
8.cout << "The value of a is " << aref;
9.return 0;
10.}
Identify the user-defined types from the following?
What is size of generic pointer in C++ (in 32-bit platform) ?
What is the index number of the last element of an array with 9 elements?
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 operators can be implemented as a nonmember operator?
STL is based on which of the following programming paradigms?
Statement scanf(“%d”,80);
What constant defined in header returns the number of bits in a char?
Which of the following accesses the seventh element stored in array?
Under which of the following circumstances, synchronization takes place?
What is the difference between overloaded functions and overridden functions?
Which of these expressions will return true if the input integer v is a power of two?
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