Browse files

more learnins

  • Loading branch information...
1 parent ba9628b commit 213f554c2091dcb212eca0a932d7382d16b98f27 @bentaber committed Aug 27, 2012
View
BIN ex3-5/ex3
Binary file not shown.
View
BIN ex3-5/ex5
Binary file not shown.
View
7 ex6-10/Makefile
@@ -0,0 +1,7 @@
+CFLAGS=-Wall -g
+
+all: ex6
+
+
+clean:
+ rm -f ex6
View
BIN ex6-10/ex6
Binary file not shown.
View
21 ex6-10/ex6.c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ int distance = 100;
+ float power = 2.345f;
+ double super_power = 56789.4532;
+ char initial = 'G';
+ char first_name[] = "Ben";
+ char last_name[] = "Taber";
+
+ printf("you are %d miles away.\n", distance);
+ printf("you have %f levels of power.\n", power);
+ printf("you have %f awesome super powers.\n", super_power);
+ printf("I have an initial %c.\n", initial);
+ printf("I have a first name %s.\n", first_name);
+ printf("I have a last name %s.\n", last_name);
+ printf("My whole name is %s %c. %s.\n", first_name, initial, last_name);
+
+ return 0;
+}
View
BIN ex6-10/ex7
Binary file not shown.
View
14 ex6-10/ex7.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+int main(int argc, char* argv[])
+{
+ int bugs = 100;
+ double bug_rate = 1.2;
+ printf("You have %d bugs imaginary rate of %f\n", bugs, bug_rate);
+
+ long universe_of_defects = 1 * 1024 * 1024 * 1024;
+
+ printf("The entire universe has %d bugs.\n", universe_of_defects);
+
+ return 0;
+}
View
BIN gdb-as-repl/arrays
Binary file not shown.
View
5 gdb-as-repl/arrays.c
@@ -0,0 +1,5 @@
+int main()
+{
+ int a[] = {1,2,3};
+ return 0;
+}
View
BIN gdb-as-repl/minimal
Binary file not shown.
View
7 gdb-as-repl/minimal.c
@@ -0,0 +1,7 @@
+// https://www.hackerschool.com/blog/5-learning-c-with-gdb
+
+int main()
+{
+ int i = 1337;
+ return 0;
+}

0 comments on commit 213f554

Please sign in to comment.