#include<conio.h>
#include<stdio.h>
#include<iostream.h>
#include<string.h>
#define MAX 80
void main()
{
clrscr() ;
int count=0;
char string1[MAX+1] ;
puts("Enter The String \n");
gets(string1);
puts(string1);
for(int i=0;string1[i]!='\0';i++)
{
count++;
}
cout<<"The Length of String is " <<count<<"\n";
getch();
}
#include<stdio.h>
#include<iostream.h>
#include<string.h>
#define MAX 80
void main()
{
clrscr() ;
int count=0;
char string1[MAX+1] ;
puts("Enter The String \n");
gets(string1);
puts(string1);
for(int i=0;string1[i]!='\0';i++)
{
count++;
}
cout<<"The Length of String is " <<count<<"\n";
getch();
}
No comments:
Post a Comment