summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 18:07:03 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 18:07:03 +0800
commit9d0f759d15f2879e1b28c1c80bea7a244e7483cb (patch)
treefc1d9f8170dbeceec915ca2d294fe000517ef3b7
parent2d6fda53f98a3b7614cd441e6d521aed8421d386 (diff)
downloadk&r-exercises-9d0f759d15f2879e1b28c1c80bea7a244e7483cb.tar.gz
Add comments.
-rw-r--r--1/1.c2
-rw-r--r--1/2.c2
-rw-r--r--1/3.c2
-rw-r--r--1/4.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/1/1.c b/1/1.c
index b5e0198..5cf53fd 100644
--- a/1/1.c
+++ b/1/1.c
@@ -1,5 +1,7 @@
#include <stdio.h>
+/* Prints the famous "hello, world" string */
+
int main(int argc, char *argv[]) {
printf("hello, world\n");
return 0;
diff --git a/1/2.c b/1/2.c
index 4850f83..182975e 100644
--- a/1/2.c
+++ b/1/2.c
@@ -1,5 +1,7 @@
#include <stdio.h>
+/* Prints a formatted string containing an invalid escape sequence */
+
int main(int argc, char *argv[]) {
printf("hello \c world\n");
return 0;
diff --git a/1/3.c b/1/3.c
index d0c8ea1..c993843 100644
--- a/1/3.c
+++ b/1/3.c
@@ -1,5 +1,7 @@
#include <stdio.h>
+/* Prints a conversion table from fahrenheit to celsius */
+
int main(int argc, char *argv[]) {
float fahr, celsius;
int lower, upper, step;
diff --git a/1/4.c b/1/4.c
index 653b530..d98787b 100644
--- a/1/4.c
+++ b/1/4.c
@@ -1,5 +1,7 @@
#include <stdio.h>
+/* Prints a conversion table from celsius to fahrenheit */
+
int main(int argc, char *argv[]) {
float celsius, fahr;
int lower, upper, step;