选择题
字符数组a和b中分别存储了字符串,判断字符串a和b相等,应当使用的是______。
A、
if(strcmp(a,b)==0)
B、
if(strcpy(a,b))
C、
if(a==b)
D、
if(a=b)
【正确答案】
A
【答案解析】
[考点] 字符、选择和程序结构 C语言中,判断字符串是否相等,使用字符串比较函数strcmp()。
提交答案
关闭