Difference between static global and global?

Answer Posted / rakesh

Static global has file scope and it can't be accessed
outside of the file.
while global has program scope and can be accessed
outside of file in which it has been defined using extern
keyword.

Is This Answer Correct ?    139 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c++ still best?

564


What are static variables?

625


What is a volatile variable in c++?

571


What is object in c++ wikipedia?

575


What is the rule of three?

576






What is abstraction with real time example?

629


Why do we use double in c++?

606


How does com provide language transparency?

612


Is c++ pass by reference or value?

577


What are friend classes? What are advantages of using friend classes?

615


Explain explicit container.

643


What is lambda expression c++?

584


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2543


What is the purpose of ios::basefield in the following statement?

798


Can a program run without main function?

626