Search Results
Searching for: Blocks in C
If Statement
Language: C
The if else block controls decision making by checking true/false statements resulting in different executions of code, depending on if the result is true and if the result is false. There are three parts to the if-else block: if, else if, and else.
Do-While Loop
Language: C
The do-while loop executes a block of code while a boolean expression evaluates to true. It checks the boolean expression after each iteration. It terminates as soon as the expression evaluates to false.
Function Declaration
Language: C
A function (method) is a block of code that can be called from another location in the program or class. It is used to reduce the repetition of multiple lines of code.
Ternary Operator
Language: C
The ternary operator is used to execute code based on the result of a binary condition. It takes in a binary condition as input, which makes it similar to an 'if-else' control flow block. It also, however, returns a value, behaving similar to a function.
< Previous Page |