Sample Input:o
0 4 0 5 0 8 0 7 0
Press any key to continue . . .
This is what I have so far for the code
[
#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE 81
int nArray[ARRAY_SIZE];
/*Function prototypes */
void PopulateArray( int nArray[9][9]);
void PrintArray(const int nArray[9][9]);
void PopulateArray( int nArray[9][9])
{
int i;
int nSize;
for(i=0 ; i < nSize ; i++)
{
printf("Enter value number %d:", i+1);
_flushall();
scanf("%d",&nArray[i]);
}
}
void PrintArray(const int nArray[9][9])
{
int i,j;
for(i = 0; i <= 8 ; i++)
{
for(j = 0; j <= 8 ; j++)
{
printf("%2d",nArray[i][j]);
}
printf("\n");
}
}
int main(void)
{
PopulateArray( int nArray[9][9]);
PrintArray(const int nArray[9][9]);
system("PAUSE");
return 0;
}
I am getting the following errors in VC++
-------------------Configuration: Test - Win32 Debug--------------------
Compiling...
myfiletesting.c
C:\Documents and Settings\HP_Administrator\myfiletesting.c(16) : warning C4029: declared formal parameter list different from definition
C:\Documents and Settings\HP_Administrator\myfiletesting.c(28) : warning C4028: formal parameter 1 different from declaration
C:\Documents and Settings\HP_Administrator\myfiletesting.c(44) : error C2143: syntax error : missing ')' before 'type'
C:\Documents and Settings\HP_Administrator\myfiletesting.c(44) : error C2198: 'PopulateArray' : too few actual parameters
C:\Documents and Settings\HP_Administrator\myfiletesting.c(44) : error C2059: syntax error : ')'
C:\Documents and Settings\HP_Administrator\myfiletesting.c(46) : error C2143: syntax error : missing ')' before 'type'
C:\Documents and Settings\HP_Administrator\myfiletesting.c(46) : error C2198: 'PrintArray' : too few actual parameters
C:\Documents and Settings\HP_Administrator\myfiletesting.c(46) : error C2059: syntax error : ')'
Error executing cl.exe.
myfiletesting.obj - 6 error(s), 2 warning(s)