What is the output of below code?
main() { static int a=5; printf("%3d",a--); if(a) main(); }



What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main..

Answer / vikas

output is 5 4 3 2 1

Is This Answer Correct ?    11 Yes 2 No

Post New Answer

More C Interview Questions

if we take a number as a char then can we manipulate(add, subtract) on this number

2 Answers  


Which of the following are valid "include" formats? A)#include and #include[file.h] B)#include (file.h) and #include C)#include [file.h] and #include "file.h" D)#include <file.h> and #include "file.h"

15 Answers   Accenture,


What is the purpose of the preprocessor directive error?

0 Answers  


Find greatest of two numbers using macro

4 Answers   Bosch, Siemens,


Write an interactive c program that will encode or decode a line of text. To encode a line of text, proceed as follows: Convert each character, including blank spaces, to its ASCII equivalent. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above exceeds N2, then subtract the largest possible multiple of N2 from this number, and add the remainder to N1. Hence the encoded number will always fall between N1 and N2, and will therefore always represent some ASCII character. Display the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding.

1 Answers   Amazon, CSJM, HCL, Microsoft, TCS, Wipro,


Two's compliment of -5

4 Answers   Adobe,


Explain how do you generate random numbers in c?

0 Answers  


where do we use volatile keyword?

1 Answers  


What is define c?

0 Answers  


Explain how do you print an address?

0 Answers  


print ur name without using any semicolon in c/c++....

21 Answers   Bosch, TCS, Wipro,


control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent

1 Answers  


Categories