void main()
{
static int i=5;
if(--i){
main();
printf("%d ",i);
}
}
Answer / susie
Answer :
0 0 0 0
Explanation:
The variable "I" is declared as static, hence memory for I
will be allocated for only once, as it encounters the
statement. The function main() will be called recursively
unless I becomes equal to 0, and since main() is recursively
called, so the value of static I ie., 0 will be printed
every time the control is returned.
| Is This Answer Correct ? | 4 Yes | 5 No |
how can i cast a char type array to an int type array
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
what is oop?
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
plz send me all data structure related programs
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
Who could write how to find a prime number in dynamic array?