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 floating point constants?
What are the differences between Structures and Arrays?
can anyone please tell me wat is backlogs... i was looking for the job openings where i read this.. eligibility criteria minimum 70% in degree without backlogs. is that arrear.. if so is it standing arrear or history of arrears... please help me...
11 Answers CTS, Indian Navy, L&T, Microsoft, SSB, TCE, TCS,
How can you access memory located at a certain address?
write a “Hello World” program in “c” without using a semicolon?
what is data structure.in linear and non linear data structures which one is better?Explain
what is meant by the "equivalence of pointers and arrays" in C?
1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.
is c language is a object oreinted language?
How many header files are in c?
Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }
#include <stdio.h> void main() { int i=-1,j=1,k,l; k=!i&&j; l=!i||j; printf ("%d%d",k,l) ; }