
C basics
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Jeyantha 2696
Used 7+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You need to store the number of students and their average marks. Which declaration is best?
float students; int avgMarks;
int students; float avgMarks;
char students; float avgMarks;
double students; char avgMarks;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this program?
scanf should use %d instead of %f
age should be float
printf should come after scanf
No error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
10
20
1
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This code compiles but crashes: What’s wrong?
Wrong format specifier
Missing return statement
scanf missing & operator
Cannot read two inputs
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why does this code compile but produce no output?
No input
main is empty
printf() is missing
Code is invalid
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are identifiers in C?
Names used to identify variables, functions, arrays, etc.
Special symbols used to perform operations
Predefined keywords in the C language
Numbers used for looping
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What number will z in the sample code given below?
int z, x = 5, y = -10, a = 4, b = 2;
5
6
9
10
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
15 questions
PROBLEM SOLVING USING R UNIT I MCQS
Quiz
•
University
10 questions
TIU Quiz-9
Quiz
•
University
10 questions
Classification in Machine Learning2
Quiz
•
University
15 questions
OS Quiz-1
Quiz
•
University
10 questions
Asesmen Diagnostik Sistem Komputer
Quiz
•
10th Grade - University
10 questions
Tableau
Quiz
•
University
15 questions
python basics
Quiz
•
11th Grade - University
10 questions
Quiz CodeIgniter 4
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
