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...

There are 21 people in a room. They have to form groups of 3
people each. How many combinations are possible? Write a C
program to print the same.

Answer Posted / jeeva kumar

#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int i,n,a,b,c=1,d=1;
printf("Enter the tot no of people");
scanf("%d", &n);
printf("In how many they have to form group");
scanf("%d", &a);
b=a;
for(i=0;i<b;i++)
{
c*=n;
d*=a;
n--;
a--;
}

printf("%d",c/d);
getch();
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational

1316


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1556


What do header files do?

1077


What will be your course of action for a push operation?

1112


Process by which one bit pattern in to another by bit wise operation is?

1163


What is malloc and calloc?

1055


What are the types of variables in c?

1022


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1242


Can you write the function prototype, definition and mention the other requirements.

1137


Do you know pointer in c?

1052


What is a macro?

1108


Define Array of pointers.

1108


Describe the order of precedence with regards to operators in C.

1047


Explain what is wrong with this program statement? Void = 10;

1263


What are the features of the c language?

1086