1. A software that facilitates programmers in writing computer programs is known as
a. A compiler
b. An editor
c. IDE
d. A debugger
Answer: c. IDE
2. ..............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
Answer: a. Compiler
3. Every programming language has some primitive building blocks and follows some grammar rules known as its .....................
a. Programming rules
b. Syntax
c. Building blocks
d. Semantic rules
Answer: b. Syntax
4. A list of words that are predefined and must not be used by the programmer to name his own variables are known as ....................
a. Auto words
b. Key-words
c. Restricted words
d. Predefined words
Answer: b. Key-words
5. “include” statements are written in ................. section.
a. Header
b. Main
c. Comments
d. Print
Answer: a. Header
6. ................. are added in the source code to further explain the techniques and algorithms used by the programmer.
a. Messages
b. Hints
c. Comments
d. Explanations
Answer: c. Comments
7. ................... are the values that do not change during the whole execution of program.
a. Variables
b. Constants
c. Strings
d. Comments
Answer: b. Constants
8. A “float” uses ................ bytes of memory.
a. 3
b. 4
c. 5
d. 6
Answer: b. 4
9. For initializing a variable, we use ................. operator.
a. ?
b. @
c. =
d. ->
Answer: c. =
10. ................ can be thought of as container to store constants.
a. Box
b. Jar
c. Variable
d. Collection
Answer: c. Variable
11. Printf is used to print ................ type of data.
a. Int
b. Float
c. Char
d. All of them
Answer: d. All of them
12. Scanf is a .................. in C programming language.
a. Keyword
b. Library
c. Function
d. None of these
Answer: c. Function
13. Getch() is used to take .............. as input from user.
a. Int
b. Float
c. Char
d. All of these
Answer: d. All of these
14. Let the following part of code, what will be the value of the variable a after execution? int a = 4;
float b = 2.2;
a = a * b;
a. 8.8
b. 8
c. 8.0
d. 8.2
Answer: b. 8
15. Which of the following is a valid line of code?
a. Int = 20;
b. grade='A'
c. Line = this is a line
d. None of these
Answer: b. grade='A'
16. Which operator has highest precedence among the following?
a. /
b. =
c. >
d. !
Answer: d. !
17. Which of the following is not a type of the operator?
a. Arithmetic operator
b. Relational operator
c. Check operator
d. Logical operator
Answer: c. Check operator
18. The operator % is used to calculate .................
a. Percentage
b. Remainder
c. Factorial
d. Square
Answer: b. Remainder
19. Which of the following is a valid character?
a. 'here'
b. "a"
c. '9'
d. None of these
Answer: c. '9'
20. What is true about C language?
a. C is not a case sensitive language
b. Keywords can be used as variables
c. All logical operators are binary operators
d. None of these
Answer: d. None of these
21. Conditional logic helps in ...............
a. Decisions
b. Iterations
c. Traversing
d. All of these
Answer: a. Decisions
22. ................. statements describe the sequence in which statements of the program should be executed.
a. Loop
b. Conditional
c. Control
d. All of these
Answer: c. Control
23. In if statement, what happens if condition is false?
a. Program crashes
b. Index out of bound error
c. Further code executes
d. Compiler asks to change condition
Answer: c. Further code executes
24. Which of the following statements will execute?
int a = 5;
if(a < 10)
a++;
else
if(a > 4)
a--;
a. A++;
b. A--;
c. Both A and B
d. None of these
Answer: a. A++;
25. Which of the following is the condition to check a is a factor of c?
a. A % c == 0
b. C % a == 0
c. A * c == 0
d. A + c == 0
Answer: b. C % a == 0
26. A condition can be any ................ expression.
a. Arithmetic
b. Logical
c. Relational
d. All of these
Answer: d. All of these
27. An if statement inside another if statement is called ............ structure.
a. Nested
b. Boxed
c. Repeated
d. Decomposed
Answer: a. Nested
28. A set of multiple instructions enclosed in braces is called a ...............
a. Box
b. List
c. Block
d. Job
Answer: c. Block
29. Any array is a .................... structure.
a. Loop
b. Control
c. Data
d. Conditional
Answer: c. Data
30. Array elements are stored at .................... memory locations.
a. Contiguous
b. Scattered
c. Divided
d. None of these
Answer: a. Contiguous
31. If the size of an array is 100, the range of indexes will be ....................
a. 0-99
b. 0-100
c. 1-100
d. 2-2012
Answer: a. 0-99
32. .................... structure allows repetition of a set of instructions.
a. Loop
b. Conditional
c. Control
d. Data
Answer: a. Loop
33. .................... is a unique identifier, used to refer to the array.
a. Data type
b. Array name
c. Array size
d. None of these
Answer: b. Array name
34. Array can be initialized ...................... declaration.
a. At the time
b. After
c. Before
d. Both A and B
Answer: d. Both A and B
35. Using loops inside loops is called ................... loops.
a. For
b. While
c. Do-while
d. Nested
Answer: d. Nested
36. .................... part of for loop is executed first.
a. Condition
b. Body
c. Initialization
d. Increment / Decrement
Answer: c. Initialization
37. .................... make it easier to read and write valued in array.
a. Loops
b. Conditions
c. Expressions
d. Functions
Answer: a. Loops
38. To initialize the array in a single statement, initialize it ............ declaration.
a. At the time
b. After
c. Before
d. Both A and B
Answer: a. At the time
39. Functions could be built in .....................
a. Admin defined
b. Server defined
c. User defined
d. Both A and C
Answer: c. User defined
40. The functions which are available in C Standard Library are called ....................
a. User defined
b. Built-in
c. Recursive
d. Repetitive
Answer: b. Built-in
41. The values passed to a function are called .................
a. Bodies
b. Return types
c. Array
d. Arguments
Answer: d. Arguments
42. Char cd() {return ‘a’}. In this function ”char“ is ...............
a. Body
b. Return type
c. Array
d. Arguments
Answer: b. Return type
43. The advantage of using functions are ..............
a. Readability
b. Reusability
c. Easy debugging
d. All of these
Answer: d. All of these
44. If there are three return statements in the function body, ................ of them will be executed.
a. One
b. Two
c. Three
d. First and last
Answer: a. One
45. Readability helps to ................ the code.
a. Understand
b. Modify
c. Debug
d. All of these
Answer: d. All of these
46. ..................... means to transfer the control to another function.
a. Calling
b. Defining
c. Re-writing
d. Including
Answer: a. Calling
47. Include statements are written in .......... section.
a. Header
b. Main
c. Comments
d. Prints
Answer: a. Header
48. A software that helps programmers in writing computer programs is known as .......
a. Compiler
b. Editor
c. Debuggr
d. IDE
Answer: d. IDE
49. From the following ........... is a valid character.
a. "here"
b. "C Language"
c. "a"
d. ’a’
Answer: d. ’a’
50. "Printf" is a function:
a. Input
b. Output
c. Input & Output
d. Mathematical
Answer: b. Output
51. Which of following is a valid character?
a. ’here’
b. "a"
c. ’9’
d. "abc"
Answer: c. ’9’
52. ............. are the values that do not change during the whole execution of program.
a. Variables
b. Constants
c. Strings
d. Comments
Answer: b. Constants
53. From the following ........ is a valid line of code.
a. int = 20
b. grade = ’A’
c. line = this is line
d. float = 10
Answer: b. grade = ’A’
54. For initialize a variable, we use ........... operator.
a. →
b. =
c. @
d. ?
Answer: b. =
55. A float uses .......... bytes of memory.
a. 3
b. 4
c. 5
d. 2
Answer: b. 4
56. .......... can be thought of as a container to store constants.
a. Box
b. Jar
c. Variable
d. Collection
Answer: c. Variable
57. A char uses .......... bytes of memory.
a. 1
b. 2
c. 3
d. 4
Answer: a. 1
58. Which of the following format specifier is used for character data type?
a. %d
b. %f
c. %c
d. %u
Answer: c. %c
59. There are ............... types of comments.
a. 2
b. 3
c. 4
d. 5
Answer: a. 2
60. What will be the output of code?

