| Question |
what will be the result of the following program ?
char *gxxx()
{
static char xxx[1024];
return xxx;
}
main()
{
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is :
%s",gxxx());
}
a) The string is : string
b) The string is :Oldstring
c) Run time error/Core dump
d) Syntax error during compilation
e) None of these
|
|
Question Submitted By :: Guest | |
I also faced this Question!! |
Rank |
Answer Posted By | | |
Answer | oldstring  |
| Abhiraj | | | | View All Answers | | |
|