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
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
how many key words availabel in c a) 28 b) 31 c) 32
What will be the outcome of the following conditional statement if the value of variable s is 10?
How to implement a packet in C
Tell us bitwise shift operators?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Write the Program to reverse a string using pointers.
What is a scope resolution operator in c?
Explain how to reverse singly link list.
Why is it usually a bad idea to use gets()? Suggest a workaround.
can we have joblib in a proc ?
What is the use of gets and puts?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What does static variable mean in c?
What is meant by realloc()?