1 votes 1 votes Consider the following C fragment Fro(int x=0;x<=n;x++) Which type of error detected by the C compiler for the above code? A.Lexical Error B.Suntactic Error C.Semantic Error D.Logical Error Soumya Tiwari asked Nov 21, 2018 Soumya Tiwari 569 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Soumya Tiwari commented Nov 21, 2018 reply Follow Share Yes @Ananya I have gone through both the links before posting the question, so just wanted clarity regarding the same. I also think it'll be semantic error but given answer is syntactic error . 0 votes 0 votes Ananya Jaiswal 1 commented Nov 21, 2018 reply Follow Share if there is semicolon at the end of statement then , this will be taken as a function call and there will be syntax error. but since there is no semicolon is given, therefore we will consider it as a loop in which 'for' is misspelled, this will give semantic error. Correct me if i'm wrong. 0 votes 0 votes Hemanth_13 commented Nov 21, 2018 reply Follow Share Semantic analysis phase does the type checking ,label checking and flow control checks 0 votes 0 votes Please log in or register to add a comment.