diff options
Diffstat (limited to 'c.html.markdown')
| -rw-r--r-- | c.html.markdown | 22 | 
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; | 
