Question 1
Consider the following C function.
float f(float x, int y)
{
float p, s; int i;
for (s=1, p=1, i=1; i < y; i ++)
{
p*= x/i;
s+=p;
}
return s;
}
For large values of y, the return value of the function f best approximates
Question 2
Assume the following C variable declaration
int *A [10], B[10][10];
Of the following expressions :
which will not give compile-time errors if used as left hand sides of assignment statements in a C program?
Question 3
Question 4
Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that (i) each is sorted in ascending order, (ii) B has 5 and C has 3 elements, and (iii) the result of merging B and C gives A?
Question 5
Question 6
Question 7
Question 8
Question 9
Question 10
1. The j + 1-st instruction uses the result of the j-th instruction as an operand 2. The execution of a conditional jump instruction 3. The j-th and j + 1-st instructions require the ALU at the same timeWhich of the above can cause a hazard ?
There are 89 questions to complete.