0 0 votes closed with the note: undefined behaviour in C #include <stdio.h> int main() { int i = 0; do { printf("Hello "); i = i++; } while (i < 5); return 0; } why this prints Hello infinitely? shouldn't it print Hello 5 times? Programming in C loop + – aditi19 411 views comment Share Follow Print See 1 comment 1 1 comment reply arvin commented Sep 27, 2018 reply Follow flag there is an error in the declaration : i=i++ ; that invokes an undefined behaviour. 0 0 replyShare Please log in or register to add a comment.