Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
建置成功 卻無法執行 不知道哪裡做錯了
Jun 4th 2013, 02:07

題目

編寫一函數,其功能是使輸入的字串反序。

並使用迴圈語句進行測試。

#include<stdio.h>

#include<string.h>

charreversed(char *);

intmain(void)

{

chars1[100];

while(scanf("%s", &s1) == 1)

printf("%s\n",reversed(s1));

return 0;

}

charreversed(char *s1)

{

int i, m =strlen(s1);

chars2[100];

for(i = 0;i < m; i++)

s2[i] = s1[m- 1 - i];

return s2[0];

}

建置成功

但出現無法運轉

請問是哪裡有問題

或是哪裡需要修改

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - https://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
創作者介紹
創作者 電影心得::::灣生回家線上看免費紀錄片 , 灣生回家 上映 , 灣生回家 心得 , 灣生回家 線上看 , 灣生回家 紀錄片何時上映 , 灣生回家的故事 , 的頭像
thigosf

電影心得::::灣生回家線上看免費紀錄片 , 灣生回家 上映 , 灣生回家 心得 , 灣生回家 線上看 , 灣生回家 紀錄片何時上映 , 灣生回家的故事 ,

thigosf 發表在 痞客邦 留言(0) 人氣( 0 )