
PSAP
Quiz
•
Education
•
University
•
Hard

Om Gujarathi
Used 2+ times
FREE Resource
Enhance your content
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
int main()
{
int a = 1, b = 0, c;
if (a && (b = 1))
c = 1;
else
c = 0;
printf("%d", c);
return 0;
}
0
1
Compilation error
Garbage Value
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
void main()
{
for ( ; ; ){
printf("Hello World");
}
}
Infinite Loop
No Output
Compilation Error
Hello World
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many times dot will be printed in the below Code Snippet?
#include "stdio.h"
void main()
{
unsigned int s = 5;
while (s >= 0)
{
printf(".");
s--;
}
}
Print dot 5 times
Print dot 4 times
Print dot 6 times
Infinite times
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
void main()
{
int 1_a = 0;
int 2_b = 0;
if(1_a == 2_b)
printf("Same");
else
printf("Different");
}
Same
Different
Compilation Error
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
void main()
{
int x = 5, y = 2;
float p, q;
p = x / y;
q = (float)x / y;
printf("%.2f %.2f\n", p, q);
}
2.000000 2.000000
2.00 2.50
2.50 2.00
2.0 2.5
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
void main()
{
int a, b, c, d, e, f;
a = 8, b = 4, c = 2, d = 1, e = 5, f = 20;
printf("%d", a + b - (c + d) * 3 % e + f / 9);
}
10
14
6
0
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the following code snippet?
#include "stdio.h"
void main()
{
int happy = 15, sad = 4;
happy = happy + sad - (sad = happy);
printf("%d %d", happy, sad);
}
15 4
4 15
Compilation Error
15 15
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
11 questions
Python Variable and Datatype Quiz
Quiz
•
University
12 questions
python 1 занятие ЭСТб
Quiz
•
1st Grade - University
10 questions
AD-SESION_4-USA-G35
Quiz
•
University
16 questions
Sestr GamePr №25 Test
Quiz
•
University
12 questions
Квіз з програмування: Вказівники та динамічна пам'ять
Quiz
•
University
10 questions
String in C
Quiz
•
University
10 questions
III Part 3
Quiz
•
University
11 questions
OOAD Quiz 4
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Education
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University