#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); }