Geeks Projects C
Every Program is here !!!
Pages
Home
Asp.Net
Java Programming
Web Programming
Thursday, 2 October 2014
WAP to print length of String.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char s[100];
char *a=s;
int x=0;
printf("\nEnter the String ");
gets(s);
while(*a)
{ a++;
x++;
}
printf("\n\tLength of String is : %d",x);
getch();
}
No comments:
Post a Comment
Please write your doubts
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Please write your doubts