progs/C0.c
author Christian Urban <urbanc@in.tum.de>
Tue, 23 Aug 2016 15:37:59 +0200
changeset 460 ab7acd13bef3
parent 400 f05368d007dd
child 467 da4896f201b5
permissions -rw-r--r--
updated

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

void foo (char *bar)
{
   long my_long = 101010101; // in hex: \xB5\x4A\x05\x06
   char buffer[28];        

   printf("my_long value = %lu\n", my_long);
   strcpy(buffer, bar);    
   printf("my_long value = %lu\n", my_long);
}
 
int main (int argc, char **argv)
{
  foo("my string is too long !!!!! ");    
  return 0;
}