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...

What are Storage Classes in C ?

Answer Posted / veda

example of global variable----

#include<stdio.h>

int a; /***global variable*********/

void main()
{
int s;
printf("\n enter the value of a--");
scanf("%d",&a);
s=a+3;
printf("\n s=%d",a);

mul(); /****another function********/

getch();


void mul()
{
int m;

m=a*2;

printf("\n m=%d",a);
}


output---
enter the value of a----5

s=8

m=10


when u r compaing this program in lnux we get a waring
because in linux default type is integer so in calling
function we r giving void so internally compailer treate as
a int so,
here type declaration is impartent

Is This Answer Correct ?    21 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope rule in c?

1070


What is a MAC Address?

1063


Multiply an Integer Number by 2 Without Using Multiplication Operator

768


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2474


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1005


What is the difference between malloc() and calloc() function in c language?

1081


How does normalization of huge pointer works?

1172


What are the __date__ and __time__ preprocessor commands?

1119


Why c is called object oriented language?

1072


What is clrscr in c?

1137


How many header files are in c?

1038


What is f'n in math?

1070


ATM machine and railway reservation class/object diagram

5253


What are the advantages of the functions?

1162


Explain how can you tell whether a program was compiled using c versus c++?

1103