Answers for "finding size of stirng in c"

C
2

size string C

#include <string.h>

void main(void)
{
	char str[] = "Hello";
	int str_size = strlen(str);
}
Posted by: Guest on August-05-2021
0

Length of string in c

#include <stdio.h>
int main()
{
    char s[] = "Dhiraj";
    int i=0;
    while(s[i] != '')
    {
        i++;
    }
    printf("length of string is %d", i);
    return 0;
}
Posted by: Guest on November-25-2021

Code answers related to "C"

Browse Popular Code Answers by Language