7 试题
void Exchange(char* str_Input , char* str_output)
{
for(int i = 0; i< (int)strlen(str_Input); i++)
{
str_output[i] = str_Input[i] - 32; //把小写字母全部转化为大写字母。
}
str_output[i] = 0;
}
int main()
{
char OrgBuff[4][20] = {"this is a example","lost temple","qwenilaohuu","end"};
char DestBuff[4][20] = {0};
char tmp_exchange[20];
for (int i = 0; i < 4; i++)
{
memcpy(tmp_exchange, OrgBuff[i], strlen(OrgBuff[i]));
Exchange(tmp_exchange, DestBuff[i]);
}
return 0;
}
请选择出DestBuff[3]的内容哪个正确(C)
A: ENDS IS A EXAMPLE
B: END
C: ENDNILAOHUUXAMPLE
D: ENDNILAOHUU
阅读(228) | 评论(0) | 转发(0) |