C language single linked list, why does the value change after reference?

  printf("data = %d\n",head->next->data);
  printf("data = %d\n",head->data);
  printf("data = %d\n",head->next->data);
There is nothing in the middle of the continuous printf, on the

main function, but the printed value has changed.

clipboard.png

C
Mar.22,2021

feels like it's only one step away from segment fault.

head- > next is really a valid pointer? Have you already been passed by free? Or not initialized? No one knows what the wild pointer will bring. printf is not without side effects, it opens up a buffer concatenation string. head- > next probably refers to where it went.


put the complete program up, the existing program is completely unable to locate the cause of the problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b366c4-2ad58.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b366c4-2ad58.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?