1 votes 1 votes what is the output of the following c code? #include<stdio.h> void main() { int index; for(index=1;index<=5;index++) { printf("%d",index); if(index==3) continue; } } a)1245 b)12345 c)12245 d)12354 Programming in C programming-in-c + – ajit asked Oct 1, 2015 ajit 1.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Output: 12345 continue statement is used to skip the statement after that http://www.programiz.com/c-programming/c-break-continue-statement But in above program there is not any further statement Therefore the output will be 12345 sdpshaw answered Oct 1, 2015 sdpshaw comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes it keep on printing 1 till stack overflows since every time in for loop index will be compared and it will be less than 5 so infinite loop nothing to do with i it will be keep incremented at each iteration. Umang Raman answered Oct 1, 2015 Umang Raman comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer--> option (b) 12345 Vinay Yadav answered Oct 1, 2015 Vinay Yadav comment Share Follow See all 0 reply Please log in or register to add a comment.