title: Error: expected expression in else if statement
body: <p>This is the error I am getting:</p>
  
  <pre><code>test.c:110:21: error: expected expression
                      else if(isupper(p_i))
                      ^
  1 error generated.
  </code></pre>
  
  <p>In an <code>else if</code> statement towards the end of the code—"<code>else if(isupper(p_i))</code>"—the error is generated.</p>
  
  <p>I have commented above this 'else if' statement.  Please let me know what's wrong. Thank you.</p>
  
  <pre><code>#include &lt;stdlib.h&gt;         // The library which contains the 'atoi()' function
  #include &lt;stdio.h&gt;          //        
  #include &lt;cs50.h&gt;           // typedef char *string; and GetString()
  #include &lt;string.h&gt;         // 
  
  // 'argv[]' is an array of strings.  (Fun fact: A string is an array of characters.) 
  // 'argc' is the integer variable which stores the number of strings that are in 'argv[]'.
  
  
  int main(int argc, string argv[])
  {
      // VARIABLE DECLARATIONS
      int k;                      // Integer variable for the non-negative, encryption key
      string plaintext;           // Variable to store the information to be encrypted
      int n;                      // Integer variable for the string length
      string ciphertext = NULL;   // Variable to store the encrypted information
  
      // This loop analyzes the command-line argument(s): We need exactly one argument (i.e. argc = 2)
      if (argc &gt; 2)
      {
          printf("\n");
          printf("Too many arguments. Please try again.\n");
          return 1;
      }    
      else if (argc &lt; 2)
      {
          printf("\n");        
          printf("This program requires that you provide an argument. Please try again.\n");
          return 1;
      }
      else if (argc == 2)
      {
          k = atoi(argv[1]);
          if (k == 0 || k &lt; 0)
          {
              printf("\n");               
              printf("Invalid input: encryption key needs to be a non-negative integer.\n");
              return 1;
          }
      }
  
      // Prompt the user for a string input to be encrypted:
      printf("\n");
      printf("Please enter the information to be encrypted:\n");
  
      plaintext = GetString();
      n = strlen(plaintext);
      printf("n = %d \n", n);
  
      // We need to implement Caesar's Cipher algorithm:
      // But first, we select for alphabets only by using the 'isalpha()' function:
      for (int i = 0; i &lt; n; i++)
      {
          int p_i = plaintext[i];
          int isalpha(int p_i);
          if (isalpha(p_i))
          {
              int islower(int p_i);
  
              if (islower(p_i))
              {
                  printf("Caesar's algorithm for the lower case goes here.\n");
              }
  
              int isupper(int p_i);
  //-----------------------------------------------------------
  // THE FOLLOWING else if STATEMENT IS THE SOURCE OF THE ERROR
  //-----------------------------------------------------------
              else if(isupper(p_i))
              {
                  printf("Caesar's algorithm for the upper case goes here. \n");
              }
          } 
          else 
          {
              for (int j = 0; j &lt; n; j++)
                  ciphertext[i] = plaintext[i];
          }   
      }
  
      // Program terminates
      return 0;
  }
  </code></pre>