Created
June 11, 2017 00:11
-
-
Save betseg/44f41bb089c892d3b4093e57f349c2eb 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> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
int i, j; | |
char buff[100]; | |
char vars[127][100]; | |
strcpy(vars[(int) argv[1][0]], argv[1]+2); | |
for(i=j=0; j < strlen(argv[2]); i++, j++) { | |
if(argv[2][j] == argv[1][0]) { | |
strcat(buff, vars[(int) argv[1][0]]); | |
i += strlen(vars[(int) argv[1][0]])-1; | |
} | |
else | |
buff[i] = argv[2][j]; | |
} | |
puts(buff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment