C Language MCQ Questions And Answers

C Language MCQ Questions And Answers

 

1. Who is the father of C language ?

a) Steve Jobs
b) Dennis Ritchie
c) James Gosling
d) Rasmus Lerdorf

Show Answer
b) Dennis Ritchie

 

2. C language developed at ______?

a) AT & T’s Bell lab
b) Cambridge university
c) Sun micro system
d) None of these

Show Answer
a) AT & T’s Bell lab

 

3. C, C++, Java and python are examples of _____ ?

a) Low-level Language
b) High-level Language
c) Computer Language
d) Programming Language

Show Answer
b) High-level Language

 

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

a) An editor
b) A compiler
c) An operating system
d) None of these

Show Answer
b) A compiler

 

5. C was primarily developed as ?

a) Data processing
b) System programming
c) General purpose
d) None of these

Show Answer
b) System programming

 

6. How many type of comments are in C ?

a) One
b) Two
c) Three
d) Four

Show Answer
b) Two

 

7. How many types of Datatype in C ?

a) One
b) Two
c) Three
d) Four

Show Answer
b) Two

 

8. Which of the following is primary Datatype ?

a) int
b) class
c) struct
d) enum

Show Answer
a) int

 

9. In which Datatype the size is not fixed ?

a) int
b) float
c) Double
d) struct

Show Answer
d) struct
10. Which of the following is not an operator ?

a) ,
b) ||
c) size of
d) None

Show Answer
d) None

 

11. In C, which function we use to clear the console ?

a) getch()
b) clrscr()
c) clearscr()
d) clearscreen()

Show Answer
b) clrscr()

 

12. The maximum number of arguments that can be passed in a single function ?

a) 0
b) 127
c) 253
d) 255

Show Answer
c) 253

 

13. How many types of assignment operator in C ?

a) One
b) Two
c) Three
d) Four

Show Answer
b) Two

 

14. Every function must return a value ?

a) Yes
b) No
c) Can’t say
d) None

Show Answer
b) No

 

15. Result of logical expression in C is ?

a) True
b) False
c) 0 or 1
d) All of these

Show Answer
c) 0 or 1

 

16. How many types of macros in C ?

a) One
b) Two
c) Three
d) No any macros

Show Answer
b) Two

 

17. Which loop is best to perform the operation then test the condition ?

a) for loop
b) while loop
c) do while loop
d) No any loop

Show Answer
c) do while loop

 

18. What is the default value of static variable ?

a) 0
b) null
c) garbage
d) none

Show Answer
a) 0

 

19. Which of the following will not return a value ?

a) int
b) null
c) Char
d) void

Show Answer
d) void

 

20. Prototype of a function means _______ ?

a) Name of function
b) Parameter of function
c) Declaration of function
d) All of these

Show Answer
d) All of these

 

21. Which of the following is not a valid storage class ?

a) extern
b) dynamic
c) Register
d) auto

Show Answer
b) dynamic

 

22. Which type of statement is ‘break’ in C language ?

a) Jump statement
b) Conditional statement
c) Looping statement
d) All of the above

Show Answer
a) Jump statement

 

23. Can we print normal variable inside static function ?

a) Yes
b) No

Show Answer
b) No

 

24. Which of the following is more memory efficient ?

a) union
b) structure
c) Both a & b
d) Depends on system

Show Answer
a) union

 

25. Which of the following is the correct operator to compare two variables?

a) =
b) ==
c) !=
d) equal

Show Answer
b) ==

 

26. Which type of loop are while and for ?

a) Entry control
b) Exit control
c) Both a & b
d) None of these

Show Answer
a) Entry control

 

27. Can we overload function in C ?

a) Yes
b) No
c) Can’t say
d) None

Show Answer
b) No

 

28. What is the ASCII value of space character ?

a) 0
b) 32
c) 65
d) 255

Show Answer
b) 32

 

29. ASCII stands for ?

a) American Scientific Code for Information Interchange
b) American Scientific Code for Interchanging Information
c) American Standard Code for Information Interchange
d) American Standard Code for Interchanging Information

Show Answer
c) American Standard Code for Information Interchange

 

30. All keywords in C are in _____ ?

a) LowerCase letters
b) UpperCase letters
c) CamelCase letters
d) None of the above

Show Answer
a) LowerCase letters

 

31. Which of the following cannot be a variable name in C?

a) True
b) Friend
c) Export
d) Volatile

Show Answer
d) Volatile

 

32. What is an example of iteration in C ?

a) For
b) While
c) do-while
d) all of the above

Show Answer
d) all of the above

 

33. Functions in C Language are always ______?

a) Internal
b) External
c) Both a & b
d) External and Internal are not valid terms for functions

Show Answer
b) External

Leave a Comment