Quiz on Basics of C
Quiz
•
Computers
•
University
•
Hard
Michael Kona
Used 24+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{ int x = 5;
if (true);
printf("hello");
}
a) It will display hello
b) It will throw an error
c) Nothing will be displayed
d) Compiler dependent
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int x;
void main()
{
if (x)
printf("hi");
else
printf("how are u");
}
a) hi
b) how are you
c) compile time error
d) error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the following code fragment write to the monitor?
int sum = 14;
if ( sum < 20 )
System.out.print("Under ");
else
System.out.print("Over ");
System.out.println("the limit.");
Under
Over.
. Under the limit
Over the limit.
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int main()
{
int a = 25%10;
printf("%d", a);
return 0;
}
5
2
2.5
5.5
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
!= is the example of ____________________ operator.
Relational
Logical
Assignment
Conditional
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
24
3
23
4
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int x = 15;
x=+5;
printf("x value is: %d",x);
Error
x value is: 20
x value is: 15
None of these
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
15 questions
Let's Check!
Quiz
•
12th Grade - Professi...
10 questions
Objektumok kezelése, hozzáférés szabályozás, ..
Quiz
•
University
10 questions
Prueba de Algoritmo y Programación
Quiz
•
University
10 questions
Python 2
Quiz
•
University
10 questions
Week 1 Recap
Quiz
•
University
10 questions
Bayesian Intro UPJNVJ
Quiz
•
University
10 questions
1.- Ondas
Quiz
•
1st Grade - University
13 questions
DS UNIT-2 TEST-2
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
22 questions
FYS 2024 Midterm Review
Quiz
•
University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
12 questions
1 Times Tables
Quiz
•
KG - University
20 questions
Disney Trivia
Quiz
•
University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University