answersLogoWhite

0


Best Answer

Yes.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can compound statements be used in place of simple statements?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a statement in C plus plus?

A statement may be simple or compound. The following examples are all simple statements: int i=1; i++; std::cout<<i<<std::endl; Note that a simple statement ends with a semi-colon. A compound statement is a group of simple statements enclosed in braces. Compound statements usually begin with an opening statement, such as for, if, switch, etc. for(int i=0; i<10; ++i) { int j=i*i; std::cout<<j<<std::endl; } In this example, the compound statement begins with the for keyword and ends at the closing brace. Everything between the braces is treated as a single statement composed from simple statements. If there were only one simple statement, the braces would be optional, but the statement would still be regarded as a compound statement. The comma operator can also be used to form compound statements (braces are neither required nor implied): int i=1, j=2; The compiler treats this as if it were written in full: int i=1; int j=2;


What is the difference between ternary operators and if-else statement?

ternary is a single statement operator while even the most primary form of if else contains an if and an else statement. ternary only returns a value but if else can be used to do a lot of other things like printing, assigning values or just returning true or false.


What is the notation used to place block of statements in a looping structure in C plus plus?

for( ; ; ) { statement_block; } while( conditional_expression ) { statement_block; } do { statement_block; }while( conditional_expression )


Various jump statements in c?

Jump StatementsBranching is performed using jump statements, which cause an immediate transfer of the program control. The following keywords are used in jump statements:breakcontinuegotoreturn


How can simple machines be used?

Simple machines can be used to transport things.

Related questions

What is used to moidfy the simple subject?

Adjectives are used to modify both simple and compound subjects.


What is a compound statement?

A compound statement is a logical statement that combines two or more simpler statements using logical connectives (such as "and," "or," "not"). The truth value of a compound statement is determined by the truth values of its component statements and the logical operators used to connect them.


What is the purpose of compound eyes for grasshoppers?

Compound eyes detect motion, and simple eyes detect light. or The compound eyes are used to "see". The simple eyes are used to detect light intensity.


Simple heterocyclic compound preparation pdf?

Benzene is usually used in the preparation of the simple heterocyclic compounds.


What is a statement in C plus plus?

A statement may be simple or compound. The following examples are all simple statements: int i=1; i++; std::cout<<i<<std::endl; Note that a simple statement ends with a semi-colon. A compound statement is a group of simple statements enclosed in braces. Compound statements usually begin with an opening statement, such as for, if, switch, etc. for(int i=0; i<10; ++i) { int j=i*i; std::cout<<j<<std::endl; } In this example, the compound statement begins with the for keyword and ends at the closing brace. Everything between the braces is treated as a single statement composed from simple statements. If there were only one simple statement, the braces would be optional, but the statement would still be regarded as a compound statement. The comma operator can also be used to form compound statements (braces are neither required nor implied): int i=1, j=2; The compiler treats this as if it were written in full: int i=1; int j=2;


What types of functions are used to model both types of simple interest and compound interest?

f(x)= mx+b for simple interest t(n)= abx for compound interest


What is the difference between glycerin and glycine?

Glycerin is a simple compound that is colorless and odorless, that is usually used in medications. Glycine is an organic compound.


What common conjunctions can be used to join simple sentences together to form compound sentences?

Some common conjunctions used to join simple sentences and form compound sentences are "and," "but," "or," "so," and "yet."


Difference between simple and compound interest?

Simple interest is based on the original principle of a loan. Simple interest is generally used on short-term loans. Compound interest is interest added to the principal of a deposit or loan so that the added interest also earns interest from then on.


What way does a compound microscope differ from a simple microscope?

A compound microscope consists of several lenses operating together, whereas a simple microscope is one lens, like a magnifying glass. A compound microscope gives higher magnification and also better resolution than a simple microscope.


What is the difference between ternary operators and if-else statement?

ternary is a single statement operator while even the most primary form of if else contains an if and an else statement. ternary only returns a value but if else can be used to do a lot of other things like printing, assigning values or just returning true or false.


What simple experiment can be used to determine if a liquid compound contains polar molecules?

Thin Layer Chromatography (TLC) procedure can be used