InterviewSolution
Saved Bookmarks
| 1. |
What are the outputs of following two codes fragments? Justify your answer.//version 1 f = 1, i =2; while(++i < 5) f * = i;cout<<f;:://version 2 intint f = 1, i = 2;do{f * = i;}while (++i < 5); cout<< f;: |
|
Answer» The output of the first code fragment is 12. The output of the first code fragment is 24. |
|