3 votes 3 votes Parshu gate asked Jan 12, 2018 Parshu gate 485 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply joshi_nitish commented Jan 12, 2018 reply Follow Share 0 will printed $n^6$ times and also time complexity of above code is $O(n^6)$ 2 votes 2 votes MiNiPanda commented Jan 12, 2018 reply Follow Share Won't it give error? There is comma instead of semi colon after i=1 0 votes 0 votes sumit goyal 1 commented Jan 12, 2018 reply Follow Share @MiNiPanda in gate exam it dont matter we assume that it is syntax of any other language so its correct , when they say find output of program than we say its error , but here we are iterested in time complexity so we assume its a syntax of a new language 0 votes 0 votes MiNiPanda commented Jan 12, 2018 reply Follow Share @sumit goyal 1 If it is a printing mistake then it's okay. Yes it should be n^6. I presumed that all questions follow C's syntax by default. 1 votes 1 votes srestha commented Jan 12, 2018 reply Follow Share @ joshi_nitish here 1st for loop i will execute 1 time i.e. i=1 2nd for loop i will execute 1 time i.e, i=1 and 3rd for loop i will print i=1 to n6 and print 0 n6 time and exit from whole program rt? 0 votes 0 votes joshi_nitish commented Jan 12, 2018 reply Follow Share yes, @srestha exactly. 0 votes 0 votes Please log in or register to add a comment.