Question: Answer all four questions 1. Draw TWO separate stack diagrams for the stack contents for the following sample C Code: (5 points) void func (int

Answer all four questions
1. Draw TWO separate stack diagrams for the stack contents for the following sample C Code: (5 points) void func (int a, int b) { .........- Instruction Pointer position # 1 char buffer[5]; int c; C. Instruction Pointer position # 2 c = a + b; } void main() { func(1, 2); } 2. Draw the sequence of events when main function calls multiply (a, b)' and then multiply function calls add (x, y, z)'. Your diagram should show the different parts of function call and local variables in the stack. (5 points) 3. Calculate the following and show the steps of computations in your answer: (5 points) a. ged (770, 882) b. gcd (102, 1686) c. 153 mod 23 d. 1087 mod 143 e. Number of possible combinations of keys for brute force attack when key size = 4 bits 4. For the given plaintext: "thechildrenlearntocipherandsing and cipher mentioned below, find the ciphertext: (5 points) a. Key = 6 for Rail Fence cipher b. Key = 5 (number of rows) for Transposition cipher c. Key = 4 for Rail Fence cipher d. Cipher text is circular shift right by 3 positions For example: circular shift right by 1 position: leftmost bit in the ciphertext is the same as rightmost bit in the plaintext e. Cipher text is logical shift left by 2 positions i. Logical shift left by 1 position: Rightmost bit becomes 'o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
