![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can array store float point numbers | naree | SUN Solaris | 1 | 03-05-2008 06:59 AM |
| i cannot assign float point numbers to an array in solaris | naree | SUN Solaris | 11 | 02-27-2008 04:06 AM |
| floating point problem | vijlak | High Level Programming | 4 | 03-08-2007 04:18 AM |
| problem with floating point numbers in awk | kanagias | Shell Programming and Scripting | 7 | 06-24-2005 03:14 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Point and Array Convert Problem
In this statement,"A[max][max]" of type "int",being converted to "pointer toarray[20] of int".(cvtdiftypes)
Please help me! Code:
#include <stdio.h>
#include <stdlib.h>
int m,k;
const int max =20;
int A[max][max];
//****************************************************
// Input Matrix
//****************************************************
void inMatrixAA(int AA[max][max], int row, int col)
{ int i,j;
for( i = 0; i<row; i++)
{
for( j = 0; j<col; j++)
scanf("%d",&AA[i][j]);
}
}
//*****************************************************
// Print Matrix
//*****************************************************
void prMatrix( int AA[max][max], int row, int col)
{ int i,j;
for(i =0; i<row; i++)
{
for(j = 0; j<col; j++)
printf("%d\n",AA[i][j]);
}
}
int main(int argc,char *argv[])
{
int ii,jj;
for (ii = 0; ii<max;ii++)
{
for(jj =0;jj<max;jj++)
{
A[ii][jj] = 0;
}
}
printf("Enter values for m, k");
scanf("%d",m,"%d");
printf("Input Matrix A");
inMatrixAA(A[max][max], m, k);
printf("Print Matrix A");
prMatrix(A[max][max], m, k);
}
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|