progs/C4.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 07 Oct 2014 00:52:18 +0100
changeset 220 74772c30e0f4
parent 115 c4008b31df8e
child 233 5a5729358afc
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
#include<stdio.h>
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
#include<string.h>
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
115
c4008b31df8e added material
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
     4
// a program that "just" prints the argument
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
// on the command line
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 115
diff changeset
     8
int main(int argc, char **argv)
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
{
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 115
diff changeset
    10
   char *string = "This is a secret string\n";
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 115
diff changeset
    12
   printf(argv[1]);
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
}