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?
Answers were Sorted based on User's Feedback
sorry... I made a mistake in the previous 51.answer
i am very sorry...
the solution for recursion is...
long factorial(long n){
return (n==0 || n==1)?1:n * factorial(n-1);
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sachin patil
44. strcpy copy the string while memcpy copy the memory
contains of locations.
46.fffffff0
49. int a = 5;
int b = 10;
a = a+b;
b = a-b;
a = a-b;
| Is This Answer Correct ? | 2 Yes | 0 No |
51.factorial of a number using recursion
long factorial(long n){
return (n==0 || n==1)?1:n*n-1;
}
| Is This Answer Correct ? | 0 Yes | 2 No |
What is difference between stdio h and conio h?
Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.
What is the c language function prototype?
int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain me output????
What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation
Explain the array representation of a binary tree in C.
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What are qualifiers and modifiers c?
How is actual parameter different from the formal parameter?
Why does not c have an exponentiation operator?
Why doesnt the call scanf work?
how to find the sizof of any datatype using bit manipulations