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
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
How can I use a preprocessorif expression to ?
Why does not c have an exponentiation operator?
Why cant I open a file by its explicit path?
Difference between MAC vs. IP Addressing
Under what circumstances does a name clash occur?
Differentiate between new and malloc(), delete and free() ?
what is event driven software and what is procedural driven software?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Can a local variable be volatile in c?
What are header files why are they important?
I came across some code that puts a (void) cast before each call to printf. Why?
What does int main () mean?
What is the right type to use for boolean values in c?
What are run-time errors?