mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Some extra information
This commit is contained in:
parent
a62d99a393
commit
328ceb1a94
@ -221,7 +221,7 @@ int main(void) {
|
|||||||
0 || 1; // => 1 (Logical or)
|
0 || 1; // => 1 (Logical or)
|
||||||
0 || 0; // => 0
|
0 || 0; // => 0
|
||||||
|
|
||||||
// Conditional expression ( ? : )
|
// Conditional ternary expression ( ? : )
|
||||||
int e = 5;
|
int e = 5;
|
||||||
int f = 10;
|
int f = 10;
|
||||||
int z;
|
int z;
|
||||||
@ -291,6 +291,8 @@ int main(void) {
|
|||||||
for (i = 0; i <= 5; i++) {
|
for (i = 0; i <= 5; i++) {
|
||||||
; // use semicolon to act as the body (null statement)
|
; // use semicolon to act as the body (null statement)
|
||||||
}
|
}
|
||||||
|
// Or
|
||||||
|
for (i = 0; i <= 5; i++);
|
||||||
|
|
||||||
// branching with multiple choices: switch()
|
// branching with multiple choices: switch()
|
||||||
switch (a) {
|
switch (a) {
|
||||||
|
Loading…
Reference in New Issue
Block a user