Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with cast #371 #419

Open
YaRiabtsev opened this issue Oct 29, 2022 · 1 comment
Open

bug with cast #371 #419

YaRiabtsev opened this issue Oct 29, 2022 · 1 comment

Comments

@YaRiabtsev
Copy link
Collaborator

int printf(const char *, ...);
char t[] = {0, 0, 0, 0};

void show() {
  for (int i = 0; i < 4; i++)
    printf("%d ", t[i]);
  printf("\n");
}

int main(void) {
  char *data = t;
  show();
  *(data) -= 2;
  show();
  *(unsigned *)(data) -= 2;
  show();
  return 0;
}
@0pdd
Copy link
Member

0pdd commented Apr 11, 2024

@YaRiabtsev the puzzle #458 is still not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants