首页题库练习题目详情
C语言程序设计单选题中等

下列哪项可以正确地将字符串赋值给字符数组?

0{ "key": "A", "text": "char s[10]; s = \"hello\";" }
1{ "key": "B", "text": "char s[10]; strcpy(s, \"hello\");" }
2{ "key": "C", "text": "char s[]; s = \"hello\";" }
3{ "key": "D", "text": "char *s; s = \"hello\";" }