R reddensoft Banned-Spam Joined Oct 7, 2022 Messages 84 Reaction score 9 Nov 9, 2022 #1 How many times will the following loop execute? for(j = 1; j <= 10; j = j-1)
connects Newbie Joined Nov 22, 2022 Messages 15 Reaction score 4 Apr 4, 2023 #2 It depends. What's the type of `j`? For example, if `j` is an unsigned int, this will only execute twice. If `j` is a signed int, this will execute forever.
It depends. What's the type of `j`? For example, if `j` is an unsigned int, this will only execute twice. If `j` is a signed int, this will execute forever.