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
Why clrscr is used in c?
Explain the array representation of a binary tree in C.
Find MAXIMUM of three distinct integers using a single C statement
Is return a keyword in c?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Can we change the value of #define in c?
Explain about C function prototype?
List the variables are used for writing doubly linked list program.
What is the description for syntax errors?
What is #line used for?
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
Does c have circular shift operators?
How is a null pointer different from a dangling pointer?
What is static memory allocation? Explain
What are disadvantages of C language.