programs/C4.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 22 Sep 2014 22:16:17 +0100
changeset 162 5031e7778fdb
parent 28 10da75d5db5d
permissions -rw-r--r--
new version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#include<stdio.h>
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
#include<string.h>
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
// a program that just prints the argument
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
// on the command line
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
//
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
// try and run it with %s
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
main(int argc, char **argv)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
        char *string = "This is a secret string\n";
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
        printf(argv[1]);
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
}