progs/C5.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 10 Oct 2014 12:44:36 +0100
changeset 235 75e32cd57ef0
parent 234 17e0efbec5d0
child 236 40efc28963af
permissions -rw-r--r--
made the buffer smaller

#include<stdio.h>
#include<string.h>

int main(int argc, char **argv)
{  char buf [10];
   snprintf(buf, sizeof buf, argv [1]);
   printf ("Input: %s \n", buf);
}