C strings behavior, and atoi function
问题 I wonder why the two values of int don't validate the if condition even if it is true. printf shows both of them are equal. Is buffer overflow able to affect the behavior of if conditions,corrupting other code sections behavior. #include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { srand(time(NULL)); char instring[2]; // when this increases somehow I get the right behavior int inint; int guess; guess = rand() % 127; inint = ~guess; printf("%i\n", guess); //testing with