Computer Science, asked by spondongogoi98, 11 months ago

What is the difference between simple and compound statement ? (Answer for 5 marks)

Answers

Answered by jainmayank81
11

Answer:

Following is the difference between Simple and Compound statement;

  • Simple statement (sentence) is one which has only one subject and one predicate.
  • A Compound statement (sentence) is one which has two or more independent clauses consisting of their own subject and predicate.

I hope it helps you

Answered by TanikaWaddle
4

Simple and compound statement in C

Explanation:

1. simple statements that do not contain other statements whereas  compound statements that have other statements inside them.

2. The simplest kind of statement in C is an expression (followed by a semicolon, the terminator for all simple statements). Its value is computed and discarded. whereas

A compound statement (also called a "block") typically appears as the body of another statement, such as the if statement. Declarations and Types describes the form and meaning of the declarations that can appear at the head of a compound statement.

#Learn more :

3. example of simple : x = 2;      /* an assignment statement */

example of compound :

if(houseIsOnFire) {

                          /* ouch! */

                         scream();

                         runAway();

                                               }

#Learn more :

https://brainly.in/question/10351872

Similar questions