Blocks | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Blocks

what are the blocks in c++? can anybody help?

3rd Jun 2018, 3:25 PM
sayed sayed
sayed sayed - avatar
2 Answers
+ 1
A block is a group of lines in the same scope. For example, lines between matching curly braces { } is a block. Another example, in a if statement with no curly brace, the one line after if is the "if" block. if(condition) //if block else { // else block }
3rd Jun 2018, 4:18 PM
ifl
ifl - avatar
0
type function-name(parameters) { // block }
4th Jun 2018, 7:15 AM
Aveek Bhattacharyya
Aveek Bhattacharyya - avatar