1 1 vote According to the solution, there is no error in the program. And I ran the program there is no error. But how the rank is declared as int and initialized by 10.3 which is float. So, there should be a semantic error. Compiler Design compiler-design compilation-phases + – Nihal Singh 943 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 1 1 vote 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. Aashay kaurav answered Oct 6, 2021 • selected Oct 8, 2021 by Nihal Singh Aashay kaurav comment Share Follow See 1 comment 1 1 comment reply Nihal Singh commented Oct 6, 2021 reply Follow flag Okay... Yeah And it changes the data type. If data type mismatch like this happens. Right ? 0 0 replyShare Please log in or register to add a comment.