0% found this document useful (0 votes)
188 views2 pages

MCQs - Variables and Data Types

The document contains multiple-choice questions (MCQs) focused on variables and data types in C++. It includes questions about the definition of a variable, the type of information stored in a variable, and the validity of C++ declarations. Answers to the questions are provided at the end of the document.

Uploaded by

Sahil Mundel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
188 views2 pages

MCQs - Variables and Data Types

The document contains multiple-choice questions (MCQs) focused on variables and data types in C++. It includes questions about the definition of a variable, the type of information stored in a variable, and the validity of C++ declarations. Answers to the questions are provided at the end of the document.

Uploaded by

Sahil Mundel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C++

Variables and Data Types

MCQs
MCQs

Q1 - A variable precisely represents :


a) String b) Number
c) A location in memory d) nothing

Q2 - Information stored inside a variable is :


a) Data type b) Literal
c) Value d) Operator

Q3 - Which of the following C++ declarations is invalid?


a) bool var b) integer var
c) double var d) char var

Q4 - Which of the following holds alphanumeric using character encoding?


a) int b) bool
c) string d) decimal

Q5 - Which data type has 8 bytes of memory allocated and holds integers or real numbers?
a) int b) bool
c) double d) string

Answers:
Ans 1: c) A location in memory

Ans 2: c) Value

Ans 3: b) integer var

Ans 4: c) string

Ans 5: c) double

Cracking the Coding Interview in C++ - Foundation

You might also like