Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コード:
#include<stdio.h> int main(void) { int i, j; for(j = i+1, i=1; i<=5; j++, i++) printf("%d %d\n", i, j); return 0; }
出力:
1 66 2 67 3 68 4 69 5 70
コードの出力の性質について説明できる人はいますか?
j には、i = 1 が割り当てられる前であっても、i の値が割り当てられます。したがって、i は、OS によって提供される任意の値にすることができます。上記の場合、OS によって i に割り当てられた値は 66 でした。この任意の値は、システムによって異なる場合があります。