C PROGRAMMING PLEASE HELP ME WITH THESE QUESTIONS THANK YOU
C++ PROGRAMMING, PLEASE HELP ME WITH THESE QUESTIONS. THANK YOU
What is the output of the following program? What operation is done over the matrix. # include using namespace std; void here(int& x, int& y); int main() {const int SIZE = 4; int a(SIZE)[SIZE] = {3, 7, 8, 2}, {0, 1, 6, 9}, {1, 2, 6, 3}, {9, 7, 2, 4}}; int I, j; for (I = 1;iSolution
Answer :-
9 ) What is the output of the following code fragement? for i and j, which varible healp to move through columns and which one through rows.
#include<iostream>
using namespace std;
void funct(int a[], int p, int &num);
int main(){
int Array[4][4],i,j;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
{
if(i==j)
array[i][j]=2*i;
else
array[i][j]=2*j + 2;
}
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
cout<< Array[i][j]<<\"\";
cout<<end1;
}
return 0;
}
OutPut : 0468
