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
Explain the Difference between the New and Malloc keyword.
Give the rules for variable declaration?
What is modeling?
Explain why can’t constant values be used to define an array’s initial size?
Why calloc is better than malloc?
What is operator promotion?
What is the use of bit field?
What are the types of macro formats?
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.
Differentiate between declaring a variable and defining a variable?
Write a factorial program using C.
Distinguish between actual and formal arguments.
What is null pointer constant?
Explain is it better to bitshift a value than to multiply by 2?
what do you mean by inline function in C?