Created
May 26, 2018 18:03
-
-
Save refactormyself/285ad8e472885c4da70ebb9a71b6e21a to your computer and use it in GitHub Desktop.
separating_Statements_with_commas created by refactormyself - https://repl.it/@refactormyself/separatingStatementswithcommas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void doSonething1(){ | |
printf("Pramod's wedding ticket \n"); | |
} | |
void doSonething2(){ | |
printf("Send ticket to Saheed \n"); | |
} | |
int main(void) { | |
int i,a; | |
//This is the real reason | |
//function calls can be separated by comma | |
//operators are essentially functions | |
doSonething1(), doSonething2(); | |
//below we test it | |
i += 2, 4, i; | |
printf("1. Logging : i is %d, a is %d\n", i, a); | |
i += 2, a = 4, i; | |
printf("2. Logging : i is %d, a is %d\n", i, a); | |
i += i+=2, 7, a = 4, i; | |
printf("3. Logging : i is %d, a is %d\n", i, a); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment