Thread: Benefits of putting ++ after a variable

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    99

    Benefits of putting ++ after a variable

    what the Benefits of putting ++ after a variable. I have tested it but give same result. Look at my both program's
    Code:
    #include <stdio.h>int main(void)
    {
        int a = 5;
        
        printf("Value of a is %d \n",a);
        
        return 0;
    }
    Value of a is 5

    Code:
    #include <stdio.h>int main(void)
    {
        int a = 5;
        
        printf("Value of a is %d \n",a++);
        
        return 0;
    }
    Value of a is 5
    Last edited by vead; 01-25-2018 at 07:28 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 10-31-2012, 03:08 PM
  2. Putting text after inputting a variable
    By JDK721 in forum C++ Programming
    Replies: 2
    Last Post: 12-13-2006, 04:03 PM
  3. Replies: 4
    Last Post: 07-02-2004, 04:08 PM
  4. VC++.NET Benefits
    By aym_7 in forum C++ Programming
    Replies: 2
    Last Post: 05-12-2002, 05:55 PM
  5. benefits of c++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 12-18-2001, 09:12 PM

Tags for this Thread