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 / jagadeesh
#include<stdio.h>
long int fact(long int n);
void main()
{
long int p;
p=fact(21)/(fact(18)*fact(3));
printf("%ld",p);
}
long int fact(long int n)
{
if(n==0||n==1)
return 1;
else
return n*fact(n-1);
}
| Is This Answer Correct ? | 6 Yes | 0 No |
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
what is the code of the output of print the 10 fibonacci number series
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
why array index always strats wuth zero?
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
how to check whether a linked list is circular.
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
main() { extern out; printf("%d", out); } int out=100;
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
main() { clrscr(); } clrscr();
What is full form of PEPSI