Various ways to initialize an array to a string

后端 未结 0 460
一生所求
一生所求 2021-01-16 09:35

Here are two ways to write a \'string\' into an array:

char name1[4];
name1[0] = \'D\';
name1[1] = \'a\';
name1[2] = \'n\';
char name         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题