void main()
{
printf("1 ");
}
a. "1"
b. "2"
c. 1
d. 2
Answer: c. 1
61. Getch() is used to take ............ as input from user.
a. int
b. float
c. char
d. unsigned int
Answer: c. char
62. It is a very common mistake to forget ........ operator in the scanf function.
a. &
b. %
c. *
d. $
Answer: a. &
63. Which of the following is the valid line of code?
a. int = 20;
b. grade = "A"
c. line = this is a line
d. int c;
Answer: d. int c;
64. What will be the output of code?

void main ()
{
printf ("2");
}
a. 3
b. 1
c. 2
d. 4
Answer: c. 2
65. What will be the output of this code?

void main ()
{
printf ("Punjab");
}
a. Punjab
b. Pun
c. Pak
d. Pakistan
Answer: a. Punjab
66. Which of the following is a valid character in C language?
a. "here"
b. "a"
c. ’a’
d. 115
Answer: c. ’a’
67. Which of the given is a valid statement?
a. int=20;
b. grade=’A’
c. line=this is a line
d. grade=’B’
Answer: b. grade=’A’
68. Scanf is a .......... in C programming language:
a. Keyword
b. Library
c. Function
d. Header file
Answer: c. Function
69. What will be the output of the following?

void main ()
{
printf ("Pakistan");
}
a. Punjab
b. Pak
c. Pakistan
d. Pun
Answer: c. Pakistan
70. Scanf() function is:
a. User Defined Function
b. Built in Function
c. Arithmetic
d. Custom function
Answer: b. Built in Function
71. Which of the following function is used to Display Output on the screen?
a. printf()
b. scanf()
c. show()
d. display
Answer: a. printf()
72. For initializing a variable, we use ............. operator.
a. ←
b. =
c. @
d. ?
Answer: b. =
73. The operator "%" is used to calculate.............
a. Percentage
b. Remainder
c. Factorial
d. Square
Answer: b. Remainder
74. Which operator has highest precedence among the following?
a. /
b. =
c. <
d. !
Answer: d. !
75. ........... relational operator is used for equal in C language.
a. =
b. ==
c. !
d. <>
Answer: b. ==
76. Among the following ............ operator has the lowest precedence.
a. /
b. =
c. >
d. !
Answer: b. =
77. Which operator is used as assignment operator?
a. +
b. -
c. =
d. ==
Answer: c. =
78. What will be the value of variable "a" after execution?

