44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion?
Answer Posted / jessu srikanth
51.factorial of a number using recursion
long factorial(long n){
return (n==0 || n==1)?1:n*n-1;
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are the complete rules for header file searching?
Why do we use pointer to pointer in c?
What do the functions atoi(), itoa() and gcvt() do?
What are the three constants used in c?
How many types of sorting are there in c?
What is the size of a union variable?
How do c compilers work?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is the size of empty structure in c?
what are bit fields? What is the use of bit fields in a structure declaration?
What is the difference between #include and #include 'file' ?
What are different types of operators?
What are dangling pointers? How are dangling pointers different from memory leaks?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.