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

How is null defined in c?

660


What is string constants?

667


write a program in c language to print your bio-data on the screen by using functions.

6255


What is wrong with this declaration?

617


What is pointer to pointer in c?

640






Is it valid to address one element beyond the end of an array?

682


What is an array in c?

599


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

1962


Are there constructors in c?

602


Explain Function Pointer?

689


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

611


In a switch statement, explain what will happen if a break statement is omitted?

641


What is s in c?

623


Which header file should you include if you are to develop a function which can accept variable number of arguments?

817


Explain the use of fflush() function?

631