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

application attempts to perform an operation?

1959


Can variables be declared anywhere in c?

1072


What is clrscr in c?

1123


Why main is not a keyword in c?

1232


Where are c variables stored in memory?

1054


What are the difference between a free-standing and a hosted environment?

1271


What are the types of c language?

1016


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2853


What is the meaning of ?

1020


How do c compilers work?

1106


please explain every phase in the "SDLC" in the dotnet.

2596


Define Spanning-Tree Protocol (STP)

1111


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1935


develop algorithms to add polynomials (i) in one variable

2147


What is an lvalue in c?

1111