int a=4;
float b = 2.2;
a= a*b;
a. 8
b. 8.0
c. 8.8
d. 8.2
Answer: a. 8
79. Which operator has highest precedence among the following?
a. /
b. =
c. <
d. +
Answer: a. /
80. Ternary operator is applied on ......... operands.
a. 1
b. 2
c. 3
d. 4
Answer: c. 3
81. Which operator has the lowest precedence?
a. /
b. =
c. <
d. +
Answer: b. =
82. Which Operator is used to get the Remainder of an Integer after Division:
a. %
b. ++
c. /
d. *
Answer: a. %
83. The Operator that Operates on three Operands is called:
a. Unary Operator
b. Binary Operator
c. Ternary Operator
d. Tetra Operator
Answer: c. Ternary Operator
84. In C-language which of the following is logical operator?
a. +
b. <
c. %
d. NOT
Answer: d. NOT
85. Which symbol is used for logical AND operator?
a. &
b. &&
c. !
d. #
Answer: b. &&
86. How many types of control statements are available in C-Language?
a. 1
b. 2
c. 3
d. 4
Answer: c. 3
87. Conditional logic helps in ...............
a. Decisions
b. Iterations
c. Traversing
d. Relation
Answer: a. Decisions
88. A set of multiple instructions enclosed in braces is called a .............
a. Block
b. Job
c. List
d. Box
Answer: a. Block
89. ............ control is the default control structure in C language.
a. Sequential
b. Conditional
c. Repetition
d. Array
Answer: a. Sequential
90. In C-language, types of control structures:
a. 2
b. 3
c. 4
d. 5
Answer: b. 3
91. Which is a control statement?
a. Relation
b. Function
c. Selection
d. Array
Answer: c. Selection
92. A selection statement within another selection statement is called .......... selection structure.
a. Nested
b. Dual
c. Infinite
d. Complex
Answer: a. Nested
93. A condition can be any ............ expression:
a. Arithmetic
b. Relational
c. Logical
d. Arithmetic relational or logical
Answer: d. Arithmetic relational or logical
94. Sequential control is the ........... control structure in C-language.
a. Selection
b. Repetition
c. Relation
d. Default
Answer: d. Default
95. All of the following are control statements except:
a. Sequential
b. Repetition
c. Selection
d. Relation
Answer: d. Relation
96. Which control structure in C language executes the statement in order?
a. Sequential
b. Repetition
c. Selection
d. Relation
Answer: a. Sequential
97. Which control structure repeats a set of statements for a number in order?
a. Sequential
b. Repetition
c. Selection
d. Relation
Answer: b. Repetition
98. In if statement, the condition is written within these symbols:
a. <>
b. []
c. {}
d. ()
Answer: d. ()
99. Which of the following options is used for making two way decisions:
a. for
b. if-else
c. while
d. Control
Answer: b. if-else
100. In if statement, what happens if condition is false?
a. Program crashes
b. Index out of bound
c. Compiler asks to change condition
d. Further code executes
Answer: d. Further code executes
101. An if statement inside another if statement is called ............. structure.
a. Nested
b. Boxed
c. Repeated
d. Decomposed
Answer: a. Nested
102. Which of the following is the condition to check a is factor of c?
a. a%c==0
b. c%a==0
c. a*c==0
d. a+c==0
Answer: b. c%a==0
103. Which symbol is used by if to enter the condition?
a. []
b. ""
c. {}
d. ()
Answer: d. ()
104. Which of the following is a selection statement?
a. if
b. for
c. while
d. do while
Answer: a. if
105. If the size of an array is 10, the range of indexes will be .............
a. 10-20
b. 1-10
c. 0-10
d. 0-9
Answer: d. 0-9
106. If size of an array is 100, the range of indexes will be:
a. 0-100
b. 0-99
c. 1-100
d. 2-102
Answer: b. 0-99
107. .... is the unique identifier used to refer the array.
a. Data type
b. Array name
c. Array size
d. Array index
Answer: b. Array name
108. Array elements are stored at ............ memory location.
a. Contiguous
b. Scattered
c. Divided
d. Add
Answer: a. Contiguous
109. The index of first element of an array is always:
a. 0
b. 1
c. 2
d. 3
Answer: a. 0
110. The index of an element in array is written within ...............
a. <>
b. []
c. ()
d. {}
Answer: b. []
111. An array is a ............ structure:
a. Data
b. Control
c. Conditional
d. Loop
Answer: a. Data
112. ........... make it easier to read and write values in array:
a. Loop
b. Conditions
c. Expressions
d. Functions
Answer: a. Loop
113. What is the size of array in this statement? float a[10]
a. 1
b. 10
c. 11
d. 9
Answer: b. 10
114. Which of the following is correct declaration of array?
a. int a[];
b. float b[];
c. char c[];
d. int a[5];
Answer: d. int a[5];
115. Which is the second element in an array?
a. N[0]
b. N[2]
c. N[3]
d. N[1]
Answer: d. N[1]
116. If the size of an array is 50, the range of Indexes will be .............
a. 0 to 50
b. 0 to 49
c. 1 to 49
d. 0 to 50
Answer: b. 0 to 49
117. What is the output of the following code?
int c[2]={25,30};
printf("%d",c[1]);
a. 30
b. 25
c. 24
d. 23
Answer: a. 30
118. Each run of a loop is called:
a. Cycle
b. Iteration
c. Duration
d. Test
Answer: b. Iteration
119. What is the output of the following code?
int b[3]={15,20,16};
printf("%d", b[2]);
a. 16
b. 17
c. 18
d. 19
Answer: a. 16
120. Using loops inside loop is called .......... loops.
a. for
b. while
c. do while
d. nested
Answer: d. nested
121. .......... structure allows repetition of a set of instructions.
a. loop
b. conditional
c. control
d. data
Answer: a. loop
122. .............. part of "For loop" is executed first.
a. condition
b. body
c. initialization
d. increment/decrement
Answer: c. initialization
123. What is the final value of i after executing the above code?
for (int i=1;i<=4;i++)
a. 3
b. 4
c. 5
d. 6
Answer: b. 4
124. How many times the word "PAKISTAN" will be printed by the loop?
for (int a=0; a<=3; a++)
a. 5
b. 4
c. 3
d. 10
Answer: b. 4
125. How many times the word "PAKISTAN" will be printed by the loop?
for (int x=0;x<11;x++)
a. 0
b. 1
c. 9
d. 10
Answer: d. 10
126. How many times the word "PUNJAB" will be printed using for loop?
for(int a=1;a<3;a++)
a. 1
b. 2
c. 3
d. 4
Answer: b. 2
127. How many times "Punjab" will print by using the following statement?
for (a=0;a<=4;a++)
a. 1
b. 2
c. 3
d. 5
Answer: d. 5
128. The statements enclosed inside ......... from the body of the function.
a. []
b. ()
c. {}
d. <>
Answer: c. {}
129. Inputs of a function are called:
a. Parameters
b. Return value
c. Function signature
d. Identifier
Answer: a. Parameters
130. If there are three return statements in the function body ......... of them will be executed.
a. Four
b. Three
c. Two
d. One
Answer: d. One
131. The functions which are available in C standard library are called:
a. User defined
b. Built in
c. Recursive
d. Repetitive
Answer: b. Built in
132. ..... is block of statements which performs a particular task:
a. Computer
b. Program
c. Function
d. Parameters
Answer: c. Function
133. Scanf is a ........ in C programming language:
a. Operator
b. Escape sequence
c. Function
d. Statement terminator
Answer: c. Function
134. The values passed to function are called .......
a. bodies
b. return types
c. arrays
d. arguments
Answer: d. arguments
135. Functions could be built in or ........
a. admin defined
b. server defined
c. user defined
d. function defined
Answer: c. user defined
136. In void main () "void" is ......
a. return type
b. variable
c. constant
d. condition
Answer: a. return type
137. A function can return .......... values.
a. 1
b. 2
c. 3
d. 4
Answer: a. 1
138. A function cannot return more than ............ values.
a. 1
b. 2
c. 3
d. 4
Answer: a. 1
139. What will be the output of this code?
printf("%d", add(3,2));
a. 2
b. 3
c. 5
d. 6
Answer: c. 5
140. In function char is:
char cd() {return 'a';}
a. Body
b. Return type
c. Array
d. Argument
Answer: b. Return type
141. Readability helps to .......... the code.
a. Save
b. Modify
c. Run
d. Compile
Answer: b. Modify
142. The printf () and scanf () are .......... function.
a. Built in
b. Arithmetic
c. User defined
d. Custom
Answer: a. Built in
143. What will be the output of this code?
printf("%d", add(9,5));
a. 5
b. 9
c. 14
d. 18
Answer: c. 14
144. The keyword used to transfer the control from a function back to the calling function is .........
a. return
b. switch
c. goto
d. Back
Answer: a. return
145. In this function "int" is ........
a. Body
b. Return type
c. Array
d. Arguments
Answer: b. Return type
146. The pre-defined functions of C language are called:
a. Built in function
b. Commercial function
c. User defined function
d. Custom made function
Answer: a. Built in function
147. Which of the following are used to receive the values passed to the function as Input?
a. Constants
b. Arguments
c. Parameters
d. Expressions
Answer: c. Parameters
148. .......... means to transfer the control to another function.
a. Calling
b. Defining
c. Re writing
d. Including
Answer: a. Calling
149. What is the type of parameter in this function int add (int x, int y)?
a. int
b. char
c. area
d. float
Answer: a. int
150. What will be the output of z?
int z = abc(2);
int abc(int x) { return x+5; }
a. 2
b. 7
c. 5
d. 10
Answer: b. 7
151. Multiple arguments passed to a function are separated by:
a. Commas
b. Colons
c. Semicolons
d. Period
Answer: a. Commas
152. The functions which are defined by a programmer are called:
a. Built in function
b. Custom made function
c. User defined function
d. Commercial function
Answer: c. User defined function
153. A function that does not return anything has return type:
a. null
b. void
c. nothing
d. empty
Answer: b. void
154. The ........ of the function is the data type of the value returned by the function.
a. Name
b. Parameter
c. Argument
d. Return type
Answer: d. Return type
155. Which of the following are used to receive the value passed to the function as input?
a. Parameters
b. Constants
c. Expressions
d. Arguments
Answer: a. Parameters
156. If there are four Return Statements in the function body, .......... of them will be executed.
a. 1
b. 2
c. 3
d. 4
Answer: a. 1
157. Scanf () function is:
a. User Defined Function
b. Built in Function
c. Arithmetic Function
d. Custom Function
Answer: b. Built in Function
158. A list of words that are predefined and must not be used by the programmer to name his own variables are known as:
a. Auto words
b. Reserved words
c. Restricted words
d. Predefined words
Answer: b. Reserved words
159. Every programming language has some primitive building blocks and follows some grammar rules known as its:
a. Programming rules
b. Syntax
c. Building blocks
d. Semantics rules
Answer: b. Syntax
160. Which of the following keyword used for store integer data type:
a. float
b. char
c. int
d. Void
Answer: c. int
161. Printf() is used to print type of data:
a. int
b. float
c. char
d. All of these
Answer: d. All of these
162. A valid character constant is:
a. 12
b. 1.2
c. " "
d. 'c'
Answer: d. 'c'
163. Which is true about C-language?
a. C is not case sensitive language
b. Keyword can be used as variable name
c. All logical operators are binary operator
d. None of these
Answer: d. None of these
164. Format specifier %i show the data type:
a. int
b. float
c. char
d. void
Answer: a. int
165. There are ....... type of logical operators in C-language.
a. 2
b. 3
c. 4
d. 5
Answer: b. 3
166. Which of the following is True about C-Language:
a. C is not a Case Sensitive Language
b. Keywords can be used as variable names
c. All Logical Operators are Binary Operators
d. None of these
Answer: d. None of these
167. C-programming language also provide structure to deal with conditions:
a. Tree
b. Functions
c. Loop
d. Switch case
Answer: d. Switch case
168. What is the output of the following code?
int x=10;
if (x>10)
printf("Wrong");
else printf("Correct");
a. Wrong
b. Correct
c. Error
d. No output
Answer: b. Correct
169. Which of the following statements will execute?
int a=5;
if (a<10)
a++;
else
a--;
a. A++;
b. A--;
c. Both
d. None
Answer: a. A++;
170. Which of the following is the condition to check if n is a factor of m:
a. N%m==0
b. M%n==0
c. M*n==0
d. M+n==0
Answer: b. M%n==0
171. A built-in function:
a. Cannot be redefined
b. Can be redefined
c. Cannot return a value
d. Should be redefined
Answer: a. Cannot be redefined
172. The steps of divide large problem into small problems is called:
a. Divide and conquer
b. Dividing a problem
c. Searching a problem
d. Analyzing a problem
Answer: a. Divide and conquer
173. _______ describes the name, inputs and outputs of the function:
a. Function declaration
b. Function call
c. Function signature
d. All
Answer: c. Function signature
174. ______ is the return type of this function int isVowel (char);
a. Char
b. Is vowel
c. Int
d. Void
Answer: c. Int
175. _______ will be the value of y:
int y = abc(2);
int abc (int x)
{
return x % 2;
}
a. 3
b. 2
c. 1
d. 0
Answer: d. 0
Note: Dear Students, You must test yourself with the below MCQs now.

