/*
============================================================================
Name : C-Programming
Author : Code2care
Version : 1.0
Copyright : Code2care.org
Description : 107 : Program to find number of TABS in entered String.
============================================================================
*/
#include
#include
int main(void) {
int ch, tabs=0;
printf("Enter a string (add ~ sign to exit input mode) : \n");
while ((ch = getchar()) != '~')
if (ch == '\t')
++tabs;
printf("Number of Tabs in the Text : %d", tabs);
return 0;
}
The best way to learn C programming is to practice more and more of programs .
Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.
BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.