title: Find Longest Word in C
body: <p>I want to find longest string from array of strings by taking command line arguments. I can receive command line arguments, but what's wrong with my logic?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main(int argc, char *argv[]) {
  
      int i;
      char *c = argv[1];
      int maxSize = strlen(argv[1]);
  
      for(i=2;i&lt;=argc;i++){
          int len = strlen(argv[i]);
          if(len&gt;maxSize){
              maxSize = len;
              c = argv[i];
          }
      }
  
      printf("Max length string : %s", c);
  }
  </code></pre>