I'm someone who started learning programming recently I'd like to ask Why the output isn't X = 6 X = 10
#include <stdio.h>
int main ()
{
int x = 1;
int y = 1;
x = y++ * 5;
printf("\nthe value of x is %d", x);
y = 1;
x = ++y * 5;
printf("\nthe value of x is %d", x);
return 0;
}
I tried changing values put it didn't help when I use y++ it doesn't increase And the output is x = 5 when using y++ shouldn't the output be x = 6