Generation

generate functionThu, 26 Jan 2023

how to convert a char to int

char temp = '0'; // the 0 is a char int num = temp - '0'; printf(num); // the output is 0

Questions about programming?Chat with your personal AI assistant