# Computer Science

## Reconstruct Table 7.1 for when Victor Video is watching a 4 Mbps video

Question: Reconstruct Table 7.1 for when Victor Video is watching a 4 Mbps video, Fracebook Frank is looking at a new 100 Kbyte image every 20 seconds and Martha music is listening to 200 Kbps audio stream. Below is table 7.1 Facebook Frankbit rate =160 KbpsBytes transferred in 67 mins = 80 Mbytes Martha Musicbit …

## What is the output produced by the following code? int *p1, *p2; p1 new int; p2 new int p1 10

Question: Answer: int *p1, *p2; //declare 2 integer pointer p1 = new int; //allocating a storage for an integer and assigning address of that storage to p1 p2 = new int; //allocating a storage for an integer and assigning address of that storage to p2 *p1 = 10; //storing 10 to the address p1 *p2 …

## In LISP, find a sequence of CARs and CDRs that return X when applied to the following S-expressions:

Question: In LISP, find a sequence of CARs and CDRs that return X when applied to the following S-expressions: (b) (A (B (X D))) (c) (((A (B (X) D)))) Answer:

## The DBA denormalized some of the data in the TAL Distributors database to improve performance, and one of the resulting tables is the following:

Question: The DBA denormalized some of the data in the TAL Distributors database to improve performance, and one of the resulting tables is the following: Customer (CustomerNum, CustomerName, Street, City, State, PostalCode, Balance, CreditLimit, RepNum, RepName) Which field or fields cause the table to no longer be in third normal form? In which normal form …

## Draw the recursion trace for the execution of method reverseArray(data, 0, 4)

Question: Draw the recursion trace for the execution of method reverseArray(data, 0, 4) (Code Fragment 5.7) on array data = {4, 3, 6, 2, 5}. Answer:

## Draw the recursion trace for the execution of function BinarySum

Question: Draw the recursion trace for the execution of function BinarySum(A, 2, 4) on array A = {1,2,3,4,5,6,7}. Algorithm BinarySum(A, i, n) Input: An array A and integers i and n Output: The sum of the n integers in A starting at index iif n = 1 thenreturn A[i]return BinarySum(A, i, n/2) + BinarySum(A, i …

## Draw the recursion trace for the execution of the function Recursive.

Question: Draw the recursion trace for the execution of the function Recursive. Algorithm Recursive (x):Input: Integer xOutput: Integer dif x > 7d = 5else if x = 7d = 3elsed = Recursive (x + 3) + Recursive(x + 1)return d Answer:

## How much keyspace is available when a monoalphabetic substitution chipher

Question: How much keyspace is available when a monoalphabetic substitution chipher is used to replace plaintext with ciphertext? Answer:

## Consider an affine cipher whose key parameters are defined as follows

Question: Consider an affine cipher whose key parameters are defined as follows: a = 7 and b = 22. Decrypt the following text: falszztysyjzyjkywjrztyjztyynaryjkyswarztyegyyj Who wrote the line? Answer: We first need identify these letters with integer values .a=0, b=1…z=25These values are then used as inputs to a function of the following form .f(x)=ax+b mod(26)where …