
C Programming Quiz
Authored by Ebenesar J
Computers
12th Grade - University
Used 698+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
hi
hello
no
error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x == 0)
printf("inside if\n");
else
printf("inside else if\n");
else
printf("inside else\n");
}
inside if
inside else if
inside else
compile time error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x >= 0)
printf("true\n");
else
printf("false\n");
}
Depends on the compiler
No print statement
True
False
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The switch statement takes a given integer value then seeks a matching value among a number of _______ statements.
break
case
switch
goto
5.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
How many loops are there in C
1
3
2
4
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is an exit control statement
for
while
do while
continue
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
The value of i after the execution of the following segment is
i = 2;
for( i=0; i>10; i=i+1);
1
2
0
11
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
22 questions
Steve Jobs
Quiz
•
6th - 12th Grade
20 questions
basisdata1
Quiz
•
University
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
18 questions
Memory-Mobo-Hard/Software
Quiz
•
University
16 questions
Digital Icons
Quiz
•
12th Grade - University
20 questions
PARC Linux Basic Part 2
Quiz
•
University
18 questions
SQL Quiz
Quiz
•
University
19 questions
Portas Lógicas (Gates - George Boole)
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade