C++ Lanuage | String Counts

Tuesday 11 June 2013

Have you tried counting string inputs manually? Isn't it difficult? That is why I made a program that enables a user to input his desired string length and string name then activates the program to count how many characters are there in the input.

We all know that a string is a random inputs of different characters. Today, I'm about to show you how to count characters in a srtring input. This program is used with the string length statement which enables the program to count how many characters are there in a string. Check out the sample code below.

#include <iostream>
#include <conio.h>
#include <stdio.h>
#include <string.h>

int main()
{
    char string[127];
   
    std::cout<<"Enter a string: ";
Related Posts Plugin for WordPress, Blogger...