
C PROGRAMMING Practice Test
Quiz by Pooja Puri
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
Who invented C
Dennis Ritchie
Ken Thompson
Richard Ritchie
Dennis Beckham
30s - Q2
Evaluate the equation and assume the variable to be an integer
y=5*6/2+6-12%3&&7||5
15
21
1
12
30s - Q3
output of the program will be
10 0
10 10
0 10
10 15
30s - Q4
Output is
asaio
saio
ahaio
haio
30s - Q5
hexadecimal of 110011010110
CC6
CD6
DC6
BC6
30s - Q6
To print out a and b given below, which of the following printf() statement will you use?
#include<stdio.h>
int main()
{float a=3.14;double b=3.14;}
printf("%f %Lf", a, b);
printf("%f %lf", a, b);
printf("%Lf %Lf", a, b);
printf("%Lf %f", a, b);
30s - Q7
output will be
65a
A65
6565
65A
30s - Q8
convert into binary 457
111001001
111101001
1111110111
111110101
30s - Q9
output is
A65
64A
6465
65A
30s - Q10
1. What is the output of this C code?
int main() { int i = -5; int k = i %4; printf("%d\n", k); }
none
1
Compile time error
-1
30s - Q11
What is the value of x in this C code? int main() { int x = 4 *5 / 2 + 9; }
19
1.85
3
6.75
30s - Q12
Which of the following is not an arithmetic operation?
a %= 40;
a /= 30;
a != 50;
a *= 20;
30s - Q13
What is the output of this C code?
int main() { int a = 20; double b = 15.6; int c; c = a + b; printf("%d", c); }
36
35
30
35.6
30s - Q14
What is the output of this C code?
int main() { int x = 2, y = 2; x /= x / y; printf("%d\n", x); return 0; }
-2
2
0.5
undefined
30s - Q15
Array is ______ datatype in C Programming language.
Custom data type
Primitive data type
None
Derived data type
30s