Created
July 24, 2019 04:45
-
-
Save surinoel/15860e4a42f91c9b8ddf0453f71561b0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#define OPSZ 4 // 정수형 사이즈 | |
char buf[1024]; | |
int main(int argc, char **argv) | |
{ | |
for(int i=0; i<5; i++) { | |
scanf("%d", (int*)&buf[OPSZ*i]); | |
} | |
for(int i=0; i<5; i++) { | |
printf("%d ", *(int*)&buf[OPSZ*i]); | |
} | |
printf("\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment