DIR Return Create A Forum - Home
---------------------------------------------------------
techsuns
HTML https://techsuns.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: OutPut of a Program
*****************************************************
#Post#: 379--------------------------------------------------
what is the output of the program
By: vsr Date: December 10, 2012, 3:18 am
---------------------------------------------------------
assuming g() returns (int*) and type casting is done wherever is
required.....what is the output of the program...
g( )
{
static int x[1024]
return x;
}
main( )
{
char *g1="FIRST STRING";
strcpy(g( ),g1);
g1=g( );
strcpy(g1,"SECOND STRING");
printf("%s",g( ) );
}
#Post#: 380--------------------------------------------------
Re: what is the output of the program
By: kranthipls Date: December 10, 2012, 3:51 am
---------------------------------------------------------
@VSR It will be nice if you post questions that are not posted
before..............
#Post#: 386--------------------------------------------------
Re: what is the output of the program
By: kpr29 Date: December 10, 2012, 11:11 am
---------------------------------------------------------
@Kranthi: By the time V "thinks" and put the question u already
shared it and started ragging him......
kp.
*****************************************************