Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language assigns characters to plastic variables
C language assigns characters to plastic variables
# include & ltstdio.h & gt

Invalid? Master ()

{

int? a = 10;

Charles? t[3];

t[0]= a/ 10+48;

t[ 1]= a % 10+48;

t[2]= ' \ 0 ';

Printf ("Output t3 value:");

printf("%s\n ",t);

}

Let me point out your mistake:

1? Error in defining character array, duplicate definition occurred.

2? Yeah, numbers? Like the number a? To convert it into the character A, you must add 48 to convert its type.

3 make the two equal? You must also assign t[2] to' \0', which is an empty character.