title: How to check a buffer in C?
body: <p>I have a buffer of size 1500. In that buffer I need to check whether 15 bytes are all zeros or not (from 100 to 115). How can we do this (if we do not use any loop for it)? Data is of type "unsigned char", actually it is an unsigned char array. </p>
  
  <p>Platform : Linux, C, gcc compiler</p>
  
  <p>Will using <code>memcmp()</code> be correct or not? I am reading some data from a smart card and storing them in a buffer. Now I need to check whether the last 15 bytes are consecutively zeros or not. 
  I mentioned <code>memcmp()</code> here because I need an efficient approach; already the smart card reading has taken some time. </p>
  
  <p>Or going for bitwise comparison will be correct or not . Please suggest .  </p>