What is the difference between global variables and local variable


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

Post New Answer

More C++ General Interview Questions

How to avoid changing constant values?

2 Answers   Symphony,


the first character in the variable name must be an a) special symbol b) number c) alphabet

0 Answers  


What are the differences between a struct and a class in C++?

7 Answers   Amazon, Wipro,


Are strings mutable in c++?

0 Answers  


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

0 Answers  


Find the second maximum in an array?

12 Answers   HCL,


class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list

2 Answers   Quark,


What do you mean by static variables?

0 Answers  


Why #include is used?

0 Answers  


What are virtual constructors/destructors?

0 Answers  


What is virtual base class?

0 Answers  


What are arrays c++?

0 Answers  


Categories