Is the value 3 a string variable?

User Avatar

Wiki User

2012-06-05 23:56:43

Best Answer

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.

User Avatar

Wiki User

2012-06-05 23:56:43
This answer is:
User Avatar
Study guides


20 cards

A polynomial of degree zero is a constant term

The grouping method of factoring can still be used when only some of the terms share a common factor A True B False

The sum or difference of p and q is the of the x-term in the trinomial

A number a power of a variable or a product of the two is a monomial while a polynomial is the of monomials

See all cards
2576 Reviews

Add your answer:

Earn +20 pts
Q: Is the value 3 a string variable?
Write your answer...
Still have questions?
magnify glass
Related questions

Can an int value be assigned to String variable?

In C when assigning an integer variable to String variable a compilation error occurs as Incompatible Type Conversion.So that integers cannot get assigned to String variables.

How do you convert string value into integer using javascript?

There's a number of ways you can do it. variable = variable * 1 multiplies the variable by one, and converts the variable to a number if it's a string. Because * 1 doesn't change the value, this is one way of converting a string into an integer. Another is using JavaScript's parseInt(variable).

How you can modify an integer variable value in a function?

with an assignment: variable = value variable += value variable /= -3; ...

A program to add two 3x3 matrices?

The value of a static global variable can never be changed whereas the value of a simple global variable can be to create a 3x3 matrix written in c++:#include #include//this is only for if you want a string matrixusing namespace.std;int main(){string yourstinghere[3][3];}

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

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 string in c plus plus?

A String is a variable that represents a list, or array, of characters. They are normally assigned using double quotes (""). When using strings you must import string header file#include and then an example of a stringstring mystring = "This is a string";This give the variable 'mystring' a value of "This is a string".A string can also be referred to as an array of characterschar string [10];Would make the variable string to an array of characters with length ten.

What is the difference between data and variable?

data type refers to the kind of value that is held by a particular variable. For ex: an int variable contains integer value, a string holds a alpha numeric value etc. variable refers to the name of a value using which we can refer to this value. Ex: public int age = 28; here int is the data type and age is the variable.

What is a declaring variable?

Variable declaration is when you declare a variable. For example: String foo; The data type is String and now I can modify foo and don't need to type String again. It can be an instance variable or a local variable.

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)

What is the default value for global variable in Java?

The default value of any variable is determined by the default constructor for the variable's type. Numeric types, such as int, float and complex, default to the value 0. Strings default to an empty string. Containers default to empty containers, and so on.

How you convert int to string in jsp?

The same way you would in a regular java program. int i = 10; String s = i + ""; after the above line of code the variable s will have "10" as a string value...

People also asked