

 Thread Tools  Search this Thread 
#1
 
 
Calculating the sum of two polynomials This is an exercise that involves calculating the sum and the product of 2 polynomials. if it has a structure and a pointer within one example: Code: typedef struct ( int a; int * a; P); p p1; 
#2
 
 
Re: Calculating the sum of two polynomials declare two variables (pointer or not) with the same name .. To access:  The value of the pointer (address): p1.t  The value of the variable pointed to: p1> t OR (* p1). T  The value of the variable p1.a  The address of the variable & p1.a So, if t points to a: p1.t == & p1.a p1> t == p1.a 
#3
 
 
Re: Calculating the sum of two polynomials A Polynomial in the variable X, of Degree n, has the form: aX^n+bX^(n1)+...+vX^2+wX+z, where (a),(b),(v),(w),and (z) are Real numbers, (n) is a Whole number, and (a)is not equal to zero, the typedef means you no longer have to write struct all over the place. 
#4
 
 
Re: Calculating the sum of two polynomials  The value of the variable pointed to: p1> t OR (* p1). T If the pointer is p1.t, the value of the variable is pointing * (p1.t). Writing p1> * t or (p1). T is legitimate only if p1 is a pointer to a structure of type p, which is not the case. Code: p1.t == & p1.a p1> t == p1.a 

Tags: c language, pointer, structure, sum 
Thread Tools  Search this Thread 

Similar Threads for: "Calculating the sum of two polynomials"  
Thread  Thread Starter  Forum  Replies  Last Post 
Need help calculating Age in FileMaker Pro  NathanDS  Windows Software  4  29052010 05:16 PM 
Calculating Age in java  Miles Runner  Software Development  5  03022010 01:54 AM 
Calculating sum of column in datagrid  Chrisch  Software Development  3  09062009 10:07 AM 
Calculating Matrix Determinant in C  Rilex  Software Development  3  09052009 08:27 PM 
Calculating date in Excel  MarceloQuad  Windows Software  2  16032009 10:56 PM 