C language exercise 59: In-depth understanding of the value range of the char type

In-depth understanding of the value range of the char type

For example: 

#include <stdio.h>
int main()
{
 char a[1000];
 int i;
 for(i=0; i<1000; i++)
 {
  a[i] = -1-i;
 }
 printf("%d",strlen(a));
 return 0;
}

 The result is 255

 a+b prints the result in the form of %d: 300

Since the value range of unsigned char is limited in c, in the above figure, turning 55 times clockwise from 255 can get 44

Supongo que te gusta

Origin blog.csdn.net/2301_77479435/article/details/132919833
Recomendado
Clasificación