Which of the following is a correct declaration of an integer variable in C?

C Programming Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Ramesh Varma
Used 1+ times
FREE Resource
48 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int 1x
int x1
float x1
char x1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of an int data type in C (assuming a 32-bit system)?
2 bytes
4 bytes
8 bytes
1 byte
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type would you use to store a single character?
int
float
char
double
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to declare a constant variable in C?
constant int x = 10
int const x = 10
const int x = 10
b and c
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? printf("%d", sizeof(char));
4
2
1
8
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid variable name in C?
var1
_var
1var
var_1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of an uninitialized local variable in C?
0
NULL
Garbage value
-1
Create a free account and access millions of resources
Similar Resources on Quizizz
45 questions
Computer Hardware and Software Review

Quiz
•
KG - University
50 questions
MIDTERM EXAMNINATION OF IT FUNDAMENTAL

Quiz
•
12th Grade
44 questions
Year 8 - End of Year Revision

Quiz
•
9th - 12th Grade
48 questions
Year 8 Revision quiz

Quiz
•
9th - 12th Grade
50 questions
Unit Review: Chapters 1-7

Quiz
•
9th - 12th Grade
50 questions
AP CS P 5.1

Quiz
•
10th Grade - University
48 questions
BTEC Fundamentals of Computer Systems (student questions)

Quiz
•
10th Grade - University
50 questions
Robotics I Fall Semester Test

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University