Top

C Constants

1.

How to declare a wide character in the string literal?

Answer: A

It can turn this as the wide character instead of narrow characters.

Enter details here

Answer: A

In a C++ code, names with quotes like ‘x’ represent a character or string(in case of a collection of characters) whereas without quotes they represent an identifier.

Enter details here

Answer: C

Because the const is used to declare non-changeable values only.

Enter details here

Answer: D

No terminating character required for preprocessor directives statements

Enter details here

5.

What will be the output of the following C++ code?

#include 
    using namespace std;
    int main()
    {
        int  const  p = 5;
        cout << ++p;
        return 0;
    }

 

Answer: C

We cannot modify a constant integer value.

Enter details here

Loading…