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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bubble sort technique in c?

1039


Why is structure padding done in c?

1192


How important is structure in life?

1146


The __________ attribute is used to announce variables based on definitions of columns in a table?

1253


writ a program to compare using strcmp VIVA and viva with its output.

2083


What are the back slash character constants or escape sequence charactersavailable in c?

1231


can we have joblib in a proc ?

2386


Tell us two differences between new () and malloc ()?

1275


How do you generate random numbers in C?

1246


What is pointers in c with example?

1138


What is the difference between functions getch() and getche()?

1139


What is #include called?

1101


What is an array? What the different types of arrays in c?

1253


what are the facialities provided by you after the selection of the student.

2331


What are the 5 types of organizational structures?

1133