What is the output of the following progarm?



#include<stdio.h>

main( )

{

int x,y=10;

x=4;

y=fact(x);

printf(ā€œ%d\nā€,y);

}



unsigned int fact(int x)

{

return(x*fact(x-1));

}

A. 24

B. 10

C. 4

D. none

Answer Posted / kalyan chukka

A.24

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is echo in c programming?

557


What are the advantage of c language?

550


Can you please explain the difference between strcpy() and memcpy() function?

602


What are the types of type specifiers?

621


What does the c in ctime mean?

567






What are the benefits of organizational structure?

571


What are reserved words?

654


What are the advantages and disadvantages of a heap?

707


What is the c value paradox and how is it explained?

573


Write a factorial program using C.

643


What are pointers? What are different types of pointers?

627


What is the newline escape sequence?

589


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

766


What are the difference between a free-standing and a hosted environment?

744


Can we change the value of constant variable in c?

572