How to declare a wide character in the string literal?
Answer: A
It can turn this as the wide character instead of narrow characters.
The difference between x and ‘x’ is?
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.
Regarding the following statement which of the statements is true?
const int a = 100;
Answer: C
Because the const is used to declare non-changeable values only.
Which of the following statement is not true about preprocessor directives?
Answer: D
No terminating character required for preprocessor directives statements
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.