Additional MCQS: Unit 1

C Programming MCQs

C Language Multiple-Choice Questions

1. Types of Programming language:

  • (a) Two
  • (b) Three
  • (c) Four
  • (d) Five

2. Which of the following is IDE?

  • (a) XCode
  • (b) Visual Studio
  • (c) Dev C++
  • (d) All

3. Variable is a name of:

  • (a) machine
  • (b) software
  • (c) memory location
  • (d) memory

4. Person who write programs called:

  • (a) program
  • (b) programming
  • (c) programmer
  • (d) engineer

5. High Level Languages are languages.

  • (a) Urdu-oriented
  • (b) English-oriented
  • (c) Persian-oriented
  • (d) Special-oriented

6. High level languages are:

  • (a) C
  • (b) C++
  • (c) Java
  • (d) All of these

7. C language was developed in between:

  • (a) 1969 and 1970
  • (b) 1969 and 1971
  • (c) 1969 and 1973
  • (d) 1969 and 1975

8. C language was introduced by:

  • (a) John Backus
  • (b) Dennis Ritchie
  • (c) Dennis Lily
  • (d) None of all

9. C language was developed at Laboratories.

  • (a) Cell
  • (b) Bell
  • (c) Well
  • (d) Dell

10. Which of the following symbol is used to denote a pre-processor statement?

  • (a) !
  • (b) P
  • (c) #
  • (d) :

11. First character of variable must be:

  • (a) Letter
  • (b) Underscore
  • (c) Digit
  • (d) both a & b

12. ______ values do not change during program execution.

  • (a) Constants
  • (b) Variable
  • (c) Coefficient
  • (d) None of all

13. Constant may be:

  • (a) Integer
  • (b) Characters
  • (c) Real
  • (d) all

14. Types of integer data type:

  • (a) two
  • (b) three
  • (c) four
  • (d) five

15. All the reserved words of C programs must be written in:

  • (a) Uppercase
  • (b) Lowercase
  • (c) Smaller case
  • (d) Middle case

16. What is the valid range of numbers for int type of 2 bytes?

  • (a) 0 to 256
  • (b) -32768 to +32767
  • (c) -65536 to +65536
  • (d) No specific range

17. Which symbol is used as a statement terminator in C?

  • (a) !
  • (b) #
  • (c) ;
  • (d) :

18. Which of the following symbol used for single line comment?

  • (a) **
  • (b) ??
  • (c) //
  • (d) $$

19. Which of the following is a valid comment of C program?

  • (c) /*Adeel Mahboob*/
  • (d) /Computer Teacher/

20. Types of comments are:

  • (a) two
  • (b) three
  • (c) four
  • (d) many

21. Assigning value to a variable for the first time is called:

  • (a) initialization
  • (b) declaration
  • (c) assigning
  • (d) entering

22. What is the valid range of numbers for int type of 4 bytes?

  • (a) 0 to 256
  • (b) -32768 to +32767
  • (d) -2147483648 to 2147483648

23. Which of the following variable name is invalid?

  • (a) _Hello.
  • (b) roll_num
  • (c) name
  • (d) Float

24. Character is enclosed in?

  • (a) ”
  • (b) “”
  • (c) ::

25. Identify the correct character constant.

  • (a) ‘ab’
  • (b) ‘A’
  • (c) ‘6’
  • (d) ‘/6’

26. Example of integer constant is:

  • (a) 56
  • (b) -57
  • (c) 3.6000
  • (d) both a & b

27. Character set of C includes:

  • (a) Alphabets
  • (b) digits
  • (c) special symbols
  • (d) All

28. Character takes how many bytes in memory?

  • (a) 1
  • (b) 2
  • (c) 3
  • (d) 4

29. Every variable has a unique name called:

  • (a) variable name
  • (b) keyword
  • (c) identifier
  • (d) reserved word

30. What is the maximum size of a float variable?

  • (a) 1 byte
  • (b) 2 bytes
  • (c) 4 bytes
  • (d) 5 bytes

31. A declaration float a; occupies ____ of memory

  • (a) 1 byte
  • (b) 4 bytes
  • (c) 8 bytes
  • (d) 16 bytes

32. A variable must be ____ before its use.

  • (a) initialize
  • (b) declare
  • (c) assign
  • (d) enter

33. A software that is used for writing a program is:

  • (a) compiler
  • (b) text editor
  • (c) IDE
  • (d) debugger

34. Which of the following is a software that is responsible for conversion of program files to machine understandable and executable code?

  • (a) compiler
  • (b) editor
  • (c) IDE
  • (d) debugger

35. Every programming language has some primitive building blocks and follows some grammatical rule known as its:

  • (a) programming rules
  • (b) syntax
  • (c) building blocks
  • (d) semantics rules

36. The list of predefined words are called:

  • (a) auto words
  • (b) reserved words
  • (c) predefined words
  • (d) restricted words

37. include statements are written in ____ section.

  • (a) header
  • (b) main
  • (c) comments
  • (d) print

38. ____ are added in the code further to explain the algorithms and techniques used by the program.

  • (a) messages
  • (b) comments
  • (c) hints
  • (d) explanations

39. ____ are the values that do not change during the whole execution of the program.

  • (a) variable
  • (b) constants
  • (c) strings
  • (d) none

40. A float uses ____ bytes of memory.

  • (a) 3
  • (b) 4
  • (c) 5
  • (d) 6

41. For initializing a variable, we use ____ operator.

  • (a) ->
  • (b) =
  • (c) @
  • (d) ?

42. ____ can be thought of as a container to store constants.

  • (a) box
  • (b) jar
  • (c) variable
  • (d) collections

End of MCQ list.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top