I have the following code:
#include typedef struct { int* arg1; int arg2; } data; int main(int argc, char** argv) { data d; printf
You are accessing uninitialized values. This causes undefined behaviour (meaning that anything can happen, including the program crashing).
To fix, initialize values before using them, e.g.:
data d = { 0 };