What are the different scope C++ provide ?



What are the different scope C++ provide ?..

Answer / Seema Gupta

In C++, there are four scopes: local (or block), class (member), namespace, and file (global). Local scope applies to variables defined within a block. Class scope applies to members of a class. Namespace scope is used to organize functions, classes, and variables in a logical manner. File scope applies to variables declared outside any function or class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Tell me about virtual function

2 Answers  


Define an Abstract class in C++?

1 Answers  


How to invoke a C function using a C++ program?

1 Answers   Alter,


What is the difference between an ARRAY and a LIST in C++?

2 Answers   IBS, TCS,


How will you print a list of all unique words from a string which may contain repeated words?

1 Answers   Adobe,


What is the 4 difference between delete[] and delete?

1 Answers   Alter,


Define type casting in C++.

1 Answers   Amdocs,


What is Boyce Codd Normal form?

1 Answers   IBS,


In C++ what is the meaning of data hiding?

1 Answers   Aricent,


Explain the difference between C and C++.

1 Answers   Accenture,


What is partial specialization or template specialization?

1 Answers   Amazon,


What kind of problems does name mangling cause?

1 Answers   Amazon,


Categories