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
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is sizeof int in c?
Is python a c language?
Explain how do you list a file’s date and time?
write a program to rearrange the array such way that all even elements should come first and next come odd
What does 2n 4c mean?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
What does %p mean?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
can anyone suggest some site name..where i can get some good data structure puzzles???
What is the mean of function?
What is void main ()?
What is printf () in c?