#include <iostream>
#include <conio.h>
#include <stdio.h>
#include<string.h>
using namespace std;
int main()
{
char str[100];
int i,CharT;
CharT=0;
cout<<"Input the string to count\n";
gets(str);
for(i=0; str[i] != '\0'; i++){
CharT++;
}
cout<<"The total characters of the given string= "<<CharT;
getch();
return 0;
}
Comments
Leave a comment