Monday, January 25, 2010

Lpart4

#include< stdio.h >
main()
{
int a=1,b;
b=++a*2*++a;
printf("%d %d", a,b);
}
Output
3 18


in this program there's two preincrement for 'a'. So 'a' will be incremented two times before multiplication. So now a= 3. so b=3*2*3=18.

0 comments:

Post a Comment