
C Programming Quiz

Quiz
•
Computers
•
Professional Development
•
Medium
AKHILA P
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the correct way to declare an integer variable in C?
int 1number;
int number1;
number int;
int ; number1
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is the correct syntax for a for loop in C?
for (i = 0; i < 10; i++)
for (i < 10; i++)
for i = 0; i < 10; i++
for (i = 0; i < 10)
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you access the third element of an array named arr in C?
arr[2]
arr[3]
arr(3)
arr{3}
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a valid if statement in C?
if x > 10
st1;
if (x > 10)
{
st1;
}
if (x > 10);
st1;
if x > 10
{
st1;
}
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which library is required to use the strlen function?
stdlib
stdio
string
ctype
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code? for (int i = 0; i < 5; i++) { printf("%d ", i); }
0 1 2 3 4
1 2 3 4 5
0 1 2 3 4 5
error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is the correct syntax for a while loop in C?
while (condition) { statement; }
while condition { statement; }
while (condition) statement;
while { condition; }
Create a free account and access millions of resources
Similar Resources on Wayground
19 questions
Python Basic

Quiz
•
Professional Development
25 questions
python if-elif-else

Quiz
•
Professional Development
20 questions
Pre-Assessment: Java Basics

Quiz
•
Professional Development
20 questions
แบบทดสอบภาษาซี

Quiz
•
Professional Development
20 questions
Array Data Structure Quiz for Beginners

Quiz
•
Professional Development
15 questions
SLG IPC144 Week 11

Quiz
•
Professional Development
16 questions
Think it through

Quiz
•
University - Professi...
15 questions
C PROGRAMMING BASICS-QUIZ-1

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade