title: How does the compiler know the prototype of printf( ) in this code?
body: <p>In the following code,</p>
  
  <pre><code>#include&lt;conio.h&gt;
  clrscr();
  gotoxy(10, 20);
  ch= getch(a);
  </code></pre>
  
  <p>we can see that the library functions have  been called without defining their prototype, the three library functions: <code>clrscr() gotoxy(int int)</code> and <code>getch()</code> have their prototypes defined in the conio.h header file which appear in the header file itself like this,</p>
  
  <pre><code>void clrscr();
  void gotoxy(int int);
  int getch();
  </code></pre>
  
  <p>But in the following code how does the compiler know the prototype of the <code>printf()</code> function? Since the code gets executed without any errors, although in the first <code>printf()</code> the last int format specifier prints the garbage value and in the second the value of <code>j</code> doesn't get printed at all since it has not been specified.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int i=10, int j=20;
  printf("%d%d%d",i,j);
  printf("%d",i,j);
  </code></pre>
  
  <p>How does the header file stdio.h describe the scenarios when the format specifiers are float or char variables for the <code>printf()</code> functions?</p>