531 views

1 Answer

Best answer
1 votes
1 votes
No, there is no error in the code.

As rank has integer data type and initialized to 10.3

so, It will contain 10. Semantic error basically check weather the variable is declared or not before initialization.
selected by

Related questions

0 votes
0 votes
0 answers
1
Jyoti Kumari97 asked Jan 29, 2019
401 views
I am having difficulty in finding the type of errors like if given a statement, if I have to tell which type of error it is ( syntax or semantic). Can anyone help me with...