Answer:
hope this helps. I am also a learner like you. Please cross check my explanation.
Explanation:
#include
#include
using namespace std;
int main()
{
int a[ ] = {0, 0, 0}; //array declared initializing a0=0, a1=0, a3=0
int* p = &a[1]; //pointer p is initialized it will be holding the address of a1 which means when p will be called it will point to whatever is present at the address a1, right now it hold 0.
int* q = &a[0]; //pointer q is initialized it will be holding the address of a0 which means when q will be called it will point to whatever is present at the address a0, right now it hold 0.
q=p; // now q is also pointing towards what p is pointing both holds the same address that is &a[1]
*q=1
; //&a[0] gets overwritten and now pointer q has integer 1......i am not sure abut this one
p = a; //p is now holding address of complete array a
*p=1; // a gets overwritten and now pointer q has integer 1......i am not sure abut this one
int*& r = p; //not sure
int** s = &q; s is a double pointer means it has more capacity of storage than single pointer and is now holding address of q
r = *s + 1; //not sure
s= &r; //explained above
**s = 1; //explained above
return 0;
}
Answer:
see explaination
Explanation:
function [] =
inverse(A,B)
da = det(A);
disp("The det of A is");
disp(da);
inva = inv(A);
disp("The inverse of A is");
disp(inva);
x = inva*B;
disp("The value of X is");
disp(x);
rk = rank(A);
disp("The rank of X is");
disp(rk);
Di = eig(A);
disp("The eigen values of A is");
disp(Di);
[V,Di] = eig(A);
disp("The eigen vectors of A are (Each column represents one column vector)");
disp(V);
end
A = [1,2;4,5];
B = [1,2;4,5];
inverse(A,B);
%ab = [num2str(t)," ",num2str(dx)," ",num2str(dy)];
%disp(ab);
the answer to the question is c. i hope this helps.