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.



There are 21 people in a room. They have to form groups of 3 people each. How many combinations are..

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

More C Interview Questions

What does c mean in standard form?

0 Answers  


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

0 Answers   Wilco,


what is default constructor?

2 Answers   HCL,


What are keywords in c with examples?

0 Answers  


what type of errors are checked during compilation

3 Answers  


How would you sort a linked list?

1 Answers  


Why static variable is used in c?

0 Answers  


Should I learn c before c++?

0 Answers  


How can I generate floating-point random numbers?

0 Answers  


What the advantages of using Unions?

0 Answers   TISL,


hi send me sample aptitude papers of cts?

0 Answers  


Why does everyone say not to use scanf? What should I use instead?

0 Answers  


Categories