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 can you create a virtual copy constructor?
Describe the advantage of an external iterator.
Explain rethrowing exceptions with an example?
What flag means?
Do the parentheses after the type name make a difference with new?
What does std mean in c++?
What causes a runtime error c++?
what are the decision making statements in C++? Explain if statement with an example?
How would you use the functions sin(), pow(), sqrt()?
What is the best free c++ compiler for windows?
What is meant by forward referencing and when should it be used?
Specify some guidelines that should be followed while overloading operators?
Write a program to find the Factorial of a number
What is a flag in c++?
What are c++ manipulators?