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

int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]

6 Answers   Hughes,


Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.

1 Answers  


Why do we use & in c?

0 Answers  


How many types of functions are there in c?

0 Answers  


How many types of errors are there in c language? Explain

0 Answers  


What is the use of ?: Operator?

0 Answers  


What is a macro in c preprocessor?

0 Answers  


What is the o/p of the follow pgm? #include<stdio.h> main() { char char_arr[5]=”ORACL”; char c=’E’; prinf(“%s\n”,strcat(char_arr,c)); } a:oracle b. oracl c.e d.none

2 Answers   Oracle,


write a program to find out prime number using sieve case?

0 Answers   HCL,


while initialization of array why we use a[][2] why not a[2][]...?

0 Answers   Aptech,


What tq means in chat?

0 Answers  


Linked lists -- can you tell me how to check whether a linked list is circular?

0 Answers  


Categories