单项选择题

下面程序的功能是从键盘输入一个字符串,编程将其字符顺序颠倒后重新存放,并输出这个字符串。程序的运行结果如下:Input a string:abcdef↙The inversed string is:fedcba按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#includestdio.h #includestring.h voidInverse(char*pStr); intmain() { charstr[80]; printf(Inputastring:); gets(str);//输入字符串 Inverse(str);//将存于str数组中的字符串逆序存放 printf(Theinversedstringis:); puts(str);//输出字符串 return0; } voidInverse(char*pStr) { intlen=0; chartemp; char*pStart=pStr;//指针变量pStart指向字符串的第一个字符 char*pEnd;//指针变量pEnd指向字符串的最后一个字符 for(;*pStart!='\0';_________)//求出字符串长度 { len++; } for(pStart=pStr,___________;pStartpEnd;pStart++,pEnd--) { temp=_________; ________________; *pEnd=temp; } }
A、第21行: pStart++第25行: pEnd=pStr+len-1第27行: *pStart第28行: *pStart = *pEnd
B、第21行: *pStart++第25行: pEnd=pStr+len第27行: *pStart第28行: *pStart = *pEnd
C、第21行: pStart++第25行: pEnd=pStr+len-1第27行: pStart第28行: pStart = pEnd
D、第21行: *pStart++第25行: pEnd=pStr+len第27行: pStart第28行: pStart = pEnd