Question: Consider the following code: #include #include int main ( void ) { int * * x = malloc ( sizeof ( int * ) *
Consider the following code:
#include
#include
int mainvoid
int x mallocsizeofint ;
for int i ; i ; i
xi mallocsizeofint;
for int i ; i ; i
for int j ; j ; j
xij ij;
modifyx;
return ;
Which of the implementations of method modify below set all elements of the matrix x to zero?
void modifyint x int m int n
for int i ; i m; i
for int j ; j n; j
xij;
void modifyint x int m int n
for int i ; i m; i
for int j ; j n; j
xij;
void modifyint x int m int n
for int i ; i m; i
for int j ; j n; j
xij;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
