C Program to Add digits of the number using single statement


Add Digits of the Number Using Single Statement :

Output :

How ?

  • In ‘For Loop‘ Condition is first tested and then body is executed.
  • Carefully Look at Semicolon at the end of ‘For Loop’ , which tells us two Things –
    • For Loop is Bodyless.
    • Only Condition and Increment Statements will be executed.