Created
December 2, 2019 06:40
-
-
Save LoadDragon0000000000/2762d2276bdc70d694f0d8472f1ea039 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
#include <stdio.h> | |
void func(int* n) { // 変数のアドレスを受け取るという意味 | |
*n = 333; // 受け取ったアドレスの中身(*n)に333を入れる | |
} | |
int main() | |
{ | |
int number = 100; // 実際に扱うデータ | |
func(&number); // numberのアドレスを渡す | |
printf("%d", number); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment