Using strlen

 #include<stdio.h>

#include <string.h>


int main(){

    char *st = "sunil";

    int a = strlen(st);

    printf("The length of string st is %d", a);

    return 0;

}

Comments

Popular posts from this blog

Snake game.c

Type declaration

Array with function