HOME

Start

Control Statements

Array

Function

Structure

Pointer

File

Projects

 

 

 

 

 

 

C programing

Ckalari.com is the No.1 website to get the best of C programs, free source codes, projects in c language……  

A C program to find length of string using pointer

#include<stdio.h>

#include<conio.h>

void main()

     {

    char s[100];

    char *p;

    int length;

    clrscr();

    printf("Enter a string\n");

    scanf("%s",s);

    for(p=s;*p!='\0';p++);

    length=p-s;

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

    getch();

     }

Copyright © 2007-2008 www.ckalari.com