main()
{
static int ivar=5;
printf("%d",ivar--);
if(ivar)
main();
}

Answers were Sorted based on User's Feedback



main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }..

Answer / amit

In GCC compiler 54321 is the correct answer.

Is This Answer Correct ?    29 Yes 0 No

main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }..

Answer / suresh kallam

4 3 2 1 0

Is This Answer Correct ?    0 Yes 3 No

main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }..

Answer / sindhujah

4

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More C Interview Questions

what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }

9 Answers   HCL,


How does the C program handle segmentation faults?

2 Answers  


How can I recover the file name given an open stream?

0 Answers  


A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

2 Answers   Accenture,


is forign key will be unique key any table or not?

2 Answers  


What is the maximum no. of arguments that can be given in a command line in C.?

0 Answers   HCL,


Derive the complexity expression for AVL tree?

1 Answers  


Are global variables static in c?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

0 Answers   InterGraph,


Explain pointers in c programming?

0 Answers  


define c

6 Answers   HCL, TCS,


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


Categories