Which of the following is the correct syntax to declare a variable in C?

C Programming Quiz

Quiz
•
Other
•
University
•
Hard
Anamika Pandey
Used 1+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int variable;
int variable:
var int variable;
integer variable;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type is used to store a single character in C?
int
float
char
double
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?int x = 5; printf("%d", x++);
4
5
6
Compilation error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? int a = 10, b = 5; printf("%d", a % b);
5
0
2
Compilation error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to access the address of a variable?
*
&
%
$
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid identifier in C?
2ndValue
first_value
float
#define
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which format specifier is used to print a floating-point number?
%d
%c
%f
%s
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
TECHTRIX2025 BUGHUNT SET6

Quiz
•
University
17 questions
Basics of Programming with C

Quiz
•
University
16 questions
Data Structures Prelimes

Quiz
•
University
20 questions
C Programming Structures Quiz

Quiz
•
University
20 questions
CodeMavarick

Quiz
•
University
13 questions
C Programming Concepts

Quiz
•
University
12 questions
C++ Programming Language

Quiz
•
University
20 questions
Round 3

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade