What is scope in c++ with example?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.

2 Answers   Quark,


What are the rules for naming an identifier?

0 Answers  


What are the c++ access specifiers?

1 Answers  


Why can templates only be implemented in the header file?

0 Answers  


What is the difference between equal to (==) and assignment operator (=)?

0 Answers  


Describe the advantage of an external iterator.

0 Answers  


How many storage classes are available in C++?

1 Answers  


Explain binary search.

0 Answers  


What is flush () in c++?

0 Answers  


Explain unexpected() function?

0 Answers  


Is it possible to use a new for the reallocation of pointers ?

0 Answers  


How a new operator differs from the operator new?

0 Answers  


Categories