?
is the first symbol of the ?:
ternary operator.
a = (b==0) ? 1 : 0;
a
will have the value 1 if b
is equal to 0
, and 0 otherwise.
More Related Contents:
- Procedure to include own functions to ANSI C Standard library
- What does 1024LL mean in C [duplicate]
- sscanf Beginner in C
- Sum of the all the numbers between a and b [closed]
- Debugging a linked-list
- Returning an array using C
- C loop optimization help for final assignment (with compiler optimization disabled)
- Why use double indirection? or Why use pointers to pointers?
- Is there a performance difference between i++ and ++i in C?
- Effects of the extern keyword on C functions
- Overriding ‘malloc’ using the LD_PRELOAD mechanism
- Execution time of C program
- Type conversion – unsigned to signed int/char
- Rounding integer division (instead of truncating)
- Fast computing of log2 for 64-bit integers
- Multiple arguments to function called by pthread_create()?
- Why am I getting “undefined reference to sqrt” error even though I include math.h header? [duplicate]
- Undefined reference to ‘pthread_create’ — linker command option order (libraries before/after object files?) [duplicate]
- How does the C offsetof macro work? [duplicate]
- How to detect the launching of programs on Linux?
- C – Difference between “char var[]” and “char *var”?
- Do temp variables slow down my program?
- #ifdef inside #define
- Function without return type specified in C
- Why is the gets function so dangerous that it should not be used?
- How does strcmp() work?
- Bit twiddling: which bit is set?
- Order of evaluation of arguments in function calling?
- How do I compile the asm generated by GCC?
- Is sprintf(buffer, “%s […]”, buffer, […]) safe?