Friday, March 5, 2010

51

char ch(char a,char b)
{
if(a,b)
return a;
else
return b;
}
int main()
{
char a='s',b='t';
char *p=&a;
char c;
c=ch(a++,++*(*(&p)));
printf("\n %c",c);
return 0;
}

Output

t

Logic:
Know what is &,* operator
post increment

0 comments:

Post a Comment