Tuesday, March 15, 2011

if function result

# include "stdio.h"
int x=0;
i= 65;
j = 100;
int y,z;

void main()
{
if(x==0)
y=i;
else
y=j;

if(x)
z=i;
else
z=j;

printf("y=%d z=%d\n",y,z);

}

OUTPUT:

y=65 z=100
Press any key to continue . . .

No comments:

Post a Comment