answersLogoWhite

0


Best Answer

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.'

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between numeric and string constant?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

How do you define a constant in PHP?

You can define a constant using the define() directive.you can use this a number of ways;to define a variable to a constant do:$string = "hello";define("string",$string);to define a string to a constant use:define("hello","there");to define a integer or other numerical value use:define("number",1.0);Summery:to define a string use quotes as you would do a string.Unlike variables in PHP a constant cannot be changed or undefined once it is defined. Constant remains automatically globally throughout the script. It means that it can be accessed from inside a function. e.g.


Is o3333 a rational number?

No, it is an alphanumeric string: the first character is not a numeric digit.


What is the Difference between attribute and property?

Here's my opinion:Not much really; from a programming perspective I would say the following ...Property: for example the length of a String i.e. String.Length Generally you do not set itAttribute: for example the Value of a String i.e. String str = "a string" Generally you would set it>>>>>>>>>>>>>>>- attributes: are _given_ by the human to an object- properties: are _natural_ aspects of an object.amanpreet


What happens to the speed of a wave on a string when the frequency is doubled?

I believe that the speed will remain constant, and the new wavelength will be half of the original wavelength. Speed = (frequency) x (wavelength). This depends on the method used to increase the frequency. If the tension on the string is increased while maintaining the same length (like tuning up a guitar string), then the speed will increase, rather than the wavelength.


What is the difference between 3 inches and 3 square inches?

3 inches is the length of something, like a piece of string or spaghetti.3 square inches is the area that something covers, like a postage stamp, a playing card, or a puddle.

Related questions

What is the difference between string type and character type constants?

A character type constant is a character, a char, while a string type is an array of characters. The character type constant is one character and is delimited by single quotes. The string type constant is zero or more characters and is delimited by double quotes.


What is the difference between numeric and string variables?

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.


What are 2 types of constant in c?

String constants:A string constant is a sequence of alphanumeric characters enclosed in double quotation marks whose maximum length is 256 characters. The following are some examples of valid string constants:1) "The result is ="2) "Test program 123"Numeric constants:Numeric constants are positive or negative numbers. There are four types of numeric constants: integer constant, floating point constant, hex constant and octal constant. An integer constant may either be a short integer or a long integer. A floating point constant may either be of single precision or double precision.


Must contain a number?

A numeric string.


Difference between character and string?

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


What is the role of plus operator between two string constant?

The plus operator between string constants allows string concatination: string a = "Hello, "; string b = "World!"; string c = a + b; The output of c would be: "Hello, World!".


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 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.