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


Tom951121 (Tom)

學校 : 國立中正大學
編號 : 80710
來源 : [140.123.147.230]
最後登入時間 :
2023-10-20 20:26:55

 

//[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;//輸出僅一個,輸出完立即中止
    }
}