title: How to check if a string returned by scanf is null
body: <p>I'm reading an input string from the user with <code>scanf().</code></p>
  
  <p>I want to check if this string is NULL (\0) or not.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  char *argument; // argument for mycat
  scanf("%s", &amp;argument);
  
  if(fork()==0)       // at child
  {
      printf("Child process: about to execute \"mycat %s\"\n", &amp;argument);
      fflush(stdout);
      if(strcmp(argument, "") == 0) // &lt;-- Here is the problem
      {
  
          execlp("mycat", "mycat", &amp;argument, NULL);      // execute child process
      }
      execlp("mycat","mycat", NULL);
  }
  </code></pre>
  
  <p>I'm compiling with g++ compiler on Red Hat 6.1</p>
  
  <p><strong>Edit:</strong> The problem is that I'm not able to dereference <code>argument</code> either for the <code>if</code> statement or even for use with <code>strlen()</code>.</p>