Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

can I get explanation of this program????

0 votes
asked Nov 1, 2018 by Prudhvi kanth Chirumamilla (140 points)
#include<stdio.h>
#include<conio.h>
int main()
{
    int n=1;
    printf("%d%d%d",n++,n,++n);
    return 0;
}

1 Answer

0 votes
answered Nov 3, 2018 by JEANMARC (180 points)
#include<stdio.h>

int main()
{
    int n = 1;
    // printf("%d%d%d",n++,n,++n);
    // replaced above with three descriptive prints and new lines "\n" (not to be confuse with variable n)
    // %d is a place holder for the decimal format of n to be printed. Three %d in the original for three values of n

    printf("\nprint n as is and then increment it: n = %d", n++);
    printf("\nprint n after incremented by previous printf: n = %d", n);
    printf("\nincrement n and then print it: n = %d", ++n);
    
    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...