answersLogoWhite

0


Best Answer

In computer programming, a "string" usually refers to an array of characters. A string may consist of nothing (an empty string) or as many characters as are allowed in an array. To denote a string, surrounding a list of characters by double quotes is the typical standard.

Strings:

* "" * "abc" * "Cows say 'Moo!'" * "http://wiki.answers.com"

Numbers are those fun symbols you remember from math class. The confusing part is when a string contains numbers ("123"). Usually a programming language will have a way to convert between a string of numbers and an actual number type, in case you happen to need to do math with the string.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

A String in C is an array of characters. An array is just a sequence of similarly-typed elements that are stored in consecutive memory locations and can be accessed by using the array index.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a string and a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between a C plus plus string and a C-style string?

A std::string is an object that encapsulates an array of type char whereas a C-style string is a primitive array with no members. A std::string is guaranteed to be null-terminated but a C-style string is not.


What is the difference between rope cord and string?

Don't be too much confuse about this question it is simple. Their difference is their speeling and their pronunciation. See? very simple.. satisfied??


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


What is difference between System.String and System.StringBuilder classes?

String and StringBuilder classes are used to store string values but the difference in them is that String is immutable (read only) by nature, because a value once assigned to a String object cannot be changed after its creation. When the value in the String object is modified, a new object is created, in memory, with a new value assigned to the String object. On the other hand, the StringBuilder class is mutable, as it occupies the same space even if you change the value. The StringBuilder class is more efficient where you have to perform a large amount of string manipulation.


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.

Related questions

Difference between character and string?

A string ends with a '\0' character,but character is not.


What is the difference between rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


Whats The difference between a 6 and 7 string guitar?

There is practically no difference. The 7-string guitar has one lower string that the 6-string does not. It is usually tuned to B(natural).


What is the difference between thread rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


What is the difference between a factor string and prime factorization?

A factor string consists of any factors (except 1) that multiply to equal the number. Prime factorization consists of only prime numbers that multiply to equal the number. In the case where the factors of the original number consists only of primes, there is no difference.


Is there a difference between leather and string when weaving?

yes


What is the difference between string and class?

A string is a specific class that is used for dealing with text data


Difference between thong and g-string?

g string only has a string in the back thong has triangle of fabric g string= T thong = Y


What is the difference between A and A in string?

Well, A is an identifier; 'A' is a character-literal; "A" is a string literal (of 1 character); "'A'" is another string literal (of 3 characters).


What is the difference between 'a' and a in C?

a -- identifier 'a' -- character-literal "a" -- string-literal


What is the difference between quantum gravity and string theory?

kl;hvczvhy


What is the difference between an ernie ball slinky string and a super slinky string?

super slinkys are easier to bend notes on