progs/C0.c
changeset 393 cb308583d86c
parent 231 60e046ab6c94
child 394 ea1ee786d5a7
equal deleted inserted replaced
392:4dff36e2bbc6 393:cb308583d86c
     2 #include <stdio.h>
     2 #include <stdio.h>
     3 
     3 
     4 void foo (char *bar)
     4 void foo (char *bar)
     5 {
     5 {
     6    long my_long = 101010101; // in hex: \xB5\x4A\x05\x06
     6    long my_long = 101010101; // in hex: \xB5\x4A\x05\x06
     7    char  buffer[28];        
     7    char buffer[28];        
     8 
     8 
     9    printf("my_long value = %lu\n", my_long);
     9    printf("my_long value = %lu\n", my_long);
    10    strcpy(buffer, bar);    
    10    strcpy(buffer, bar);    
    11    printf("my_long value = %lu\n", my_long);
    11    printf("my_long value = %lu\n", my_long);
    12 }
    12 }
    13  
    13  
    14 int main (int argc, char **argv)
    14 int main (int argc, char **argv)
    15 {
    15 {
    16   foo("my string is too long !!!!! \x15\xcd\x5d\x07"); 
    16   foo("my string is too long !!!!!"); 
       
    17   //foo("my string is too long !!!!! \x15\xcd\x5d\x07"); 
    17   return 0;
    18   return 0;
    18 }
    19 }