answersLogoWhite

0

What is the only integer that can be assigned to a string?

Updated: 8/18/2019
User Avatar

Wiki User

14y ago

Best Answer

If you wanted to ask 'Which is the only numeric value that can be assigned to a pointer?', then the answer would be: 0.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the only integer that can be assigned to a string?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you convert an integer int a string through parsing?

int <integerName> = <integerValue>; String <StringName> = Integer.toString(<integerName>); /*where integerName is the name of the integer value, integerValue is the assigned value of the integer, and where StringName is the name of the string holding the parsed integer. */


Can you compare a boolean to an integer?

no, you cant. it only works on string


Why using parseInt in java?

parseInt is a method in the Integer class in java and is used to parse string values into integer numbers. ex: int i = Integer.parseInt("10"); After the above line of code, the variable i will be assigned a value of 10 which is the numeric value of the string passed as argument to the parseInt method


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 parse Int?

parseInt() is a method in the Integer class in Java that is used for parsing string values as numbers. int i = Integer.parseInt("10"); would result in i being assigned a value of 10


Is the value 3 a string variable?

No, it is an integer. You can save an integer value to a string variable but, in this case the value is explicitly stated to be 3.


What is the code required to convert an integer variable to a string variable in Java?

There are several different methods to convert an integer variable to a string variable in Java. For example, one can use the following code to convert an integer variable to a string variable: Integer.toString(number)


How do you Convert string to integer in vb net?

Dim aInt as Integer = 5 Dim aStr As String = String.Empty aStr = System.Convert.ToString(aInt)


How to write a C plus plus Program to convert a string into an integer?

std::string input = ""; std::getline (std::cin, input); // get input from stdin std::stringstream ss (input); // place input in a string stream integer num = 0; if (ss >> num) // extract integer from string stream { // Success! } else { // Fail! }


How do you convert string to int in Java?

One can convert a string variable to an int variable in Java using the parse integer command. The syntax is int foo = Integer.parseInt("1234"). This line will convert the string in the parenthesis into an integer.


What program can read n number must contain four- digits only and if the second left digit odd put it in an array if not ignore it?

Input the number as a string. If the string has a length of 4 and contains only digits, convert the string to an integer. If the integer is less than 1000, input another number. Otherwise, copy the integer and divide by 100 to get rid of the two least-significant digits. Divide again by 2 and take the remainder. If the remainder is 1 then the second left digit of the 4-digit integer is odd and the 4-digit integer can be added to the array, otherwise do not add it. Repeat for all n numbers.


How do you convert an integer to a string?

That really depends on the programming language. In Java, it is sufficient to concatenate it with a String: int myNumber = 5; result = "" + myNumber; Other languages may require a special function, or method, to convert from integer to string.