Constants/Literals
- How to declare a wide character in the string literal?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
It can turn this as the wide character instead of narrow characters.
- The difference between P and ‘P’ is
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The first one refers to a variable whose identifier is P and the second one refers to the character constant P
- Regarding the following statement which of the statements is true?
const int num = 20;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Because the const is used to declare non-changeable values only.
- Which of the following statement is not true about preprocessor directives?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
They end with a semicolon
- What is the output of this program?
#include
using namespace std;
#define PI 3.14159
int main ()
{
float radious = 10;
float Circle;
Circle = 2 * PI * radious;
cout << Circle;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
In this program, we are finding the area of the circle by using concern formula.