What is the output of this program? 1.#include
2.#include
3.using namespace std;
4.int main()
5.{
6.cout << setprecision(17);
7.double d = 0.1;
8.cout << d << endl;
9.return 0;
10.}
Which of the following is/are advantages of cellular partitioned structure:
When a language has the capability to produce new data type mean, it can be called as
Which of the two operators ++ and — work for the bool datatype in C++?
Which is used to indicate single precision value?
In which type does the enumerators are stored by the compiler?
Value of a in a = (b = 5, b + 5); is
What is the output of this program? 1.#include
2.using namespace std;
3.int main ()
4.{
5.int numbers[5];
6.int * p;
7.p = numbers; *p = 10;
8.p++; *p = 20;
9.p = &numbers[2]; *p = 30;
10.p = numbers + 3; *p = 40;
11.p = numbers; *(p + 4) = 50;
12.for (int n = 0; n < 5; n++)
13. cout << numbers[n] << ",";
14. return 0;
15.}
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.int num1 = 10;
6.float num2 = 20;
7.cout << sizeof(num1 + num2);
8.return 0;
9.}
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);
When a language has the capability to produce new data type mean, it can be called as
How do we declare an abstract class?
What is the output of the following program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int num = 0x20 + 020 + 20;
6.cout << sizeof(num)<<'\n';
7.return 0;
8.}
Identify the user-defined types from the following?
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.}
When is std::bad_alloc exception thrown?
Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
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.}
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.}
Choose the correct option. extern int i;
int i;
STL is based on which of the following programming paradigms?
Inline functions are invoked at the time of
The value 132.54 can represented using which data type?
The statement i++; is equivalent to
Which of the following is not one of the sizes of the floating point types?
Which of the following is not recommended in a header file?
How do we declare an ‘interface’ class?
Identify the incorrect option.
Which of the following operators below allow to define the member functions of a class outside the class?
The default access level assigned to members of a class is ___________.
Which reference modifier is used to define reference variable?
Which of the following operator cannot be overloaded?
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
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.}
What is the index number of the last element of an array with 9 elements?