Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Command Expressions in Gnu C
//gcc 5.4.0 #include <stdio.h> #include <stdlib.h> #include <unistd.h> int foo(void) { return ({ int y = rand (); int z; if (y > RAND_MAX>>1) z = -2; else z = - 1; z; }); } int main(void) { printf("Hello, world!\n"); for (;;) { sleep(1); int t = ({ int y = foo (); int z; if (y > 0) z = y; else z = - y; z; }); printf("T is %d \n", t); }; return 0; }
run
|
edit
|
history
|
help
0
1.4 Thread IDs
QuickSort
FizzBuzz
Command Expressions in Gnu C: What Does Return Return?
HW4e5
Collatz(3k+1)
formatting_input_and_output
Why &(a+1) is not allowed
Spring 2017 Project 2 v.02
void *