0

I am trying to run a main method in C but am having trouble. here is what I have

int main(int argc, char *argv[])
{
    if(argc == 0)
        return 0;
    printf("%s \n", argv[0]);
    main(--argc,++argv);
}

in command I write this, ./main roses are red!

But it does not run, I am sure it will print this on the screen

r

o

s

e

s

a

r

e

r

e

d

!

Am I correct?

4

3 に答える 3