#36116: C 程式解答_運用指標


Tom951121 (Tom)


 

//[2MS,80KB]

#include <stdio.h>
int main(void){
    char ch[2048];// 內存2048bytes.
    char *chptr = ch;//字元指標
    while(fgets(chptr,8*sizeof(chptr),stdin)!=NULL){//Input
    printf("hello, %s",chptr);//Output
    break;//輸出僅一個,輸出完立即中止
    }
}