You read every character in the string in a loop and check with the following condition for TAB
tab=0;
if(ch=='\10')
tab++;
For word check Kernighan Ritchie Book the program is given there
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.