Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



What is the output of the following progarm? #include<stdio.h> main( ) { int x..

Answer / venu

ans:D.
when x= 1, x-1 =0, so total value = 0;
in fact() they are not checking if x==1 && x==0.

Is This Answer Correct ?    4 Yes 3 No

What is the output of the following progarm? #include<stdio.h> main( ) { int x..

Answer / kalyan chukka

A.24

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More C Interview Questions

totally how much header files r in c language

8 Answers   TCS,


What is the difference between array and structure in c?

0 Answers  


In C programming, how do you insert quote characters (‘ and “) into the output screen?

0 Answers  


Describe how arrays can be passed to a user defined function

0 Answers  


How Many Header Files in c?

2 Answers   TCS,


What functions are in conio h?

0 Answers  


What are header files in c?

0 Answers  


what are bps & baud rates? differentiate these two?

2 Answers   TCS,


What is f'n in math?

0 Answers  


what r the cpu registers r ther?

1 Answers  


Why is c so powerful?

0 Answers  


Q-1: Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college.

8 Answers  


Categories