Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

how fastread function is faster than scanf function?

$
0
0

please tell me that how fastread function performs faster than scanf here is the code for fastread

inline void fastread(int*a)


{

   register char c=0;

   while (c<33)

    c=getchar();

   *a =0;

   while(c>33)

   {

       *a = *a*10+c-'0';
       c=getchar();
   }

}

Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>