Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find string length wihtout using c function?

Answer Posted / ruchi

#include<conio.h>
#include<stdio.h>
int main()
{
char a[10];
int i=0,c,length=0;
printf("\nEnter the string ");
while((a[i++]=getchar())!='\n');
printf("\nThe lengh of the string is ");
i=i-1;
printf("%d",i);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the function of pragma directive in c?

1061


regarding pointers concept

1979


Explain continue keyword in c

962


What is the difference between c &c++?

1087


How can I open files mentioned on the command line, and parse option flags?

1015


What is masking?

1102


Describe wild pointers in c?

1060


What are the different types of control structures?

986


Why use int main instead of void main?

1072


What does a pointer variable always consist of?

1041


What are the main characteristics of c language describe the structure of ac program?

1149


What are the different types of objects used in c?

971


In c language can we compile a program without main() function?

1057


What is the use of structure padding in c?

1014


What are the storage classes in C?

1069