C++ Program to count number of characters words and lines in a file. By using this program we can find the number of letters in the letter or character entered by the user in output. It will help for the note writers and some other educanist.
using namespace std;
cout<<"Enter the letter or characters\n";
for(i=0; str[i] != '\0'; i++)
cout<<"The total characters are present in the program "<<value;
Enter the letter or characters
The total characters are present in the program 10
Post Increment in C++ Program
Post-increment operator: A post-increment operator is used to increase the value of a variable after the expression has been fully executed. Value is first utilized in an expression and then increased in the Post-Increment.
For Loop in C++ Program
A loop is used to continually execute a set of statements until a certain condition is met. When showing numbers from 1 to 100, for example, you might wish to set the value of a variable to 1 and display it 100 times, raising its value by 1 with each loop iteration.
Operator in C++
Increment operators are used to increase the value by one, whereas decrement operates in the opposite direction of increment. Pre-increment I The value is incremented by one before being assigned to the variable. Post-increment (i++) The value is increased after it has been assigned to the variable.
If Else Statement in C++