Difference between static global and global?
Answer Posted / sheela
hello...
what r all above said is false. global static also can
access using extern in other files.
file 1:
#include<stdio.h>
#include <conio.h>
#include "file2.c"
int a=10;
static int b=20;
main()
{
send();
}
file 2:
#include<stdio.h>
#include<conio.h>
void send()
{
extern int a;
extern int b;
printf("%d%d",a,b);
getch();
}
this program prints both a and b values.. then how can u
say global statics has file scope.
please if anybody knows correct answer give me.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How is static data member similar to a global variable?
Explain stack unwinding.
What is pure virtual function? Or what is abstract class?
Differentiate between late binding and early binding.
What are the comments in c++?
List different attributes in C++?
What are the characteristics of friend functions?
can any one help to find a specific string between html tags
which is changed to a sting..
weather.html looks (for location) is
When should we use container classes instead of arrays? What does count ++ do in c++? What are the advantages of using a pointer? Define the operators that can be used with a pointer. Difference between pointer to constant and constant pointer to a constant. Give example. What is math h in c++? Write about c++ storage classes? What is endl?