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 / dhina
#include<stdio.h>
#include<conio.h>
void fact();
void main()
{
clrscr();
fact();
getch();
}
void fact()
{
int n,f;
scanf("%d",&n);
if(n==1)
{
return(1);
}
else
{
f=(n*fact(n-1));
printf("%d",f);
}
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Post New Answer View All Answers
Which is best linux os?
Why is c called c not d or e?
Why is c so powerful?
Why flag is used in c?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What is 1d array in c?
How can you find the exact size of a data type in c?
Is array a primitive data type in c?
How can a program be made to print the line number where an error occurs?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
How can I change the size of the dynamically allocated array?
Define the scope of static variables.
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
can anyone suggest some site name..where i can get some good data structure puzzles???
Whats s or c mean?