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 / vignesh1988i

#include<stdio.h>
#include<conio.h>
int str_len(char *)
void main()
{
char s[30];
int count;
printf("enter the string :");
gets(s);
count=str_len(s);
printf("the length is :%d",count);
getch();
}
int str_len(char *a)
{
int i=0;
while(*a!='\0')
a++;
i++;
}
return i;
}

thank u

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is logical error?

1060


What is assert and when would I use it?

962


What is a structural principle?

1089


Write a program to print "hello world" without using a semicolon?

1002


What do you mean by command line argument?

1097


What is meant by int main ()?

1154


What are 3 types of structures?

1023


What is putchar() function?

1072


What are pointers? Why are they used?

1112


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1045


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2231


‎How to define structures? · ‎

1028


Which is better between malloc and calloc?

1118


What is a pointer on a pointer in c programming language?

1090


What does c mean?

971