answersLogoWhite

0

What is statement and blocks?

Updated: 12/7/2022
User Avatar

Wiki User

10y ago

Best Answer

A statement is a single instruction in a language; a block is a group of instructions.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is statement and blocks?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between blocks and compound statements?

A compound statement is a single statement which combines the work of multiple individual statements. A block is a collection of individual statements. Block: ++i; x = i; Compound statement: x = ++i;


What is the similarity between 'if' statement ans 'switch' statement?

A Switch statement can be considered as a series of if. else if. else statements. whatever condition is satisfied, the code block would get executed. if (cond 1) { } else if (cond 2) { } else if (cond 3) { } ...... } else if (cond N) { } else { } switch { case 1: .... case 2: .... .... case N: ... default: ... } Difference: In the if else blocks, if one condition is satisfied, all other blocks are ignored In Switch blocks, unless you have break statements inside each condition block, the subsequent blocks would not be ignored.


Why for loop is not terminated in c?

Of course the for loop is terminated in C. All statements are terminated. Look at the syntax of the for statement... for (init-statement; test-condition; loop-statement) body-statement; That looks quite terminated to me. (By the semi-colon) Perhaps you are thinking about statement blocks... for (init-statement; test-condition; loop-statement) { statement; statement; ... statement; } ... Well, that is just fine because the body-statement, like any other statement, can be replaced by one or more statements enclosed in braces. There is still a terminating semi-colon on each statement. if i am understanding ur ques. right then according to me it is correct that for loop is not terminated because we do not execute for loop.we only check the conditions. those statements are terminated which we want to execute. because using a semicolon or terminating the statement means that statement is execitable.


Which character is used to continue a statement in SQLPlus?

'-' is used to continue a ststement in SQLPlusFor SQL statements and PL/SQL blocks there is no need for continuation character:SELECTenameFROMemp;set serveroutput onBEGINdbms_output.put_line ('Hello, world');END;/


Why are cinder blocks called cinder blocks?

They are made with cinder aggregate

Related questions

What kind of sentence is please put your Lego blocks away?

It is a simple statement.


What is the difference between blocks and compound statements?

A compound statement is a single statement which combines the work of multiple individual statements. A block is a collection of individual statements. Block: ++i; x = i; Compound statement: x = ++i;


Which conclusion is not based on the previous statement?

The weight of a block and the number of blocks that can safely be loaded onto a truck have a negative correlation ANSWER: The heavier the blocks, The fewer that can be loaded onto the truck


What is the syntax of a conditional statement in JavaScript?

In JavaScript we have the following conditional statements:if statement - you would use this statement to execute some code only if a specified condition is trueif...else statement - you would use this statement to execute some code if the condition is true and another code if the condition is falseif...else if....else statement - you would use this statement to select one of many blocks of code to be executedswitch statement - you would use this statement to select one of many blocks of code to be executedFor example: If StatementUse the if statement to execute some code only if a specified condition is true. Syntaxif (condition) {code to be executed if condition is true}If...else StatementUse the if....else statement to execute some code if a condition is true and another code if the condition is not true. Syntaxif (condition) {code to be executed if condition is true}If...else if...else StatementUse the if....else if...else statement to select one of several blocks of code to be executed. Syntaxif (condition1) {code to be executed if condition1 is true}else if (condition2){code to be executed if condition2 is true}else{code to be executed if condition1 and condition2 are not true}else{code to be executed if condition is not true}


What is the similarity between 'if' statement ans 'switch' statement?

A Switch statement can be considered as a series of if. else if. else statements. whatever condition is satisfied, the code block would get executed. if (cond 1) { } else if (cond 2) { } else if (cond 3) { } ...... } else if (cond N) { } else { } switch { case 1: .... case 2: .... .... case N: ... default: ... } Difference: In the if else blocks, if one condition is satisfied, all other blocks are ignored In Switch blocks, unless you have break statements inside each condition block, the subsequent blocks would not be ignored.


Why for loop is not terminated in c?

Of course the for loop is terminated in C. All statements are terminated. Look at the syntax of the for statement... for (init-statement; test-condition; loop-statement) body-statement; That looks quite terminated to me. (By the semi-colon) Perhaps you are thinking about statement blocks... for (init-statement; test-condition; loop-statement) { statement; statement; ... statement; } ... Well, that is just fine because the body-statement, like any other statement, can be replaced by one or more statements enclosed in braces. There is still a terminating semi-colon on each statement. if i am understanding ur ques. right then according to me it is correct that for loop is not terminated because we do not execute for loop.we only check the conditions. those statements are terminated which we want to execute. because using a semicolon or terminating the statement means that statement is execitable.


Fill in the blank The method of the allows you to combine related conditional statements?

The method of the if...else statement allows you to combine related conditional statements. This statement provides a way to execute different blocks of code based on whether a specified condition is true or false.


What are casing blocks and packing blocks?

casing blocks are blocks of lime stone.


What is dangling if else problem?

The dangling else problem occurs when an if-else construct is ambiguous, and it is unclear which if statement should be associated with the else statement. This can lead to unintended behavior in the code if not handled properly. It is recommended to use braces to explicitly define the scope of if-else blocks to avoid this issue.


If a person left a place and went 8 blocks west then 4 blocks south then 3 blocks east then 2 blocks north then 5 blocks east how many blocks is he away from where he left?

2 blocks south


How many city blocks from starting point if you walked 4 blocks north then 5 blocks west after that 8 blocks south then 7 blocks east and finally 4 blocks south?

You finish 2 blocks east and 8 blocks south of your starting point.


If you walked 3 blocks north and then 2 blocks east how would you get home if you walked backwards?

2 blocks west and then 3 blocks south