
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
20 questions
Array Data Structure Quiz for Beginners

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

Quiz
•
Professional Development
22 questions
C-4 CHAPTAR -1

Quiz
•
Professional Development
20 questions
C Programming Quiz

Quiz
•
Professional Development
15 questions
SLG IPC144 Week 11

Quiz
•
Professional Development
20 questions
first round quiz

Quiz
•
Professional Development
20 questions
C Code Master

Quiz
•
Professional Development
16 questions
Think it through

Quiz
•
University - Professi...
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade