Skip to main content
Write a program to calculate the length of the string using pointers.
CODING:
#include <stdio.h>
#include<conio.h>
void main()
{
 char text[50]="BCA Support";
 char *ptr=text;
 int len;
 clrscr();

 len=strlen(ptr);
 printf("\nString length = %d",len);

 getch();
}

Comments