1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

output of expression

Discussion in 'C' started by prateeek12, Feb 16, 2011.

  1. prateeek12

    prateeek12 New Member

    what will be the output of the expression -:
    x=4+2%-8
     
  2. shabbir

    shabbir Administrator Staff Member

    Apply BODMAS
     
  3. lionaneesh

    lionaneesh New Member

    Use a C Program or simply search on google..
     
  4. xpi0t0s

    xpi0t0s 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;
    }
    
     
  5. lionaneesh

    lionaneesh New Member

    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...
     

Share This Page