MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Design structure for Polynomial manipulation
A
struct poly{ int coeff;int power; struct poly *next;}
B
struct poly{int power; int var;int expo;struct poly *next;}
C
struct poly{ int coeff;int power; }
D
struct poly{ int coeff;struct poly *next;}
Explanation: 

Detailed explanation-1: -Polynomial Manipulation Polynomial manipulations are one of the most important applications of linked lists. Polynomials are an important part of mathematics not inherently supported as a data type by most languages. A polynomial is a collection of different terms, each comprising coefficients, and exponents.

Detailed explanation-2: -Polynomials consist of terms connected by addition or subtraction. Each term consists of a real number called a coefficient, times a variable, raised to a power. Each power is a natural number (an integer greater than or equal to zero).

Detailed explanation-3: -POLYNOMIAL definition: (Algebra) (in one variable) an expression consisting of the sum of two or more terms each of which is the product of a constant and a variable raised to an integral power: 2 ax + bx + c is a polynomial, where a, b, and c are constants and x is a variable. Class example from the C++ code in 321.

Detailed explanation-4: -What is a polynomial? A polynomial object is a homogeneous ordered list of pairs <exponent, coefficient>, where each coefficient is unique. Operations include returning the degree, extracting the coefficient for a given exponent, addition, multiplication, evaluation for a given input.

There is 1 question to complete.