close
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' - http://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
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 newhong 的頭像
    newhong

    2016韓國代購網 , 韓國代購化妝品 , 韓國代購批發 , 韓國代購教學---韓國代購/追加/寄貨

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