Difference between static global and global?
Answer Posted / ravi.g
local static variable and global variable both are same
since both can be accessed from all the functions in the
same file in which they declared.
Global variable has the file scope since it can be accessed
from other files also by using extern keyword.
Local static vaeriables have no file scope since they can
not be accessed from other files by any means.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is the use of map in c++?
Is c++ the best programming language?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
How do you declare A pointer to a function which receives nothing and returns nothing
What would happen on forgetting [], while deallocating an array through new?
How does the copy constructor differ from the assignment operator (=)?
What are different types of loops in c++?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
How important is c++?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
How did c++ start?
Should I learn c or c++ first?
Write my own zero-argument manipulator that should work same as hex?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
What do you mean by funtion prototype?