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 / ajith

#include<stdio.h>

void main()
{
int a,s; /*** local variable****/
printf("\n enter the value of a---");
scanf("%d",&a);
s=a+2;
printf("s=%d",a);
getch();
}



output--

enter the value of a--- 5
s=7




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


///*********************************////

Is This Answer Correct ?    70 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1331


What is the return type of sizeof?

1115


What is variable and explain rules to declare variable in c?

1181


Can one function call another?

1175


What is the function of multilevel pointer in c?

1140


What are the restrictions of a modulus operator?

1167


Why does notstrcat(string, "!");Work?

1207


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1108


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1137


What is pointer to pointer in c with example?

1159


what is different between auto and local static? why should we use local static?

1171


Write a c program to demonstrate character and string constants?

2248


Explain what is the benefit of using const for declaring constants?

1090


Not all reserved words are written in lowercase. TRUE or FALSE?

1279


Why do we use return in c?

1050