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

What is setf in c++?

1142


Explain selection sorting?

1125


What is #include cstdlib in c++?

1229


Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c

1331


What is the use of data hiding?

1064


What is c++ and its features?

1074


Can we use pointers in c++?

1111


Is c++ primer good for beginners?

1082


Why cstdlib is used in c++?

1093


Do we have to use initialization list in spite of the assignment in constructors?

1049


What are the extraction and insertion operators in c++? Explain with examples.

1251


How can you differentiate between inheritance and implementation in c++?

1269


Where do I find the current c or c++ standard documents?

1134


How delete [] is different from delete?

1050


What is the difference between #import and #include in c++?

1167