Variables and Data Types in C

Quiz
•
Computers
•
12th Grade
•
Easy
Tamicia undefined
Used 2+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are correct?
Variables are empty spaces in memory used to store data
Examples of variables are 3num, $%date&time, 2age
Variable names should be concise and relate to the data that they are storing
When declaring variables, the data type is placed AFTER the variable name and not before
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are data types in C?
Float, data/time, int
Char, int, float, double
string, double, floater
Char, array, integer
Answer explanation
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following data can a variable declared as 'int' store?
2.55
0
30.0
30
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TRUE OR FALSE?
The printf function is used to INPUT data while the scanf function is used to OUTPUT data
TRUE
FALSE
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the format identifiers for the data types int, char and string respectively?
%d, %c, %lf
%s, %f, %d
%d, %c, %s
%f, %lf, %s
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct format for declaring a variable that stores integers?
variable_name, data_type, = 0;
data_type, variable_name, = 0;
=0;, variable_name, data_type
data_type, =0;, variable_name
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False? The float data type in C can store the numbers 31.0 and 31.678
FALSE
TRUE
8.
OPEN ENDED QUESTION
3 mins • 1 pt
You are provided with the following:
Data type is int
Variable name is sum
Starting value/initializer is set at 1
Use what was provided to perform a declaration
Hint: Remember to put the semi-colon at the end (;)
Evaluate responses using AI:
OFF
Similar Resources on Wayground
13 questions
APCSA Unit 3 Review

Quiz
•
9th - 12th Grade
10 questions
Kuis tipedata, flowchart informatima kelas X j4njang SMA

Quiz
•
9th - 12th Grade
10 questions
Python-Expressions#1

Quiz
•
12th Grade - University
10 questions
Python

Quiz
•
8th - 12th Grade
10 questions
Quiz - 3 Assignment, Increment & Decrement Operators in C

Quiz
•
12th Grade
10 questions
C Language Data Types

Quiz
•
12th Grade
10 questions
2.2.1 (d) Variables

Quiz
•
12th Grade
8 questions
Level 1 - week 1

Quiz
•
7th Grade - 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 Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade