slove this problem
include<stdio.h >
include<conio.h >
void main()
{
int i=1;
printf("%d",i++ *++i);
getch();
}
if the ans is 3 explain it how;
there is a problem
it is found that the order of precedence of increment and decrement operator
with respect to other arithmetic operator is not well define.
in some computer the result may vary , it may be 3 and 4 both if we use torbo c++ for compilation. same for printing
printf("%d",i++ *++i*++i)
result is expected 18 by RL rule by in my torbo c it gives 12 ans
plz write if u have any rule to sort it out.
include<stdio.h >
include<conio.h >
void main()
{
int i=1;
printf("%d",i++ *++i);
getch();
}
if the ans is 3 explain it how;
there is a problem
it is found that the order of precedence of increment and decrement operator
with respect to other arithmetic operator is not well define.
in some computer the result may vary , it may be 3 and 4 both if we use torbo c++ for compilation. same for printing
printf("%d",i++ *++i*++i)
result is expected 18 by RL rule by in my torbo c it gives 12 ans
plz write if u have any rule to sort it out.
Comment