What is the correct way to declare an integer variable in C?

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
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 Quizizz
16 questions
Final Assessment

Quiz
•
Professional Development
16 questions
Think it through

Quiz
•
University - Professi...
20 questions
Array Data Structure Quiz for Beginners

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

Quiz
•
Professional Development
25 questions
WOMANIA PRELIMS

Quiz
•
Professional Development
18 questions
C Language

Quiz
•
Professional Development
20 questions
Operators in C language

Quiz
•
Professional Development
15 questions
Interrupt-13

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade