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
What is an undefined reference/unresolved external symbol error and how do I fix it?
Is c++ a float?
What is the basic concept of c++?
What is c++ course?
what kind of projects are suitable for c and c++
How we can differentiate between a pre and post increment operators during overloading?
Is c++ a difficult language?
Is c++ slower than c?
What is a string example?
Is c++ vector dynamic?
What relational operators if statements in c++?
How java is different from c and c++?
What is ctime c++?
What do the header files usually contains?
What is the latest version on c++?