CPP Variable Naming Rules MCQ

  1. Home
  2. Tutorials
  3. Cpp
  4. Variable Naming Rules
  5. Multiple Choice Question

(1) One variable name can be declared with how many data types ?

A) One
B) Two
C) Three
D) Multiple

(2) A well defined variable name should be.

A) Detailed
B) Explained
C) Descriptive
D) None

(3) Which of the following is not allowed in between variable name ?

A) Alphabet
B) Number
C) Underscore
D) Space

(4) A variable name length can be upto _____ characters in C++

A) 21
B) 31
C) 41
D) 51

(5) Which of the following is not allowed as first character of variable name in C++ ?

A) Alphabet
B) Space
C) Number
D) Underscroe

(6) Which of the following is valid variable name ?

A) speed
B) age
C) limit
D) All

(7) Which of the folowing is not a valid variable name?

A) age
B) int
C) _rank
D) speed
Login to TRACK of Comments.