Introduction to Programming

Arguments


#include <stdio.h>

int main(int argc, char *argv[])
{
    int a;

    for (a=0; a<argc; a++)
    {
        printf("Argument %d: %s\n", a, argv[a]);
    }

    return 0;
}

Next: Guessing Game Challenge

Previous: Loops


Introduction to Programming

Home