Sign in
Log inSign up

What will be the output of this c language program?

Ankur Singh's photo
Ankur Singh
·Dec 23, 2020·

1 min read

What will be the output of following c program, and why?

#include <stdio.h>

int main()
{
    int a=10;
    int b=0;
    b=++a + a++ + ++a + a++ + ++a;
    printf("%d",a);
    printf("\n%d",b);

    return 0;
}