what are the stoge class in C and tel the scope and life time
of it?
Answers were Sorted based on User's Feedback
Answer / anudeep gongadi
1.automatic: the scope is within the function
2.extern: if variable is declared with extern, then that
variable is there in another program.and it can be used in
current program.
3.static: they are initialised only once.
4.register: limited memory is reserved for registers.
for faster access off data and computations, we mae use of
registers.
| Is This Answer Correct ? | 8 Yes | 2 No |
application of static variables in real time
#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); }
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Should I learn c before c++?
CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION.
What compilation do?
7 Answers Geometric Software, Infosys,
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4
Can the size of an array be declared at runtime?
Tell me what is the purpose of 'register' keyword in c language?
How to write the code of the program to swap two numbers with in one statement?
What are run-time errors?
What is the -> in c?