-
-
Save pskrgag/e930fac035c875673ff99d5b36fb7771 to your computer and use it in GitHub Desktop.
maks.c
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 <string.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
char test_xuy[] = {"a\nb\nc\nmaks\n"}, *tmp_ptr; | |
size_t curr_off = 0; | |
char tmp_buf[1024] = {0x00}; | |
tmp_ptr = strtok(test_xuy, "\n"); | |
while (tmp_ptr) { | |
strcpy(tmp_buf, tmp_ptr); | |
printf("%s\n", tmp_buf); | |
tmp_ptr = strtok(NULL, "\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment