/*count total lengh of string */ #include #include void main() { char str[10]; int i=0; printf("\n\t Enter the string"); gets(str); while(str[i]!=NULL) { i++; } printf("\n\t lengh of string=%d",i); }
/*Count the length of string*/ #include #include void main() { char str[10]; int i=0; printf("\n\t Enter the string"); gets(str); while(str[i]!=NULL) { i++; } printf("\n\tlength of string=%d",i); }
/*count total lengh of string */ #include #include void main() { char str[10]; int i=0; printf("\n\t Enter the string"); gets(str); while(str[i]!=NULL) { i++; } printf("\n\t lengh of string=%d",i); }
/* PROGRAM TO CALCULATE LENGTH OF STRING */ # include # include void main( ) { int i=0; char str[20]; printf("\n Enter a string:"); scanf("%s",str); // Accepting string from the user. while (str[i]!=NULL) // Checking till the end of string i.e. NULL. { i++; // i++ s will count string length } printf("\String length is =%d",i); }
/*Lenth of string*/ #include #include void main() { int i=0; char str[8]; printf(" enter a string"); gets(str); while(str[i]!=NULL) { i++; } printf("length of string=%d",i); }
#include
ReplyDelete#include
void main()
{
char str[100];
int i=0;
printf("enter a string=\n");
gets(str);
while (str[i]!=NULL)
{
i++;
}
printf("length of string=%d\n",i);
}
#include
ReplyDelete#include
void main()
{
int i=0;
char str[20]={"krishna sontakke"};
printf(" %s \n",str);
while (str[i]!=NULL)
{
i++;
}
printf("\n Length of string=%d \t",i);
}
/*count total lengh of string */
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0;
printf("\n\t Enter the string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\n\t lengh of string=%d",i);
}
/*count length of string*/
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0;
printf("\n\t enter length of string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\n\t length of string=%d",i);
}
/*Count the length of string*/
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0;
printf("\n\t Enter the string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\n\tlength of string=%d",i);
}
#include
ReplyDelete#include
void main()
{
char str[5];
int i=0;
printf("\n enter the string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\n lenght=%d",i);
}
#include
ReplyDelete#include
void main()
{
char s[10];
int i=0;
printf("\n\tt enter a string ");
gets(s);
while(s[i]!=NULL)
{
i++;
}
printf("length of string=%d",i);
}
//length of string without using string function
ReplyDelete#include
#include
void main()
{
char str[100];
int i=0;
printf("enter a string=\n");
gets(str);
while (str[i]!=NULL)
{
i++;
}
printf("length of string=%d\n",i);
}
/*count total lengh of string */
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0;
printf("\n\t Enter the string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\n\t lengh of string=%d",i);
}
/*Length of string*/
ReplyDelete#include
#include
#include
void main()
{
char str[7];
int i;
printf("\n\t enter string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("length of str=%d",i);
}
#include
ReplyDelete#include
void main()
{
char str[50];
int i=0;
printf("\n\t Enter the string");
scanf("%s",str);
while(str[i]!=NULL)
{
i++;
}
printf("\n\t Length of String=%d",i);
}
/* PROGRAM TO CALCULATE LENGTH OF STRING */
ReplyDelete# include
# include
void main( )
{
int i=0;
char str[20];
printf("\n Enter a string:");
scanf("%s",str); // Accepting string from the user.
while (str[i]!=NULL) // Checking till the end of string i.e. NULL.
{
i++; // i++ s will count string length
}
printf("\String length is =%d",i);
}
/* length of string */
ReplyDelete#include
#include
#include
void main()
{
char str[10];
int i=0;`
printf("enter string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("length of string=%d",i);
}
/*Lenth of string*/
ReplyDelete#include
#include
void main()
{
int i=0;
char str[8];
printf(" enter a string");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("length of string=%d",i);
}