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
why return type of main is not necessary in linux
Why is c called a structured programming language?
What is table lookup in c?
Can we declare a function inside a function in c?
What is %s and %d in c?
What are the general description for loop statement and available loop types in c?
How do you determine a file’s attributes?
What are the advantages of c preprocessor?
Explain what are the standard predefined macros?
Can you think of a logic behind the game minesweeper.
Is it better to use a macro or a function?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
What are the types of variables in c?
What is file in c preprocessor?
Explain the difference between call by value and call by reference in c language?