Join Our Community!Join Our WhiteHat Group On facebook & Stay Updated.

C Programming MCQ Questions & Answers | Hacker Nucleus

Here, you can read aptitude questions and answers for your interview and entrance exams preparation. C Language Online Topical Tests for Interview Preparation have the best questions to make you understand the topic well. After each section you study, give the related topical test.

C Program Practice MCQ and Answer

Please enter your email:

1.

Who is the father of C Language?
 
 
 
 

2. C Language developed at _________?

 
 
 
 

3. For 16-bit compiler allowable range for integer constants is ________?

 
 
 
 

4. C programs are converted into machine language with the help of

 
 
 
 

5. C was primarily developed as

 
 
 
 

6. Standard ANSI C recognizes ______ number of keywords?

 
 
 
 

7. Which one of the following is not a reserved keyword for C?

 
 
 
 

8.

A C variable cannot start with
 
 
 
 

9.

Which one of the following is not a valid identifier?
 
 
 
 

10. What will be printed after execution of the following program code?

main()
{
      printf("\\nab"); 
      printf("\\bsi"); 
      printf("\\rha"); 
}
 
 
 
 
 

11.

What is the correct value to return to the operating system upon the successful completion of a program?
 
 
 
 
 

12. Which is the only function all C programs must contain?

 
 
 
 

13. Which of the following is not a correct variable type?

 
 
 
 
 

14.

What number would be shown on the screen after the following statements of C are executed?
char ch; 
int i; 
ch = 'G'; 
i = ch-'A';
printf("%d", i);
 
 
 

15. Find the output of the following program. void main() { int i=01289; printf(%d“, i); }

 
 
 
 
 

16. Find the output of the following program.

void main()
{
   int i=065, j=65;
   printf("%d %d", i, j);
}
 
 
 
 
 

17.

If ASCII value of ‘x’ is 120, then what is the value of the H, if
H = (‘x’ – ‘w’ ) / 3;
 
 
 
 
 

18.

What is the difference between a declaration and a definition of a variable?
 
 
 
 
 

19. “My salary was increased by 15%” Select the statement, which will EXACTLY reproduce the line of text above.

 
 
 
 
 

20.

short testarray[4][3] = { {1}, {2,3}, {4,5,6}};
printf("%d", sizeof(testarray));

Assuming a short is two bytes long, what will be printed by the above code?

 
 
 
 
 

Question 1 of 20

Comments

comments

Leave a Reply