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

Why clrscr is used in c?

955


Explain the array representation of a binary tree in C.

1166


Find MAXIMUM of three distinct integers using a single C statement

1014


Is return a keyword in c?

1030


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1044


Can we change the value of #define in c?

958


Explain about C function prototype?

1026


List the variables are used for writing doubly linked list program.

1967


What is the description for syntax errors?

1096


What is #line used for?

990


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1152


Does c have circular shift operators?

1183


How is a null pointer different from a dangling pointer?

974


What is static memory allocation? Explain

1033


What are disadvantages of C language.

1101