Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language, int assignment to char
C language, int assignment to char
You can complete the assignment by following the instructions in the following code:

Charles? c[4];

int? I = 100;

*(int*)c? =? Me; Memcpy can also be used, and the schematic code is as follows:

memcpy(c & amp; I,sizeof(I)); The first method is recommended, so when you want to return a value, you just need to follow the following operation.

Me? =? *(int *)c; Flexible use of pointer type conversion can greatly simplify the program code, and this problem is a good example.