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 assert and when would I use it?
What are qualifiers and modifiers c?
Which is an example of a structural homology?
Is linux written in c?
How are pointers declared in c?
What is the difference between union and anonymous union?
How do we make a global variable accessible across files? Explain the extern keyword?
What type of function is main ()?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What is structure packing in c?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
With the help of using classes, write a program to add two numbers.
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
Compare array data type to pointer data type
What does void main return?