Can we specify variable field width in a scanf() format string?

          

Variable field


<<Previous   Next>>
C - specify variable field width in a scanf() format string - Jan 11, 2010 at 17:20 PM by Vidya sagar

Can we specify variable field width in a scanf() format string? If possible how?

It is possible to specify variable field width in a scanf() format string. By using %s control string. This character reads a string of variable field width up to the first white space character. 

Ex: scanf(“%s”, name); // where name is a character array     

<<Previous   Next>>

Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
 
Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us