int i = 2, j = 3, k, l ;
float a, b ;
k = i / j * j ;
l = j / i * i ;
a = i / j * j ;
b = j / i * i ;
printf( "%d %d %f %f", k, l, a, b ) ;
}
it is a simple c program from yashwant kanetkar but i could not relate to the answer . if we compile this program the output which i am getting is
0 2 0.00000 2.00000
this is a very simple program but i am not able to explain the output may be i am getting confused with the associativity. both / and * have L to R associativity and only / has unambiguous left operand (necessary condition for L to R associativity) it is performed earlier. but the answer is different in that case .