Sample Questions
 

 

1. How can the following infinite loop be terminated --  ‘for(;;)’
A. break
B. exit(0)
C. abort()
D. All of the mentioned


2. Which is valid C expression
A. int my_num = 100,000;
B. int my_num = 100000;
C. int my num = 1000;
D. int $my_num = 10000;


3. What is not a valid variable name declaration
A. float PI = 3.14;
B. double PI = 3.14;
C. int PI = 3.14;
D. #define PI 3.14


4. Enlist the error in following variable declaration -- float 3Bedroom-Hall-Kitchen?;
A. The variable name begins with an integer
B. The special character ‘-‘
C. The special character ‘?’
D. All of the mentioned

5. Which data type is most suitable for storing a number 65000 in a 32-bit system?
A. signed short
B. unsigned short
C. long
D. int

Answers:      1 (A), 2 (B), 3 (D), 4 (D), 5 (B)
 

 

Apply for Certification

https://www.vskills.in/certification/information-technology/Certified-C-Developer