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's the best way of making my program efficient?
will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);
Differentiate between calloc and malloc.
What is period operator in c?
x=y=z=1 z=++x||++y&&++z Printf("%%%d";xyz) what is the values of x,y and z?????
write a programe to find the factorial of given number using recursion
How can this be legal c?
main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); }
27 Answers Advent Global Solutions, CitiGroup, Valeo Lighting Systems India Private Limited, Vishal Transformers, Wipro, Zencer,
Give the rules for variable declaration?
WAP – represent a char in binary format
String concatenation
What is call by value in c?