summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorhimanshu81494 <himanshu81494@gmail.com>2015-10-09 20:59:05 +0530
committerhimanshu81494 <himanshu81494@gmail.com>2015-10-09 20:59:05 +0530
commitc899b6605ef9667cb214c2163e7182ad41783be4 (patch)
tree5e0845f2749457c01d711efbbbd71376b96b5017
parentc1c7a96378d79d379e68084780eecd91731fa4bb (diff)
Update c.html.markdown
-rw-r--r--c.html.markdown22
1 files changed, 14 insertions, 8 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 29bc5a5b..f35a2098 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -307,8 +307,9 @@ int main(void) {
exit(-1);
break;
}
-
- // using "goto"
+ /*
+ using "goto" in C
+ */
typedef enum { false, true } bool;
// for C don't have bool as data type :(
bool disaster = false;
@@ -323,7 +324,10 @@ int main(void) {
}
error :
printf("Error occured at i = %d & j = %d.\n", i, j);
- // this will print out "Error occured at i = 52 & j = 99."
+ /*
+ https://ideone.com/GuPhd6
+ this will print out "Error occured at i = 52 & j = 99."
+ */
///////////////////////////////////////
@@ -491,13 +495,15 @@ char c[] = "This is a test.";
str_reverse(c);
printf("%s\n", c); // => ".tset a si sihT"
*/
-//as we can return return only one variable
-//to change values of more than one variables we use call by reference
+/*
+as we can return only one variable
+to change values of more than one variables we use call by reference
+*/
void swapTwoNumbers(int *a, int *b)
{
-int temp = *a;
-*a = *b;
-*b = temp;
+ int temp = *a;
+ *a = *b;
+ *b = temp;
}
/*
int first = 10;