strlen
#include <stdio.h>
#include <string.h>
int main() {
// Write C code here
//char str[]="Sayan Bhai";
char *str = "Sayan Bhai";
str="hello bhai";
puts(str);
int a = strlen(str);//will calculate lenght excluding '\0', null char
printf("Lenght of string is %d",a);
}
Comments
Post a Comment