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
What is meant by type casting?
Can you please explain the difference between malloc() and calloc() function?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Write a program for finding factorial of a number.
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
What is the difference between text and binary i/o?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
Can you please explain the difference between syntax vs logical error?
What is the difference between array and pointer in c?
Why can’t we compare structures?
What is pointers in c with example?
what are the 10 different models of writing an addition program in C language?
Explain zero based addressing.
What is switch in c?
What are the differences between Structures and Arrays?