Cover letter discussions 1. Will your logic function correctly if the code fragm
ID: 3882007 • Letter: C
Question
Cover letter discussions 1. Will your logic function correctly if the code fragments do not have at least one line of code in the bodies? Why or why not? 2. t? Will your logic function correctly for various nested fragments? Why or why no Consider nested loops, if-else in a loop, and so forth. 3. What did you find hard about the decompiling process? What did you find interesting? 4. Discuss how recognizing and translating while loops would differ from for loops. 5. How would you recognize subroutines (calls and returns)? 6. Choose one of the restrictions (under assumptions and limitations above) that, were removed, would make the decompiling process significantly more difficult. Explain.Explanation / Answer
1. No, the logic will not function correctly if even a single line is removed from code fragment. Every line contributes its own part in framing the overall logic. If at least one line is missing, then also logic will not function correctly.
2. Yes, the logic will function correctly in nested loops. Nested loops are merely an implementation of logic based on certain decisions. There is no reason why the logic won't work in nested loops.
3. Going through someone's else code for the first time and understanding what it is trying to do is a bit hard. It takes a lot of time.
But, in this way, we can see various ways of doing the same task, and get to know mind sets of different developers. This was an interesting part.
4. Every while loop can be converted into for loop and vice versa. For loop first initialises a variable, and then increment/decrement it based on a certain condition. This is same with while loop. It also runs until a condition is satisfied by the initial variables. Once, the condition fails, the while loop stops.