
Data Types and Variables Quiz

Quiz
•
Information Technology (IT)
•
University
•
Medium
sasith Devin
Used 9+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following data types is used to store a single character in C?
float
void
int
char
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the typical size of an int data type in memory on a 32-bit system?
8 bytes
4 bytes
1 byte
2 bytes
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which keyword is used to declare a variable that can hold decimal values with single precision?
int
double
char
float
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
The void data type is primarily used for which of the following purposes?
To store a memory address.
To represent a value of zero.
To declare a variable that can hold any data type.
To specify that a function does not return a value.
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the primary difference in use between the float and double data types?
A double provides more precision than a float.
A float is a signed type, while a double is an unsigned type.
A double requires less memory than a float.
A float can store larger numbers than a double.
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
If a char variable is declared as unsigned char, what is the approximate range of values it can hold?
0 to 255
-128 to 127
-32768 to 32767
0 to 65535
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What will happen if you try to assign the value 3.14 to an int variable in C?
A compiler error will occur because of the data type mismatch.
The variable will store the value 3.14 without any changes.
The variable will store the value 3 and the value will be rounded up to 4.
The variable will store the value 3 and the fractional part will be truncated.
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
PENSAMIENTO ALGORÍTMICO

Quiz
•
University
30 questions
C++ Advanced Quiz

Quiz
•
University
32 questions
DISEÑO

Quiz
•
University
25 questions
Quiz về Lập trình và Ngôn ngữ Java

Quiz
•
University
30 questions
Midterm Exam: Qualitative Methods

Quiz
•
University
30 questions
Test de Algoritmos - PSeInt

Quiz
•
University
25 questions
Pyhton Debugging Questions

Quiz
•
University
25 questions
C++ Basics Quiz

Quiz
•
University
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 Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University