title: Converting string to int using sprintf inside linux kernel
body: <p>I am trying to convert the char array into <code>int</code> using the <code>sprintf</code> but always getting segmentation fault (core dumped).</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
    unsigned int n;
    sprintf("ff01","%u",n);
    printf("value of n = %u ",n);
  }
  </code></pre>
  
  <p>What wrong I am doing here? <code>sprintf</code> is used to store the data in the formatted string format but cant it be used to retrieve the <code>int</code> from the string?</p>
  
  <p>I need to to do this inside the linux kernel.</p>