100身障計概 - 考試
By Enid
at 2014-05-12T17:23
at 2014-05-12T17:23
Table of Contents
[問題] 應考資格、各種國考疑難雜症等,以有正確作法、答案者為主
(不包括書裡的疑問)。若問題如人生規劃、讀書計畫等,無一
定作法、答案者,請用閒聊選項。
#include <stdio.h>
int sum_of_square(int a, int b)
{
int square(int v)
{return v*v;
}
return square(a) + square(b);
}
int main()
{printf("%d", sum_of_square(3, 4));
return 0;
}
請問為什麼答案是無法通過編譯呢
是因為把函式寫在另一個函式裡面嗎
--
(不包括書裡的疑問)。若問題如人生規劃、讀書計畫等,無一
定作法、答案者,請用閒聊選項。
#include <stdio.h>
int sum_of_square(int a, int b)
{
int square(int v)
{return v*v;
}
return square(a) + square(b);
}
int main()
{printf("%d", sum_of_square(3, 4));
return 0;
}
請問為什麼答案是無法通過編譯呢
是因為把函式寫在另一個函式裡面嗎
--
Tags:
考試
All Comments
By Andrew
at 2014-05-14T09:36
at 2014-05-14T09:36
By Barb Cronin
at 2014-05-19T01:41
at 2014-05-19T01:41
By Ula
at 2014-05-22T03:03
at 2014-05-22T03:03
Related Posts
社會資本&公共性 (公民問題)
By Emily
at 2014-05-12T15:46
at 2014-05-12T15:46
電容儲存容量
By Wallis
at 2014-05-12T15:22
at 2014-05-12T15:22
關於懸賞廣告
By Vanessa
at 2014-05-12T12:06
at 2014-05-12T12:06
法警和書記官??
By David
at 2014-05-12T11:07
at 2014-05-12T11:07
基本電學
By Odelette
at 2014-05-12T04:47
at 2014-05-12T04:47