output of expression

prateeek12's Avatar, Join Date: Feb 2011
Newbie Member
what will be the output of the expression -:
x=4+2%-8
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Apply BODMAS
0
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
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..
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
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;
}
0
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
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...