answersLogoWhite

0


Best Answer

A matrix is a two-dimensional array of objects. If, for instance, you wanted a 10 by 20 matrix (array) of doubles, you would say...

double mydoublearray[10][20];

You would then refer to each element with the syntax...

double somedouble;
somedouble = mydoublearray[3][7];

Note that array indices start from zero, and go to the declared size minus one, so the first element is mydoublearray[0][0]and the last element is mydoublearray[9][19].

You can have arrays of elementary types and of classes. The syntax is the same. Just use the class name instead of the word double.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give an example of matrix in c plus plus program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the Example Output of Calculator Program in C plus plus?

example output of c++ calculator


Give an example of C plus plus program?

#include<iostream> int main() { using namespace std; cout<<"Hello world!"<<endl; return(0); }


Array implementation of priority queue example program in c plus plus?

yes


If properties of matrix addition let A B C D the m n matrix then 1 A plus B B plus A?

Yes. Matrix addition is commutative.


C plus plus program -matrix multiplication using class?

for(int i=0;i


What would be the result if you add matrices B plus A instead A plus B?

It would be no different. Matrix addition is Abelian or commutative. Matrix mutiplication is not.


What is the answer do this matrix in arbitrary form 3x-6y-z equals 6 and x plus y plus 3x equals 5?

It is a singular matrix.


What is the answer to this matrix in arbitrary form- 3x 6y-z equals 9 and x plus y plus 3z equals 4?

It is a singular matrix.


How can you display the backslash character without the compiler interpreting it as a program command in c plus plus?

Double it: puts ("Here\\comes\\an\\example"); output: Here\comes\an\example


Can you give an example of a structure in C plus plus?

struct point { int x; int y; };


Any program in c plus plus without using any header file?

For example: int main (void) { return 0; }


Example of Borland c plus plus program?

#include<iostream> int main() { std::cout << "Hello world!" << std::endl; }