C & C++ Programming - Equivalent Statements

Statement 1 Statement 2 Comments
str[5]='\0'; *(str+5)='\0';  
&my_array[MAX]; my_array+MAX;  
ptr=&my_array[0] ptr=my_array; my_array=&my_array[0]
Name of array is address of first element.
(*foo).value=80; foo->value=80;  
&multi[3][0] *(multi + 3) Address of first element in 4th row.
multi[3][1] *( *(multi + 3) + 1) For second element in 4th row, add 1 to address and de-reference result.
struct b : a{.....}; class b : public a{public: .....};  
e+=12 e=e+12  

C & C++ index

quest4tech index

To add an entry or request an existing one to be altered, please fill in the comments form

(c) Compiled by A J & B V Wood.

 Main Index