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
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
How do you construct an increment statement or decrement statement in C?
What are the different types of linkage exist in c?
With the help of using classes, write a program to add two numbers.
Is c still relevant?
What is #define used for in c?
Why c is called procedure oriented language?
Explain how can I open a file so that other programs can update it at the same time?
How to declare pointer variables?
Write a program to print "hello world" without using a semicolon?
What is nested structure?
What is the scope of static variable in c?
what is the function of pragma directive in c?
Differentiate between ordinary variable and pointer in c.
Explain what is the difference between text files and binary files?