In the last set of MCQs, we were introduced to C++ Basics. There, we have discussed some questions. This set of multiple choice questions focuses on the C++ Variables.

Firstly, read all the questions and after that select the appropriate option. Moreover, each question contains four options, out of them only one option will be correct. If you fail to select the correct option, don’t worry, you can try again at the end (by refreshing the page). You can use Previous and Next button to switch to a different set of questions.

c++ variables


TEST INSTRUCTIONS: Click on options to see the answer.

Now, start attempting the quiz.

#1. The ___ reveals the hidden scope of a variable.

#2. What is the value of variable z when the following program segment ends?
int z;
for(z=0; z<50; z++) {}

#3. Which variable does equals in size with enum variable?

#4. The operator that denotes address of a variable in C++ program is

#5. In ___ a local variable is defined within a block.

#6. Which of the following can be used to initialize a newly declared variable from an existing variable?

#7. The variables that are used to represent individual array element in an array is called as

#8. variable= expression; Which one is evaluated first?

#9. Static variables are associated with the class itself rather than with any class object, they are also known as ___.

#10. A variable is a symbol that represents

#11. Which of the following gives the memory address of integer variable a?

#12. The variables declared inside the class are known as ____.

#13. The other name for external variables in C++ is

#14. At what time a variable comes into existence in memory, is determined by its __________.

#15. Which of the following notation compares two variables X and Y?

#16. Which of the following is false regarding variable?

#17. Because the lifetime of a local variable is limited and determined automatically, these variables are also called ___.

#18. The variables that can be used only within the function in which it is declared is called as

#19. The variable that contains address of another variable is called as

#20. Which one of the following is correct regarding variable?



<< Prev- C++ MCQs : C++ Basics

>> Next- C++ MCQ : C++ Keywords

Don’t forget to explore all the topics of C++ programming. Here, is the complete set of Multiple Choice Questions and Answers. These question sets are very helpful in preparing for Competitive Exams and University level exams.

For frontend projects, check and implements these beginner’s friendly projects :- TOP 7 PROJECTS FOR BEGINNERS TO PRACTICE HTML & CSS SKILLS

Want backlinks to your website? Follow this article and get to know in very easy way. How You Can Create High Quality Backlinks In 2021?


Do practice of HTML questions :- Multiple choice questions on HTML

Do practice of C programming :- Multiple choice questions on C programming

All the answers in this set are correct. But in case, you find any typographical, grammatical or any other error in our site then kindly inform us. Don’t forget to provide the appropriate URL along with error description.

Thanks in advance.

For discussion about any question, join the below comment section. And get the solution of your query.

Leave a Comment

Your email address will not be published. Required fields are marked *