(d) Write a program in ‘C’ using printers to find the length of a given string.

, , No Comments

C Program to Find the Length of a String Using Pointers

#include <stdio.h>
#include <string.h>

int main() {
char str [] = "Hello World";
int length;
length = strlen (str);

printf("Length of the string is: %d\n", length);


    return 0;

}

c

0 टिप्पणियाँ:

Post a Comment