Test Yourself: Interactive MCQs

1. A software that facilitates programmers in writing computer programs is known as
2. ..............is a software that is responsible for conversion of program files to machine understandable and executable code.
3. Every programming language has some primitive building blocks and follows some grammar rules known as its .....................
4. A list of words that are predefined and must not be used by the programmer to name his own variables are known as ....................
5. “include” statements are written in ................. section.
6. ................. are added in the source code to further explain the techniques and algorithms used by the programmer.
7. ................... are the values that do not change during the whole execution of program.
8. A “float” uses ................ bytes of memory.
9. For initializing a variable, we use ................. operator.
10. ................ can be thought of as container to store constants.
11. Printf is used to print ................ type of data.
12. Scanf is a .................. in C programming language.
13. Getch() is used to take .............. as input from user.
14. Let the following part of code, what will be the value of the variable a after execution? int a = 4; float b = 2.2; a = a * b;
15. Which of the following is a valid line of code?
16. Which operator has highest precedence among the following?
17. Which of the following is not a type of the operator?
18. The operator % is used to calculate .................
19. Which of the following is a valid character?
20. What is true about C language?
21. Conditional logic helps in ...............
22. ................. statements describe the sequence in which statements of the program should be executed.
23. In if statement, what happens if condition is false?
24. Which of the following statements will execute? int a = 5; if(a < 10) a++; else if(a > 4) a--;
25. Which of the following is the condition to check a is a factor of c?
26. A condition can be any ................ expression.
27. An if statement inside another if statement is called ............ structure.
28. A set of multiple instructions enclosed in braces is called a ...............
29. Any array is a .................... structure.
30. Array elements are stored at .................... memory locations.
31. If the size of an array is 100, the range of indexes will be ....................
32. .................... structure allows repetition of a set of instructions.
33. .................... is a unique identifier, used to refer to the array.
34. Array can be initialized ...................... declaration.
35. Using loops inside loops is called ................... loops.
36. .................... part of for loop is executed first.
37. .................... make it easier to read and write values in array.
38. To initialize the array in a single statement, initialize it ............ declaration.
39. Functions could be built in .....................
40. The functions which are available in C Standard Library are called ....................
41. The values passed to a function are called .................
42. Char cd() {return ‘a’}. In this function ”char“ is ...............
43. The advantage of using functions are ..............
44. If there are three return statements in the function body, ................ of them will be executed.
45. Readability helps to ................ the code.
46. ..................... means to transfer the control to another function.
47. Include statements are written in .......... section.
48. A software that helps programmers in writing computer programs is known as .......
49. From the following ........... is a valid character.
50. "Printf" is a function:
51. Which of following is a valid character?
52. ............. are the values that do not change during the whole execution of program.
53. From the following ........ is a valid line of code.
54. For initialize a variable, we use ........... operator.
55. A float uses .......... bytes of memory.
56. .......... can be thought of as a container to store constants.
57. A char uses .......... bytes of memory.
58. Which of the following format specifier is used for character data type?
59. There are ............... types of comments.
60. What will be the output of code? void main() { printf("1 "); }
61. Getch() is used to take ............ as input from user.
62. It is a very common mistake to forget ........ operator in the scanf function.
63. Which of the following is the valid line of code?
64. What will be the output of code? void main () { printf ("2"); }
65. What will be the output of this code? void main () { printf ("Punjab"); }
66. Which of the following is a valid character in C language?
67. Which of the given is a valid statement?
68. Scanf is a .......... in C programming language:
69. What will be the output of the following? void main () { printf ("Pakistan"); }
70. Scanf() function is:
71. Which of the following function is used to Display Output on the screen?
72. For initializing a variable, we use ............. operator.
73. The operator "%" is used to calculate.............
74. Which operator has highest precedence among the following?
75. ........... relational operator is used for equal in C language.
76. Among the following ............ operator has the lowest precedence.
77. Which operator is used as assignment operator?
78. What will be the value of variable "a" after execution? int a=4; float b = 2.2; a= a*b;
79. Which operator has highest precedence among the following?
80. Ternary operator is applied on ......... operands.
81. Which operator has the lowest precedence?
82. Which Operator is used to get the Remainder of an Integer after Division:
83. The Operator that Operates on three Operands is called:
84. In C-language which of the following is logical operator?
85. Which symbol is used for logical AND operator?
86. How many types of control statements are available in C-Language?
87. Conditional logic helps in ...............
88. A set of multiple instructions enclosed in braces is called a .............
89. ............ control is the default control structure in C language.
90. In C-language, types of control structures:
91. Which is a control statement?
92. A selection statement within another selection statement is called .......... selection structure.
93. A condition can be any ............ expression:
94. Sequential control is the ........... control structure in C-language.
95. All of the following are control statements except:
96. Which control structure in C language executes the statement in order?
97. Which control structure repeats a set of statements for a number in order?
98. In if statement, the condition is written within these symbols:
99. Which of the following options is used for making two way decisions:
100. In if statement, what happens if condition is false?
101. An if statement inside another if statement is called ............. structure.
102. Which of the following is the condition to check a is factor of c?
103. Which symbol is used by if to enter the condition?
104. Which of the following is a selection statement?
105. If the size of an array is 10, the range of indexes will be .............
106. If size of an array is 100, the range of indexes will be:
107. .... is the unique identifier used to refer the array.
108. Array elements are stored at ............ memory location.
109. The index of first element of an array is always:
110. The index of an element in array is written within ...............
111. An array is a ............ structure:
112. ........... make it easier to read and write values in array:
113. What is the size of array in this statement? float a[10]
114. Which of the following is correct declaration of array?
115. Which is the second element in an array?
116. If the size of an array is 50, the range of Indexes will be .............
117. What is the output of the following code? int c[2]={25,30}; printf("%d",c[1]);
118. Each run of a loop is called:
119. What is the output of the following code? int b[3]={15,20,16}; printf("%d", b[2]);
120. Using loops inside loop is called .......... loops.
121. .......... structure allows repetition of a set of instructions.
122. .............. part of "For loop" is executed first.
123. What is the final value of i after executing the above code? for (int i=1;i<=4;i++)
124. How many times the word "PAKISTAN" will be printed by the loop? for (int a=0; a<=3; a++)
125. How many times the word "PAKISTAN" will be printed by the loop? for (int x=0;x<11;x++)
126. How many times the word "PUNJAB" will be printed using for loop? for(int a=1;a<3;a++)
127. How many times "Punjab" will print by using the following statement? for (a=0;a<=4;a++)
128. The statements enclosed inside ......... from the body of the function.
129. Inputs of a function are called:
130. If there are three return statements in the function body ......... of them will be executed.
131. The functions which are available in C standard library are called:
132. ..... is block of statements which performs a particular task:
133. Scanf is a ........ in C programming language:
134. The values passed to function are called .......
135. Functions could be built in or ........
136. In void main () "void" is ......
137. A function can return .......... values.
138. A function cannot return more than ............ values.
139. What will be the output of this code? printf("%d", add(3,2));
140. In function char is: char cd() {return 'a';}
141. Readability helps to .......... the code.
142. The printf () and scanf () are .......... function.
143. What will be the output of this code? printf("%d", add(9,5));
144. The keyword used to transfer the control from a function back to the calling function is .........
145. In this function "int" is ........
146. The pre-defined functions of C language are called:
147. Which of the following are used to receive the values passed to the function as Input?
148. .......... means to transfer the control to another function.
149. What is the type of parameter in this function int add (int x, int y)?
150. What will be the output of z? int z = abc(2); int abc(int x) { return x+5; }
151. Multiple arguments passed to a function are separated by:
152. The functions which are defined by a programmer are called:
153. A function that does not return anything has return type:
154. The ........ of the function is the data type of the value returned by the function.
155. Which of the following are used to receive the value passed to the function as input?
156. If there are four Return Statements in the function body, .......... of them will be executed.
157. Scanf () function is:
158. A list of words that are predefined and must not be used by the programmer to name his own variables are known as:
159. Every programming language has some primitive building blocks and follows some grammar rules known as its:
160. Which of the following keyword used for store integer data type:
161. Printf() is used to print type of data:
162. A valid character constant is:
163. Which is true about C-language?
164. Format specifier %i show the data type:
165. There are ....... type of logical operators in C-language.
166. Which of the following is True about C-Language:
167. C-programming language also provide structure to deal with conditions:
168. What is the output of the following code? int x=10; if (x>10) printf("Wrong"); else printf("Correct");
169. Which of the following statements will execute? int a=5; if (a<10) a++; else a--;
170. Which of the following is the condition to check if n is a factor of m:
171. A built-in function:
172. The steps of divide large problem into small problems is called:
173. _______ describes the name, inputs and outputs of the function:
174. ______ is the return type of this function int isVowel (char);
175. _______ will be the value of y: int y = abc(2); int abc (int x) { return x % 2; }

Frequently Asked Questions (FAQs)

Students should carefully read each MCQ, understand the concept behind the answer, and practice regularly to memorize key points.

No. Understanding the concepts behind the questions helps you answer tricky or slightly modified questions correctly in exams.

Daily or at least several times a week. Repetition improves memory and helps you answer quickly during exams.

Yes, these MCQs cover the most important topics, but it’s also recommended to revise your textbooks and class notes for complete understanding.

Focus on programming basics, data types, operators, control structures (if-else, loops), arrays, and functions, as these are frequently asked in exams.

Write short notes, create flashcards, and test yourself repeatedly. Discussing questions with classmates also improves retention.