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
write a c program for swapping two strings using pointer
What do you mean by c what are the main characteristics of c language?
Describe wild pointers in c?
Which of these functions is safer to use : fgets(), gets()? Why?
What is function what are the types of function?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Difference between Function to pointer and pointer to function
What is a macro, and explain how do you use it?
Explain what is a stream?
What are header files and explain what are its uses in c programming?
Can you please explain the difference between syntax vs logical error?
What is array in c with example?
In C language what is a 'dangling pointer'?
What is meant by 'bit masking'?
Why does everyone say not to use gets?