
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
15 questions
PowerShell 3.1-Tuberías (I)

Quiz
•
Professional Development
25 questions
C module 1 second quiz

Quiz
•
Professional Development
25 questions
C second module quiz

Quiz
•
Professional Development
15 questions
C Module 1 Quiz

Quiz
•
Professional Development
18 questions
CC 102-Computer Programming I

Quiz
•
Professional Development
20 questions
Examen de Python

Quiz
•
Professional Development
15 questions
Linked List

Quiz
•
Professional Development
20 questions
Apuntadores C

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development