Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Create cyXawI.cpp #1634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions YP8v5m/cyXawI.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <iostream>
using namespace std;

int main()
{
//Initializing variable.
char str[30];
int i,length=0;
//Accepting input.
cout<<"Enter the string:";
gets(str);
//Initializing for loop.
for(i=0;str[i]!='\0';++i)
{
length++;//Counting the length.
}

cout<<"Length of the string is:"<<length<<endl;

return 0;
}