google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Tuesday, 15 April 2014

Program check the length of string without using string function i c++

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
char str[50];
int i;
clrscr();
cout<<"\n"<<"Enter a String: ";
cin.getline(str,50);
cout<<"\n"<<str<<"\n";
for(i=0;str[i]!='\0';i++);
cout<<i;
getch();

}

0 comments:

Post a Comment