Home
MCQS
C/C MCQ Quiz Hub
C Programming MCQ Part 1
Choose a topic to test your knowledge and improve your C/C skills
1. The execution of a C program start from _____.
function
Header file
main()
Processor
2. The C supports _____ basic data types
8
2
10
4
3. The C program is converted to machine language using________.
An assembler.
A compiler
An interpreter.
An operating system.
4. The C was developed in the year____
1972.
1960
1975
1971
5. C language has been developed at_________.
AT & T Bell labs, USA.
IBM, USA
Borland International, USA
Sun Microsystems
6. The C language is an offspring of ______
B language.
ALGOL language
BASIC language
ARITHMETIC language
7. The programs should be written only in_______
lower case.
upper case
title case
sentence case.
8. The role of a compiler is to translate source program statements to_________.
object codes
octal codes
decimal codes.
binary codes
9. he extension for C program files by default is_________.
.c
.d
obj
exe
10. An escape sequence commences with _____________.
.
/.
?.
#.
11. The C language is closely associated with _________.
MS-DOS.
Linux.
Unix.
MS-Windows.
12. The C program is highly case sensitive
false
true
both (A) and (B)
none of the above
13. Each instruction in C program is terminated by__________.
dot (.).
Comma (,).
Semi-colon (;)
curly brace ({}).
14. Which of the following declaration is not supported by C?
String str;.
char *str;.
float str = 3e2;.
Both String str; & float str = 3e2;.
15. ANSI committee was setup in the summer of___________.
1983
1985
1990
1976
16. A declaration float a, b; occupies ___ of memory. .
1 Byte.
4 Bytes.
8 Bytes.
16 Bytes.
17. Identify the wrong statement.
putchar(65).
putchar(‘x’).
putchar(“x”).
putchar(‘ ‘).
18. An interpreter reads the source code of a program__
One line at a time.
Two lines at a time.
complete program in one stroke
complete program in two strokes.
19. A compiler compiles the source code_______
complete program in one stroke.
one line at a time.
two lines at a time.
complete programs in two strokes.
20. A character variable can store only___________.
1 character.
20 characters.
254 characters
265 characters.
21. C variable cannot start with_________.
a number
an alphabet.
a character
a string.
22. A short integer variable occupies memory_________.
2 bytes.
4 bytes.
1 bytes.
8 bytes.
23. According to __________ C keywords are reserved words.
a compiler.
an interpreter.
header file.
an interpreter and header file.
24. The declaration of C variable can be done____
anywhere in the program.
in declaration part.
in executable part.
at the end of the program.
25. In C one statement can declare_________.
only one variable.
Two variables
Ten variables.
any number of variables.
26. The word char is a_______
keyword.
password
header file.
statement
27. The variables are initialized using_________.
greater than(>).
equal to (=).
twice equal to(==).
an increment operator(++).
28. An unsigned integer variable contains values________.
greater or equal to zero.
less than zero.
only zeros.
(1) & (2) both.
29. The keyword const keeps the value of a variable_________.
constant
mutable
variant
different
30. The keyword const keeps the value of a variable_________.
constant
mutable
variant
different
31. In C every variable has_______.
a type.
a name.
a value
a size.
32. The range of character data type is_________.
-128 to 127.
0 to 255.
0 to 32767
126 to 275.
33. The keyword volatile keeps the value of variable__________.
constant.
mutable
variant
different
34. Which is the incorrect variable name__________.
else.
name
age
char
35. How many keywords are there in ANSI C?
32.
33.
42.
15.
36. How many variables can be initialized at a time?
one
two.
Five
any number of variables
37. Which of the following statement is valid?
5+5=a
ss=12.25;
st=m * b;
is = A+ 10;
38. __________ refers to the accuracy of the calculations.
Integrity.
Clartiy
Simplicity
Modularity
39. The variable name can be started with__________. A.
underscore symbol (_).
asterisk symbol(*).
ampersand symbol(&)
minus symbol(-).
40. What is the value of sizeof(char)?
1.
0.
-1.
-2.
41. ______ decides which operator is to be used first.
Hierarchy
Priority
ladder
Precedence
42. The & operator displays________.
address of the variable.
value of the variable
result of the variable
both (a) & (b).
43. Addition of two numbers is performed using _________.
arithmetic operator.
logical operator.
unary operator.
comma operator.
44. What is the value of 10%8?
8.
2.
1.
0.
45. What is the result of the expression (10/3)*3+5%3?
11.
10.
8.
1.
46. What is the result of the expression (23*2) % (int) 5.5?
2.
1.
3.
0.
47. What is the result of 5/2?
4.
8.
2.
5.
48. What is the result of 5&&2?
0.
1.
2.
5.
49. Which function is appropriate for accepting a string?
gets().
getch().
getche().
scanf().
50. What is the ASCII range for 0 to 9 digits?
48 to 57.
65 to 90
97 to 122.
86 to 93.
Submit