Convert the following infix notation to prefix form.
(A–B)/C*(D+E)
The following is a function of class Armstrong. This recursive function calculates
and returns the sum of the cubes of all the digits of num, where num is an integer
data member of the class Armstrong.
[A number is said to be Armstrong if the sum of the cubes of all its digits is equal
to the original number].
There are some places in the code marked by ?1?, ?2?,?3? which may be replaced
by a statement/expression so, that the function works properly.
public int sumOfPowers(int num)
{
if (num == 0)
return ?1?;
int digit = ?2?;
return (int) Math.pow(digit, 3) + ?3?;
}
(a) What is the expression or statement at ?1?
(b) What is the expression or statement at ?2?
(c) What is the expression or statement at ?3?
----------------------------------------------------------------------------------------------------------------------------------
PART II– 50 MARKS
Answer six questions in this part, choosing two questions from
SECTION - A
Answer any two questions.
Specimen paper · 2025 · CollegeDekho (mirror of CISCE PDF)
No answer recorded yet
Khojo Papers does not generate answers. This question will show one when a checked answer has been added, with its source stated.
Related questions
From the same topic and chapter, at a similar level.
Given below are two statements marked Assertion and Reason. Read the two
statements carefully and choose the correct option.
Assertion: Recursion utilises more memory as compared to iteration.
Reason: Time complexity of recursion is higher due to the overhead of
maintaining the function call stack.
Name the entity described above and state its principle.
----------------------------------------------------------------------------------------------------------------------------------
According to the Principle of duality, the Boolean equation
(Aꞌ + B) • (1 + B) = Aꞌ + B will be equivalent to:
The compliment of the Boolean expression Aꞌ • (B • Cꞌ + Bꞌ • C)
Study the given propositions and the statements marked Assertion and Reason that
follow it. Choose the correct option on the basis of your analysis.
p = I am a triangle
q = I am a three-sided polygon
s1 = p → q
s2 = q → p
Assertion: s2 is converse of s1
Reason: Three-sided polygon must be a triangle.

