progs/C1.c
changeset 216 38718062709a
parent 112 0711775cb6b0
child 217 8ddf4fe6bf31
--- a/progs/C1.c	Mon Oct 06 22:48:09 2014 +0100
+++ b/progs/C1.c	Mon Oct 06 22:57:44 2014 +0100
@@ -1,17 +1,18 @@
-void foo (char *bar)
-{
-  float my_float = 10.5;  // in hex: \x41\x28\x00\x00
-  char  buffer[28];        
+#include <string.h>
+#include <stdio.h>
+
+void dead () {
+  printf("I will never be printed!");
+}
+
 
-  printf("my float value = %f\n", my_float);
-  strcpy(buffer, bar);  
-  printf("my float value = %f\n", my_float);
-}
- 
-int main (int argc, char **argv)
-{
-  foo("my string is too long !!!!! ");
-  return 0;
+int main(int argc, char **argv) {
+
+  char buffer[8];
+
+  strcpy(buffer, argv[1]);
+
+  return 1;
 }