output of expression

Newbie Member
16Feb2011,18:44   #1
prateeek12's Avatar
what will be the output of the expression -:
x=4+2%-8
Go4Expert Founder
16Feb2011,20:06   #2
shabbir's Avatar
Apply BODMAS
Invasive contributor
17Feb2011,01:12   #3
lionaneesh's Avatar
Quote:
Originally Posted by prateeek12 View Post
what will be the output of the expression -:
x=4+2%-8
Use a C Program or simply search on google..
Mentor
18Feb2011,15:43   #4
xpi0t0s's Avatar
What do you think it will be?
What do you get if you run it in a C program?
Why do you think that asking here is easier and quicker than writing a C program to test it?
Code:
int main()
{
  int test=4+2%-8;
  printf("%d\n",test);
  return 0;
}
Invasive contributor
18Feb2011,18:29   #5
lionaneesh's Avatar
Quote:
Originally Posted by xpi0t0s View Post
What do you think it will be?
What do you get if you run it in a C program?
Why do you think that asking here is easier and quicker than writing a C program to test it?
Code:
int main()
{
  int test=4+2%-8;
  printf("%d\n",test);
  return 0;
}
Same is my question..
I want every-body to understand that simple problems can be solved by ourselves only ... we dont need it to post a new thread on a forum for such easy solutions..

As Einstein Said :-


I thanks all those who dint helped me because that's why i did it my self!!


Hope you understand...