Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Len Str Poin #430

Open
bca072024 opened this issue Jul 12, 2024 · 0 comments
Open

Len Str Poin #430

bca072024 opened this issue Jul 12, 2024 · 0 comments

Comments

@bca072024
Copy link

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant