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


Please Help Members By Posting Answers For Below Questions

Explain the Difference between the New and Malloc keyword.

674


Give the rules for variable declaration?

661


What is modeling?

632


Explain why can’t constant values be used to define an array’s initial size?

843


Why calloc is better than malloc?

561






What is operator promotion?

615


What is the use of bit field?

623


What are the types of macro formats?

594


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1554


Differentiate between declaring a variable and defining a variable?

596


Write a factorial program using C.

629


Distinguish between actual and formal arguments.

577


What is null pointer constant?

581


Explain is it better to bitshift a value than to multiply by 2?

697


what do you mean by inline function in C?

604