Created
December 18, 2023 07:11
-
-
Save kjunichi/d193dbea6fa86e1bb4c59b6bec47fec3 to your computer and use it in GitHub Desktop.
配列の初期化状況とインデックスとインクリメントの関係の確認
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is a "Hello, world!" in C language by gcc for wandbox. | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int array[5]; | |
int arrayB[5]; | |
int i=0; | |
array[i++]=123; | |
arrayB[i] = -1; | |
for(int j = 0; j <5; j++ ) { | |
printf("array[%d] = %d\n", j, array[j]); | |
printf("arrayB[%d] = %d\n", j, arrayB[j]); | |
} | |
return EXIT_SUCCESS; | |
} | |
// GCC reference: | |
// https://gcc.gnu.org/ | |
// C language references: | |
// https://msdn.microsoft.com/library/fw5abdx6.aspx | |
// https://www.gnu.org/software/gnu-c-manual/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment