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 / 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 |
write a C and C++ programme to implement the A,bubble sort B,quick sort C,insertion sort D,sequential search E,binary search
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
What is a MAC Address?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is a Deque?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
How can I make a program in c to print 'Hello' without using semicolon in the code?
9 Answers C DAC, Practical Viva Questions,
main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); }
How pointer is benefit for design a data structure algorithm?
What is the use of sizeof?