Hello,

I am a bit confused as to why this code compiles, but is not working, and how to fix it. Can you help? Thx

Code:
#include <stdlib.h>

typedef struct {
	int x;
} Stype;

void Fun(Stype a) {
	a.x = a.x + 1;
}

int main() {
	Stype sexample;
	sexample.x = 0;
	
	Stype arr[10];
	arr[0] = sexample;
	
	Fun(arr[0]);
	
	printf("%d", arr[0].x); // why not 1?
	
	return 0;
}