2009-05-21から1日間の記事一覧

C言語カルトクイズ

CUDAも飽きたのでC言語にしよう。 以下、コンパイルが通る/通らないを答えなさい Q1 struct xx { struct yy {int a;}; }; struct yy yy; int main(){} Q2 struct xx { struct xx {int a;}; }; int main(){} Q3 struct xx { int a; }; int main(){ struct xx …

今年になってから100回くらい「C言語むずい」って言ってる気がするな以下のコードは、tcc, faucc, sdcc, bcc(Boarland ではないほう), clang で通らないが、Cとして正しいプログラム。 int *b = (int*)(struct xxyyzz { struct aabb { int a; } n; struct ne…

昨日は寝てしまった。 まあ、週に一回くらいは10時間くらい寝たいところである。