• 2022-06-04
    对于如下C程序:#include [stdio.h] void Func (char *); int main() { char str[20]; scanf ("%s", str); Func(str); printf ("%s\n", str);} void Func(char *str) { int i = 0; int index = 0; char temp; while (str[index] != '\0'){ index++; } for (i = 0; i < index/2 ; i++){ temp = str[i]; str[i] = str[index - 1 - i]; str[index - 1 - i] = temp; }}如果输入为“abcd”,则输出为:[/i][/i]
    A: abcd
    B: dcba
    C: dcdc
    D: abab