edited by
618 views

1 Answer

0 votes
0 votes

I think it will be 3

In line with post increment n=n++; before assigning updated value to n (ie n+1) n will be assigned with old value (ie 3)

n will be never changed even if the loop runs for infinite times

edited by

Related questions

1 votes
1 votes
2 answers
1
Nulu Madhu asked Dec 14, 2018
439 views
How many times does the while loop gets executed if the following function is called as $f(120,13)?$ f(m,n) { ans := 1 while (m - n >= 0) { ans := ans * 2 m := m - n ...
0 votes
0 votes
3 answers
2
nabadeep asked Apr 27, 2017
605 views
what does following code mean if j=0 and a and b are two character pointers to two strings: while(a[j]&&b[j])