string length in c without using strlen and string header

Solutions on MaxInterview for string length in c without using strlen and string header by the best coders in the world

showing results for - "string length in c without using strlen and string header"
Bridie
15 Nov 2017
1#include <stdio.h>
2// function for string length
3int string_length(char str[])
4{
5    int i;
6    // you can use while loop
7    for( i = 0; str[i] != '\0';i++);
8    return i;
9}
10int main()
11{
12    // declaring character array
13    char your_name[20]; // you can change the maximum size of string
14    printf("Type you full Name : ");
15    // taking input from user
16    gets(your_name);
17    // using string length function
18    int length = string_length(your_name);
19    // printing string length
20    printf("\nLength of your name (%s) is : %d \n\n",your_name,length);
21
22}
23
queries leading to this page
find length of a string in cinput variable length strings in c string length in c without using strlenhow to use strlen in cc get length of c 2afind string length in c without using strlenget length of string cstring length in cfind str len cc string lengthstring length in c without using strlen and string headerc program to find length of stringc programming define length of stringhow to use strlen function in ccheck length of string in cc string lengthstring length program cwhat is strlen chow to get the length of a string in c without strlenfind length of string in c without using strlenhow to get the size of string in cstring length in c without using length method how to calculate string length in c without using strlenwhat does strlen return in clength of string in clength string cget string size in clength c stringstring size cfind a length of a string in chow to find the length of the string in cc string length sizeofhow to get string in c without lengthlength of string using print in chow to get length of string ic chow to get the length of a string in c safelylength of string in c without strlenfunction for getting length of c stringlenght of string in cget string length cwriting a function in c that returns the length of a stringc program to find string length without using strlenstring lrnght csize of string in cvariable length string in cwhat is the size of string in cget length of string in cstring lenth operation in cstring length in c use of strlen 28 29 in chow to find string length in c using pointerchecking length of a string in chow to get a string length in clength of a string in cc check string lengthc string lengthoflenght string cstr len in cfind the length of string in chow to find length of a string in c 25c in c for strings length 2string size in clength of a string cwhat should a length of string be in cc get length of stringlength of string without using strlen in cc program string length without strlenhow to coun length of string in clength of string in c with strlenreducing length of string in cprogram in c to find the length of a string what is strlen in chow to check length of string cstring length function ion chow to take the length of a stringh a ccalculate length of string in cstring length function in cstr len clength function in cwrite a c program to find the length of a string length 28 29 chow to find the length of a string in c length csize of string cfind length of string in cvariable length string clength of string in c whith whiel how to find the length of a string clen in cwhy we use strlen 28 29 in cc program to print length of string without using strlen functionc find length of stringcount length of string in cc length of stringc get string lengthc string length char 2a 2aprint string with length clength of a string using pointer in cc get lenght of stringlen string cgetting length of string in clength of string in cstring length in c using strlenvariable length clength in c languagehow to see length of string cstring length c string length without using strlen in cdisplay a string length with strlen in clength in chow to get the length of a string in chow strlen works in chow to find length of string in c without using strlenstring length in c without using strlen and string header