Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What symbol is used to state the beginning and the end of blocks of code ?
Correct Answer is : { and }
2. Which of the following is the boolean operator for logical-and?
Correct Answer is : &&
3. Which of the following shows the correct syntax for an if statement?
Correct Answer is : If (expression)
4. What is the correct value to return to the operating system upon the successful completion of a program?
Correct Answer is : 0
5. Evaluate !(1 && !(0 || 1)).
Correct Answer is : TRUE
6. What is the size of wchar_t in C++?
Correct Answer is : Based on the number of bits in the system
7. Pick the odd one out
Correct Answer is : array type
8. Which data type is used to represent the absence of parameters?
Correct Answer is : void
9. What does ‘\a’ escape code represent?
Correct Answer is : alert
10. Which type is best suited to represent the logical values?
Correct Answer is : boolean
11. Identify the user-defined types from the following?
Correct Answer is : both enumeration and classes
12. Which of the following statements are true? int f(float)
Correct Answer is : f is a function taking an argument of type float and returning an integer
13. The value 132.54 can be represented using which data type?
Correct Answer is : double
14. When a language has the capability to produce new data type mean, it can be called as
Correct Answer is : extensible
15. Pick the odd one out.
Correct Answer is : integer, enum, void
16. The constants are also called as
Correct Answer is : literals
17. What are the parts of the literal constants?
Correct Answer is : all of the mentioned
18. How are the constants declared?
Correct Answer is : both const keyword and #define preprocessor
19. What is the output of this program?
#include
using namespace std;
int main()
{
int const p = 5;
cout << ++p;
return 0;
}
Correct Answer is : Error
20. What is the output of this program?
#include
using namespace std;
#define PI 3.14159
int main ()
{
float r = 2;
float circle;
circle = 2 * PI * r;
cout << circle;
return 0;
}