answersLogoWhite

0


Best Answer

length = strlen(string);

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Find length of the string without using loops and control structures?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between string and char array?

3 differences.................. 1. length wise.... 2.initialization 3. null terminated length of char array is differ from string........ initialization of string is differ from char....... and string is null terminated...........


How can find the length of a string in java without using fun?

Use length() method. Example: "java".length();


How do you get the length of an ANSI string using PHP?

$string ="Guess my length"; $length = strlen($string); now the $length will have the length of the string.


How do you scramble a string in java?

Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.Take out one letter, using a random number. Then replace the string with the new string, without the extracted letter. Repeat, until the remaining string has a length of zero. The extracted letters get added to a new string.


What is the constant string length method?

To get the length of the string we use length property. The length property returns the length of a string (number of characters we use).If the string is empty, length of the string will be 0. Syntax: string.length Hope this helps.


How do you find the length of string without using strlen function in MySQL?

SELECT char_length (...) FROM ...


How do you display a text reversely in C language without using onlu simply input and output?

#include<stdio.h> #include<conio.h> void main() { char string[20]; int i=0; printf("Enter the string.\n"); while(i<=19) { scanf("%c",&string[i]); i++; } while(i>=0) { printf("%c",string[i]); i--; } getch(); } In this program it is compulsory to enter 20 characters. Now we can write a program in which it is not necessary. #include<stdio.h> #include<conio.h> #include<string.h> void main() { char string[20]; int length; printf("enter the string.\n"); gets(string); length=strlen(string); length--; while(length>0) { printf("%c",string[length]); length--; } getch(); }


What is the length of a string to the nearest centimeter?

It is exactly equal to the length of string you have measured in centimeters.


What are the string-like structures that attach to the atrioventricular valves of the heart?

Chordae tendinae are the string-like structures that attach to the AV valves of the heart.


How do you count the number of words in a string?

To find the length of the string we use length method. The length property returns the length of a string (number of characters we use).The length of an empty string is 0. For example: function myFunction() { var str = "Hello World!"; var n = str.length; Hope this hepls.


If the length of a piece of string... is any length of string cut from a spool... 'what is the maximum length of a piece of a piece of string' or 'how much string is on a spool'?

100 metres seems to be the length of a spool of gardeners cotton Discuss:How_long_is_a_piece_of_string...we are not talking about jute twine here!So the maximum length of a piece of string would be 999.99mm!So the real answer to 'how long is a piece of string?' would be...anything between 0.01mm to 999.99mm.


What is the law for length?

Law of length"For a given string under constant tension, the frequency of vibration is inversely proportional to the length of the string".