It is not possible to answer this question without knowing the actual expression used in the assignment statement. The following are merely example expressions showing some of the values that could be assigned to ans:
int ans, p=100, q=50;
ans = p + q; // ans = 150
ans = p * q; // ans = 5000
ans = p - q; // ans = -50
ans = p / q; // ans = 2
ans = p % q; // ans = 0
Just type declare then the variable that you desire to assigned a certain constant value on it. Just type declare then the variable that you desire to assigned a certain constant value on it.
Default initial value of extern integral type variable is zero otherwise null.
AnswerYes, it can. For instance, if your function returns double you can assign the function call to a variable of type double.AnswerNo, only the returned value, of course.
A void pointer variable is a pointer variable (of some type) that is assigned the value zero, meaning it points to address zero. Memory address zero is a reserved address, which means the pointer variable references nothing in particular.
it depend on the programming language u use. for instance in c, just decalre the variable and equal it to the value it is to take. eg. my_age=21; /*my_age is the decared variable and 21 is the assigned value*/ //for php $my_age=21; /*my_age is the decared variable and 21 is the assigned value*/ for strings (in php)eg. $my_age="none of ur business" /*$my_age is the variable and the string "none of ur business" is the assigned value*/
Yes, IF the variable has been declared, has a value, and is of a numerical type such that your addition operator can perform the operation on the number and the value of that type variable. The compiler or interpreter will look up the variable's value, substitute it for the variable, and perform the addition just as if your statement used two numbers. First example: If your number is an integer and your variable is of type real, almost any addition operator can successfully add the two. Second example: If your number is a real and your variable is a character type (with a value, say, of "Smith"), the addition will obviously fail. In many languages, however, variables of type Boolean may be handled arithmetically, as the value True equals 1 and False is zero.
An interface doesn't have instances!
Yes, an integer can be assigned as a float value.But it get stored as a float value, that is an implicit type conversion occurs during compilation.Smaller data types are convertible to larger data types.eg:float b=12;// an integer constant is assigned to a float variableprintf("%f",b);// when printing b it will print as 12.000000
This value is variable, for each type of measurement.
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.
Variable is of any Data Type and Data Type can be defined as a type of value that a Variable will hold.............means which type of value you want to store, eg: fractional value (3.5454), whole value (3,76,3,67), character value (a,v,c,f,b,z) etc.......... So The Use the Variable is to store a value of any kind (some mentioned above)
When a variable is passed by value, the function receives a copy of the variable. When a variable is passed by reference, the function receives a reference, or pointer, to the original data.