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
Answer Posted / kalyan chukka
The Answer is Second String
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Explain null pointer.
What is linear search?
Explain indirection?
difference between object file and executable file
Can you pass an entire structure to functions?
What is the sizeof () operator?
Explain what is the heap?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What are integer variable, floating-point variable and character variable?
What is bash c?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is graph in c?
Is it possible to pass an entire structure to functions?
Function calling procedures? and their differences? Why should one go for Call by Reference?
Can we increase size of array in c?