Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save refactormyself/285ad8e472885c4da70ebb9a71b6e21a to your computer and use it in GitHub Desktop.
Save refactormyself/285ad8e472885c4da70ebb9a71b6e21a to your computer and use it in GitHub Desktop.
separating_Statements_with_commas created by refactormyself - https://repl.it/@refactormyself/separatingStatementswithcommas
#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