Created
April 17, 2016 13:00
-
-
Save tuxmartin/4a15b6a5f7ff3a627942f3acd11aad8f 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
// Kompilace: gcc -o test test.c | |
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
int i; | |
char nazev[] = "test_"; | |
for (i = 0; i < 5; i++) { | |
char tmp[20]; | |
memset(tmp, 0, sizeof(tmp)); | |
strcat(tmp, nazev); | |
char pocitadlo[5]; | |
sprintf(pocitadlo, "%d", i); | |
strcat(tmp, pocitadlo); | |
strcat(tmp, ".bmp"); | |
printf("%s\n", tmp); | |
} | |
} |
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
[14:59:38] martin@martin:/tmp$ ./test | |
test_0.bmp | |
test_1.bmp | |
test_2.bmp | |
test_3.bmp | |
test_4.bmp | |
[14:59:39] martin@martin:/tmp$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment