What does this symbol's mean in C ?

Discussion in 'Programmer's Corner' started by ValarVictorius, Apr 1, 2016.

  1. ValarVictorius

    Thread Starter New Member

    Nov 17, 2015
    15
    0
    [​IMG]
    How this symbols make this result ? What do that mean in C ?
     
  2. ISB123

    Well-Known Member

    May 21, 2014
    1,239
    527
    It means that process has returned 0. Look at line 18 in code. Basically its saying that code has done its job and is finished.
     
  3. ValarVictorius

    Thread Starter New Member

    Nov 17, 2015
    15
    0
    Yes, i know what this program make result. But i am asking line 8-12 ?
     
  4. ValarVictorius

    Thread Starter New Member

    Nov 17, 2015
    15
    0

    Yes, i know what this program make result. But i am asking lines 8-12 ?
     
  5. ISB123

    Well-Known Member

    May 21, 2014
    1,239
    527
  6. vpoko

    Member

    Jan 5, 2012
    258
    47
    Lines 8 through 10 are bitwise operators (they operate on each bit of your two variables: the least significant bit of x gets compared to the least significant bit of y, the second least significant bits get compared, etc) and the result depends on the operation. & is and, | is or, and ^ is xor.

    Lines 11 and 12 are bit shift operators. When you shift to the left, for example, your most significant bit gets dropped off, your second most significant bit becomes your most significant bit, and so on, and a 0 becomes your least significant bit. Same but opposite for right shift.
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    Well, that's what happens when you are so non-specific about what you are asking about. You make people have to guess or read your mind.
     
  8. MrSoftware

    Active Member

    Oct 29, 2013
    500
    122
    ValarVictorius likes this.
  9. ValarVictorius

    Thread Starter New Member

    Nov 17, 2015
    15
    0
    Thank you guys. ;)
     
Loading...