
Declaration and Initialization of Variables in C++

Quiz
•
Information Technology (IT)
•
University
•
Medium
Fatma Metwally
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are valid C++ data types?
decimal, bool, char, text
float, string, char, integer
number, int, character, void
d) int, double, bool, void
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for declaring a variable named age of type int and initializing it to 25?
age int = 25;
var age = 25;
a) int age = 25;
int age : 25;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types is used to represent characters in C++?
byte
double
boolean
c) char
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of an int data type in bytes ?
1 byte
2 bytes
4 bytes
8 bytes
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of a char data type in bytes on most systems?
1 byte
2 bytes
4 bytes
8 bytes
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types has the smallest size in bytes?
int
float
double
char
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types has the largest size in bytes?
int
double
float
char
Create a free account and access millions of resources
Similar Resources on Wayground
8 questions
Lab 4

Quiz
•
University
10 questions
Java Quiz 1 in tamil theme

Quiz
•
University
8 questions
Intro to JS: Variables & Values

Quiz
•
11th Grade - University
10 questions
Quiz Meet 1 Mini SC Programing

Quiz
•
University
10 questions
PRF192

Quiz
•
University
10 questions
Operasi Input & Output C++

Quiz
•
University
6 questions
Quiz Pengetahuan Tipe Data

Quiz
•
10th Grade - University
10 questions
Quiz on Basics of C

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade