main()
{
static int var = 5;
printf("%d ",var--);
if(var)
main();
}
Answer / susie
Answer :
5 4 3 2 1
Explanation:
When static storage class is given, it is
initialized once. The change in the value of a static
variable is retained even between the function calls. Main
is also treated like any other ordinary function, which can
be called recursively.
| Is This Answer Correct ? | 50 Yes | 22 No |
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }
write the function. if all the character in string B appear in string A, return true, otherwise return false.
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
21 Answers ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above
void ( * abc( int, void ( *def) () ) ) ();