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*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 / abhisheksingh462

Answer is "second string" because both handle same address

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of function is main ()?

1039


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1721


What is an lvalue in c?

1124


Dont ansi function prototypes render lint obsolete?

1125


What does a function declared as pascal do differently?

1126


Explain how can you check to see whether a symbol is defined?

1182


What does malloc () calloc () realloc () free () do?

1061


What is a protocol in c?

1001


What is malloc() function?

1157


Which node is more powerful and can handle local information processing or graphics processing?

1322


what do u mean by Direct access files? then can u explain about Direct Access Files?

2087


What is "Hungarian Notation"?

1110


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1134


What is self-referential structure in c programming?

1216


How can I find out if there are characters available for reading?

1109