Questions tagged as 'matriz'

0
answers

Return an array of a function in C [duplicate]

Hello, I'm doing a C program that requires to be modularized, that the user registers the desired courses, prints the courses on the screen, but I want to use the course matrix in another function, how to return that matrix to another matrix in...
asked by 15.11.2017 / 18:18
1
answer

Pointer pointer passing by reference

I'm doing a program where I need to dynamically allocate 2 arrays, so I thought of doing this allocation within a function. I tried to do this, but it is giving "Targeting failed". Could someone help me? void CriaMatriz(int ***matriz, int linh...
asked by 19.08.2017 / 03:53
2
answers

Pass array to functions in C

Good night, next I have a problem when passing an array to a function in C. I have the following code void funcao(int mat[][num]); int main() { scanf(%d,&num); } It is basically the following, I define the size of the array in the ma...
asked by 21.06.2017 / 01:19
1
answer

Compare integer and pointer

Well, I have a question, I'm trying to copy a line to a file but I get an error that says I can not compare an integer with a pointer, can anyone help me? The error is in line ch = getc(file1); and while(ch != EOF) #include <s...
asked by 14.06.2017 / 21:00
0
answers

Replace elements of an array with an "X"

I have code that should print an array according to the input. You should print the matrix by having the "X" form a spiral right from the middle, does anyone have any ideas? ps.:The code comments are the attempts while True: tamanho = in...
asked by 09.06.2017 / 14:29
1
answer

Access a file using Properties

I'm working with a method that takes an object from the Properties class as an argument: public static void main(String[] args) { //Properties props = new Properties(); Properties props = new Properties(); props.setProp...
asked by 25.05.2017 / 05:25
0
answers

struct that stores number of rows and columns of array and a vector

I used a struct to store the number of rows (m) and columns (n) of the array and another to store number of columns of the vector (n). I make the product of two arrays in the function prod() and the product of a matrix with a vecto...
asked by 25.05.2017 / 23:49
1
answer

product of arrays using struct

I used struct to store the number of rows and columns in the array. I make the product of two matrices and the product of a matrix with a vector, but the output is always 0. I do not know how to change the code so that it does what I want, I bel...
asked by 25.05.2017 / 23:05
1
answer

Program received signal sigsegv segmentation fault

I made the C code of the statement:    Develop a program that simulates a ticketing system from a   airline. The company has n flights, where in each of them there are m   places available. The first m / 2 seats on each flight are reserved fo...
asked by 12.11.2016 / 17:42
1
answer

Multiplication of arrays in Python

Hello, I'm doing an algorithm in python that makes the product between two arrays, but I'm having trouble displaying the resulting array matriz = [] linha = [] linha2= [] matriz_result = [] result = 0 lista = [] nlin,ncol= map(int,input().spli...
asked by 28.11.2016 / 03:26