answersLogoWhite

0


Best Answer

Numeric variables store numbers for doing mathematics, counting etc.. String variables store printable sets of characters that can be read by humans in what ever language.

int i=3; /* a numeric variable in c */

char *hello = "Hello world, Im 3 years old" /* string that contains a number */

Computer languages generally provide many different ways to transform one into the other.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
User Avatar

Anuj Shrestha

Lvl 1
2y ago
Helo

Add your answer:

Earn +20 pts
Q: What is the difference between numeric and string variables?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you check if a variable is a string or an integer in PHP?

Integers - The "is_int()" function can be used to check if a variable is has an integer for its value. ---- is_int($variable); // Returns true if $variable is an integer - otherwise false ---- Numeric Strings - Numeric strings are strings with numbers (or things that count as numbers) in them. Numeric-string variables are not integer variables. Numeric-string variables are passed on through forms, instead of integer variables - if you were wondering. Check form values using string formats, and not integer formats. The "is_numeric()" function can be used to check if a variable is a string with numbers - and only numbers - in it (except things that add up to be numbers). ---- is_numeric($variable); // Returns true if $variable is a string, and only contains numbers (broadly speaking) - false otherwise ---- Strings - String values are just text, basically. String variables can contain integers, but that does not make it an integer-type variable - it makes it a numeric string variable. The "is_string" function can be used to check if a variable contains the value of a string. ---- is_string($variable); // Returns true if $variable is a string - false otherwise


What is the difference between numeric and string constant?

A numeric constant has a defined numeral value, eg.- 2, 9, 23, 168, etc. A string constant has a defined string value, or a value having english alphabets, eg.- 'A quick brown fox jumps over the lazy dog.'


How can assign a value to a variable in GB Basic?

to simply assign a variable a numeric value a=10 anything=12 etc for string variables a$="sweet" ex$="happy christmas" etc to assign a value by input input"enter numerical value";numeric input"enter string value";string$ i hope that clears it up


Must contain a number?

A numeric string.


Difference between character and string?

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


Difference between mysql fetch row and mysql fetch array in PHP?

Both return a row in a MySQL database and in most applications can be used interchangeably. The difference is that mysql_fetch_array has an extra argument called $result_type that allows the returned array to be associative (string keys) or numeric (the keys are 0..n). A mysql_fetch_array call with the numeric parameter is equivalent to mysql_fetch_row.


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


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


What is the puporse of using Val function in Visual basic 6.0?

Val() function is used in Visual Basic 6.0 to convert a string to a numeric value (such as integer, double etc.) or to extract a numeric value out of a string, as illustrated below.Val function as used to convert a string to a numeric valuefor example, let str be a string,Dim str as stringDim int as integerstr="09090"int=val(str)gives int = 9090also, used to extract the numeric part out of a following string,ie. a=val("98ASR_tyui") would give a=98however,b=val("The89")would give b=0 as there is no numeric value preceding the string.