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
Write a C program in Fibonacci series.
Are enumerations really portable?
What is the size of structure in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What does void main () mean?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is string function in c?
What is array of pointers to string?
What does the characters “r” and “w” mean when writing programs that will make use of files?
How can you draw circles in C?
How can I recover the file name given an open stream?
Is it better to use a macro or a function?
What is void c?
What is static volatile in c?