Basic C Programming MCQ Questions and Answers
Practice ModeShowing 10 of 198 questions
Q1
Choose the correct statement.
Answer: Option C
Q2
Which is true of conditional compilation ?
Answer: Option
Q3
C was primarily developed as a
Answer: Option A
Q4
C is a
Answer: Option C
Q5
Even if a particular implementation doesn't limit the number of characters in an identifier, it is advisable to be concise because
Answer: Option
Q6
The minimum number of temporary variables needed to swap the contents of two variables is
Answer: Option D
Q7
The purpose of the following program fragment
b = s + b;
s = b - s;
b = b - s;
where s,b are two integers is to
Answer: Option C
Q8
Consider the function
find (int x, into y)
{return (( x < y 7 0 : ( x - y));}
Let a, b be two non-negative integers. the call find ( a, find (a, b) can be used to find the
Answer: Option D
Q9
Let a, b be two non-negative integers. Which of the following calls, finds the positive difference of a and b?
Answer: Option A
Q10
If abc is the input, then the following program fragment
char x, y, z;
print f("%d", scanf ("%c%c", &x, &y, &z)); results in
Answer: Option D