title: C: Ways to use scanf
body: <p>Can I use <code>scanf(...)</code> as argument to a function ? 
  Like this:</p>
  
  <pre><code>printInteger(scanf(....));
  </code></pre>
  
  <p>Can I use <code>scanf</code> to attribute the value that I read to some variable ?
  Like this:</p>
  
  <pre><code>n = scanf(...);
  </code></pre>
  
  <p>p.s.: Here I'm explaining why I'm asking this.</p>
  
  <p>This question can be a little weird I know, but I'm working in a project, which is developing a compiler that takes some language as input and then compile to C.</p>
  
  <p>For example, this is my language, let's call 'stackoverflow' ;)</p>
  
  <pre><code>proc printInteger(integer k)
      integer i;
          begin
              for i = 1 to k do
                  print i;
          end
  
  proc main()
      integer n, i;
      boolean ok;
      begin
          printInteger(getInteger);
          n = getInteger;
          ok = true;
          while i &lt; n do
              begin
                  print i;
                  i = i + 1;
              end
          if ok then print 1; else print 0;
      end
  </code></pre>
  
  <p>I won't get deeper in the language, but notice that <code>getInteger</code> means that I would like to do a <code>scanf(...)</code>, what I mean is, when appears <code>getInteger</code> I would like to compile as <code>scanf(...)</code>, so that's why I would like to know some ways to use <code>scanf(...)</code>.</p>