progs/C0.c
changeset 211 e6e160c7ea33
parent 202 6740798264c1
child 231 60e046ab6c94
--- a/progs/C0.c	Mon Oct 06 02:44:23 2014 +0100
+++ b/progs/C0.c	Mon Oct 06 20:52:53 2014 +0100
@@ -1,23 +1,18 @@
 #include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 void foo (char *bar)
 {
-  float my_float = 10.5;    // in hex: \x41\x28\x00\x00
-  char  buffer[28];        
+   long my_long = 101010101; // in hex: \xB5\x4A\x05\x06
+   char  buffer[28];        
 
-  printf("my float value = %f\n", my_float);
-
-  strcpy(buffer, bar);  
- 
-  printf("my float value = %f\n", my_float);
+   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 !!!!! ");                  // all is normal
-  //foo("my string is too long !!!!! \x10\x10\xc0\x42");  // overwrites my_float
+  foo("my string is too long !!!!!"); 
   return 0;
-}
-
+}
\ No newline at end of file