Good afternoon,
I think your problem lies in how you pass the matrix as a parameter. Not being sure what you want, I made a small example of what I think I realized you want.
Don’t forget that the numbering of rows and columns starts from zero, so when I say I want to print line 1, I’m actually saying I want to print the second line.
#include <stdio.h>
#include <stdlib.h>
//Definicao da tabela
#define linhas 3
#define colunas 3
//Assinatura do metodos
void ImprimirLinha(double matriz[linhas][colunas], int linhaQueQueroImprimir);
int main()
{
double matriz[linhas][colunas] = { 1.1 , 2.2 , 3.3 ,
4.4 , 5.5 , 6.6 ,
7.7 , 8.8 , 9.9
};
int linhaQueQueroImprimir = 1;
ImprimirLinha(matriz, linhaQueQueroImprimir);
}
void ImprimirLinha(double matriz[linhas][colunas], int linhaQueQueroImprimir)
{
for(int i = 0; i<colunas; i++ )
{
printf("%0.3f |", matriz [linhaQueQueroImprimir] [i] );
}
printf("\n");
}
I hope I have helped, if so please please give up vote.