What will be the result of the following program?
char*g()
{
static char x[1024];
return x;
}
main()
{
char*g1="First String";
strcpy(g(),g1);
g1=g();
strcpy(g1,"Second String");
printf("Answer is:%s", g());
}
(A) Answer is: First String (B) Answer is: Second String
(C) Run time Error/Core Dump (D) None of these
Answers were Sorted based on User's Feedback
Answer / abhisheksingh462
Answer is "second string" because both handle same address
Is This Answer Correct ? | 2 Yes | 2 No |
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details
write a program in c language for the multiplication of two matrices using pointers?
How are pointers declared in c?
given post order,in order construct the corresponding binary tree
What is Your Name :)
define function
What is static volatile in c?
What does the error message "DGROUP exceeds 64K" mean?
What is calloc in c?
What is a memory leak? How to avoid it?
What are the advantage of c language?