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
sorry... I made a mistake in the previous 51.answer
i am very sorry...
the solution for recursion is...
long factorial(long n){
return (n==0 || n==1)?1:n * factorial(n-1);
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
What is pass by reference in functions?
What is the full form of getch?
What are the different types of data structures in c?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
What is c programing language?
Can main () be called recursively?
Write a program to print fibonacci series without using recursion?
What is this pointer in c plus plus?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
Can you write a programmer for FACTORIAL using recursion?
Why shouldn’t I start variable names with underscores?
What are c identifiers?
I heard that you have to include stdio.h before calling printf. Why?
Does c have class?