All pastes #192245 Raw Edit

Someone

public text v1 · immutable
·published 2006-10-05 20:13 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void functie(char *str)
{
   char buffer[120];
   
   strncpy(buffer, str, sizeof(buffer)-1);
   buffer[strlen(str)] = 0x0;
}
   
int main(int argc, char **argv)
{
   if(argc > 1) functie(argv[1]);   
   return 0;
}