“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
the 2nd declaration will generate an error because of the word int inside the parenthesis. The 1st is correct because it cast the value to int that is the data type of the variable temp
the 2nd declaration will generate an error because of the word int inside the parenthesis. The 1st is correct because it cast the value to int that is the data type of the variable temp
The second statement is syntactically incorrect. First one statement is a valid declaration, however putting an (int) does not make any difference.
first will probably make int=0
the second I believe wont compile
the former implies multiplication of 0 with 00 and then type-casting is done to int data type for temp variable.
the later implies multiplication of 0 with a value as 00int.
Leave an Answer/Comment