title: How to get the first 2 digits of a value passed from main in C?
body: <p>My program asks the user for a year like 2056. So in main, I use scanf. </p>
  
  <p>However, I have a function which requires the first 2 digits of this value only. </p>
  
  <p>I've tried using another scanf inside the function itself scanf("%2d"...) but then I can't have the other scanf in main for my other functions.</p>
  
  <p>So how can I do this?</p>