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
How can you access memory located at a certain address?
What is pointer to pointer in c?
how to write a c program to print list of fruits in alpabetical order?
What is structure padding in c?
What is the heap?
What is main () in c language?
What are the types of data files?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Why is it that not all header files are declared in every C program?
Explain 'bus error'?
Explain what is a program flowchart and explain how does it help in writing a program?
What is the collection of communication lines and routers called?
What is a pointer value and address in c?
Is int a keyword in c?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none