0

Can anybody explain this program?

#include<stdio.h> int main() {     int a=0;     a=a++ + a++ - a++ + ++a;     printf("%d\n", a);     return 0; }

10th Jan 2022, 3:24 AM
Lalitkumar Prajapat
Lalitkumar Prajapat - avatar
1 Respuesta
0
int a=0; //Declare "a" and initialize it to 0 a=a++ + a++ - a++ + ++a; •++a : First increment, then use it •a++ : Use the value, then increment So... a = 0 + 1 - 2 + 4 printf("%d\n", a); //prints 3 + line break
10th Jan 2022, 4:10 AM
CGM
CGM - avatar