progs/C0.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 03 Nov 2014 13:19:51 +0000
changeset 278 ed3c071ed36a
parent 231 60e046ab6c94
child 393 cb308583d86c
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 !!!!! \x15\xcd\x5d\x07"); 
  return 0;
}