What are statements?

Asked 13-Nov-2017
Viewed 509 times

1 Answer


0

“Statement”
In term of programming language, the statement is a command that the programmer has given to the computer system for performing the specific action. A Computer program is the collection of statements. 

"Flowchart  of Statement"

What are statements?
Types of Statement
  1. Simple Statement
  2. Compound statement
Simple Statement
  1.  assignment (=)
  2.  goto
  3.  return

Compound Statement
if-statement:
if(condition){…..} else {…..}
switch-statement:
switch (c) { case 'a': alert(); break; case 'q': quit(); break; }
Looping Statement
do-while loop
Syntax :- do {
 ………..
………..} while (condition);
for-loop:
for(initialization, condition, inc/dec)
{
………
………
}