2 votes 2 votes Plz. explain the difference between these two codes,Running it on different compiler i find some output but i don't know the reson 1. main() { int i; for(i=0,i<54,i++) int j ; } 2. main() { int i; for(i=0,i<54,i++) { int j ; } } Amit Prakash Tiwari asked Dec 22, 2016 • edited Dec 22, 2016 by srestha Amit Prakash Tiwari 376 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments srestha commented Dec 22, 2016 reply Follow Share Both will produce compile time error because of for loop.rt? 1 votes 1 votes air1 commented Dec 22, 2016 reply Follow Share yes both will produce a compile time error due to the for loop. but if you correct that error, code 1 will still not compile. 0 votes 0 votes Dilip Puri commented Dec 22, 2016 reply Follow Share Actually both will not produce compile time error only first one will. I've tested with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3). 0 votes 0 votes Please log in or register to add a comment.