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

What is call by value in c?

1008


What is the use of extern in c?

1094


Compare interpreters and compilers.

1066


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1722


What happens if header file is included twice?

1152


program to convert a integer to string in c language'

2457


Give the rules for variable declaration?

1180


What is difference between %d and %i in c?

1241


what are non standard function in c

1916


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1259


Difference between constant pointer and pointer to a constant.

1149


How to delete a node from linked list w/o using collectons?

2782


What are data structures in c and how to use them?

1173


Explain two-dimensional array.

1080


Can a local variable be volatile in c?

994