Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Define basic type of variable used for a different condition in C++?

1114


Why is "using namespace std;" considered bad practice?

1094


What is the difference between the parameter to a template and the parameter to a function?

1121


What is meant by forward referencing and when should it be used?

1009


Is arr and &arr are same expression for an array?

1053


What is implicit pointer in c++?

1077


Can you explicitly call a destructor on a local variable?

1028


Explain the difference between static and dynamic binding of functions?

1070


What kind of problems can be solved by a namespace?

1090


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

984


Explain the uses oof nested class?

1137


What is c++ iterator?

1137


What is c++ programming language?

1098


What is static in c++?

1055


Is c++ slower than c?

1033