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 use of putchar function?

1031


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1043


How many types of arrays are there in c?

1016


What is extern variable in c with example?

970


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1046


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4643


What is gets() function?

1090


Describe dynamic data structure in c programming language?

1056


When should you not use a type cast?

1079


What is wrong with this program statement?

1001


Define and explain about ! Operator?

967


Stimulate calculator using Switch-case-default statement for two numbers

2936


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1063


Explain what is the benefit of using #define to declare a constant?

1123


What is c programming structure?

1130