author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Mon, 05 Oct 2015 20:42:11 +0100 | |
changeset 395 | 60f64793266f |
parent 394 | ea1ee786d5a7 |
child 400 | f05368d007dd |
permissions | -rw-r--r-- |
#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 !!!!!"); //foo("my string is too long !!!!! \x15\xcd\x5d\x07"); return 0; }