Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / abhiraj

oldstring

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we open a binary file in Read/Write mode in C?

1278


Can I initialize unions?

1092


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1372


What does %c do in c?

1052


Explain how do you determine a file’s attributes?

1092


What is build process in c?

1206


How can I copy just a portion of a string?

1368


Are enumerations really portable?

1079


How can I send mail from within a c program?

1078


Is it possible to have a function as a parameter in another function?

1130


What is derived datatype in c?

1145


What is the collection of communication lines and routers called?

1180


Did c have any year 2000 problems?

1157


What is define directive?

1215


What is static function in c?

1166