Interview Questions   Tutorials   Discussions   Programs   Videos   

C++ - What is scope of a variable?




248
views
asked marvit August 18, 2014 10:42 AM  

What is scope of a variable?


           

1 Answers



 
answered By bhjahnavi   0  

A scope is a region of the program and broadly speaking there are three places, where variables can be declared:

  • Inside a function or a block which is called local variables,

  • In the definition of function parameters which is called formal parameters.

  • Outside of all functions which is called global variables.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  Question tags

c++ × 1

Asked 3 years and 5 months ago ago
Number of Views -248
Number of Answers -1
Last updated
3 years and 3 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert