#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
char buf[42] = {[0 ... 19] = \'A\',
[20 ... 39] = \'B\', [40] = 0};
if (argc > 1)
{
char duh[strlen(argv[1]) + 1];
strcpy(duh, argv[1]);
printf("%s ");
}
printf("%s\n", buf);
return 0;
}
jughead@naptime:~> gcc silly_gcc.c -o silly_gcc
jughead@naptime:~> ./silly_gcc Hamburgers!
Hamburgers! AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBB
jughead@naptime:~>
No comments:
Post a Comment