1.
# include<stdio.h>
# include<stdlib.h>
void main(){
char l_c[ ]={‘A‘, ‘B‘,‘C‘,’D‘,0x45}
int length= sizeof(l_c)/sizeof(char);
for(size_t i=0, i<length:i++){
printf("%c",l_c[i]);
}
system("pause"),
}
2.
# include<stdio.h>
# include<stdlib.h>
void main(){
char l_c [ ]={"ABCDE"};//char l_c[ ]={‘A’,‘B‘,‘C‘,‘D‘,‘E‘,0x00};
printf("%s",l_c);
system("pause");
}
时间: 2024-10-11 06:43:01