Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Suk nta

@Suk nta
About
Posts
5
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Increment and Decrement Operators
    S Suk nta

    Thanks

    C / C++ / MFC question help tutorial

  • Increment and Decrement Operators
    S Suk nta

    I know increment and decrement operator depend on compiler. actually i had tried it in dev c++.

    C / C++ / MFC question help tutorial

  • Increment and Decrement Operators
    S Suk nta

    no no..in any compiler prefix operator execute first than postfix. postfix will execute after value returned or assigned to some variable..

    C / C++ / MFC question help tutorial

  • Increment and Decrement Operators
    S Suk nta

    hey i want to rectify Message send by Richard MacCutchan

    int i = 10;
    int result;
    result = i++; // result equals 10, i equals 11
    result = ++i; // result equals 12, i equals 12
    result = i--; // result equals 12, i equals 11
    result = --i; // result equals 10, i equals 10

    // note do not use expressions such as
    result = ++i + i++; // results undefined

    As written the last line gives output undefine i think its wrong .it will give correct output as 23.
    If u had checked then u already got the result.
    here i will explan u how it's work..

    1:from left to right ++i changes i values 10 to 11.
    2:then it will add 11 + 11 (as i++ is post increment operator it will execute after expression execution) and gives result as 22
    3: then i values becomes 22 and i++ will going to execute and i value changes to 22+1=23

    C / C++ / MFC question help tutorial

  • Increment and Decrement Operators
    S Suk nta

    hey i want to rectify Message send by Richard MacCutchan

    int i = 10;
    int result;
    result = i++; // result equals 10, i equals 11
    result = ++i; // result equals 12, i equals 12
    result = i--; // result equals 12, i equals 11
    result = --i; // result equals 10, i equals 10

    // note do not use expressions such as
    result = ++i + i++; // results undefined

    As written the last line gives output undefine i think its wrong .it will give correct output as 23. If u had checked then u already got the result. here i will explan u how it's work.. 1:from left to right ++i changes i values 10 to 11. 2:then it will add 11 + 11 (as i++ is post increment operator it will execute after expression execution) and gives result as 22 3: then i values becomes 22 and i++ will going to execute and i value changes to 22+1=23

    C / C++ / MFC question help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups