Question 81
double foo (int n)
{
int i;
double sum;
if (n = = 0) return 1.0;
else
{
sum = 0.0;
for (i = 0; i < n; i++)
sum += foo (i);
return sum;
}
}
Question 82
Let s and t be two vertices in a undirected graph G + (V, E) having distinct positive edge weights. Let [X, Y] be a partition of V such that s ∈ X and t ∈ Y. Consider the edge e having the minimum weight amongst all those edges that have one vertex in X and one vertex in Y The edge e must definitely belong to:
Question 83
Question 84
E → number E.val = number. val | E \'+\' E E(1).val = E(2).val + E(3).val | E \'×\' E E(1).val = E(2).val × E(3).valThe above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1) parser generator) for parsing and evaluating arithmetic expressions. Which one of the following is true about the action of yacc for the given grammar?
Question 85
E → number E.val = number. val | E \'+\' E E(1).val = E(2).val + E(3).val | E \'×\' E E(1).val = E(2).val × E(3).valAssume the conflicts in Part (a) of this question are resolved and an LALR(1) parser is generated for parsing arithmetic expressions as per the given grammar. Consider an expression 3 × 2 + 1. What precedence and associativity properties does the generated parser realize?
Question 86
Task T1 T2 T3 T4 T5 T6 T7 T8 T9 Profit 15 20 30 18 18 10 23 16 25 Deadline 7 2 5 3 4 5 2 7 3Are all tasks completed in the schedule that gives maximum profit?
Question 87
Task T1 T2 T3 T4 T5 T6 T7 T8 T9 Profit 15 20 30 18 18 10 23 16 25 Deadline 7 2 5 3 4 5 2 7 3What is the maximum profit earned?
Question 88
Question 89
Question 90
There are 90 questions to complete.