You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a c program to find the length of string using pointer & Function user defined function
#include<stdio.h>
#include<conio.h>
void main()
{
int strlength(char *),toc;
char str[80];
printf("\nEnter a string:");
gets(str);
toc=strlength(str);
printf("\nTotal Charscter=%d",toc);
}
int strlength(char *s)
{
int tc=0;
while(*s!='\0')
{
tc++;
s++;
}
return tc;
}
The text was updated successfully, but these errors were encountered:
Write a c program to find the length of string using pointer & Function user defined function
#include<stdio.h>
#include<conio.h>
void main()
{
int strlength(char *),toc;
char str[80];
printf("\nEnter a string:");
gets(str);
toc=strlength(str);
printf("\nTotal Charscter=%d",toc);
}
int strlength(char *s)
{
int tc=0;
while(*s!='\0')
{
tc++;
s++;
}
return tc;
}
The text was updated successfully, but these errors were encountered: