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 setf in c++?
Explain selection sorting?
What is #include cstdlib in c++?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
What is the use of data hiding?
What is c++ and its features?
Can we use pointers in c++?
Is c++ primer good for beginners?
Why cstdlib is used in c++?
Do we have to use initialization list in spite of the assignment in constructors?
What are the extraction and insertion operators in c++? Explain with examples.
How can you differentiate between inheritance and implementation in c++?
Where do I find the current c or c++ standard documents?
How delete [] is different from delete?
What is the difference between #import and #include in c++?