
C basics

Quiz
•
Computers
•
University
•
Medium
Jeyantha 2696
Used 5+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
CSSE Quiz Day2

Quiz
•
University
15 questions
C programming

Quiz
•
University
10 questions
CIS1101-programming practice2

Quiz
•
University
13 questions
#include <\c>

Quiz
•
University
12 questions
C++ Basics (1)

Quiz
•
University
10 questions
2025 python class first quiz

Quiz
•
9th Grade - University
15 questions
PyTron

Quiz
•
University
15 questions
Python introduction

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University