Hey guys. I started learning C today, and so far, the material has been fairly logical and pretty straight forward (if not a little overwhelming because of the jargon). I just finished the second tutorial on C, and learning about "if" statements has been fun and challenging at the same time to me as there are many ways to play around with the conditions of the statements that make them true. Anyway, I've been thinking about one particular thing: the "else if" statement.

The main thing that troubles me is its usefulness. Why use the "else if" if you can just put another "if" statement in there? For example, the second C tutorial of the site gives me the following code. I want you to pay attention to the bold parts, specifically:

Code:
#include <stdio.h>	

int main()                            
{
    int age;                        
  
    printf( "Please enter your age" );  
    scanf( "%d", &age );                
    if ( age < 100 ) {               
     printf ("You are pretty young!\n" ); 
  }
  else if ( age == 100 ) {
     printf( "You are old\n" );       
  }
  else {
    printf( "You are really old\n" );     
  }
  return 0;
}
So if I input '100,' it'll give me "You are old!"
Clearly, it seems to me that the bold parts of the code can also be written as:

Code:
...
if (age < 100)
...
if (age == 100)
...
According to the conditions of the "else if" statement, if the first statement is true, then it will be ignored. And by contrast, if the first statement is false, then it will be checked. Changing the "else if" statement to an "if" statement here seems to yield the same result anyway ("You are old"), so I wonder why it's even necessary at all.

Since I'm a novice at this, I probably don't have sufficient understanding of the features of the language to understand the intricacies of such topics (or I'm completely missing something here), but I can't shake this curiosity. Could you explain to me or give me some examples of code where changing an "else if" statement to an "if" statement would not work or would make the situation horribly tedious or inefficient? Thanks for reading. I know I tend to ramble quite a lot.