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

Explain how can type-insensitive macros be created?

954


What is bash c?

959


What is a buffer in c?

947


Write a program to identify if a given binary tree is balanced or not.

1091


Why pointers are used?

1023


What is c variable?

998


Explain heap and queue.

1011


What is the difference between if else and switchstatement

1842


What are qualifiers?

976


What is the difference between variable declaration and variable definition in c?

1015


What is the difference between Printf(..) and sprint(...) ?

1427


What is the use of void pointer and null pointer in c language?

1071


What is cohesion and coupling in c?

984


Is multithreading possible in c?

950


provide an example of the Group by clause, when would you use this clause

2128