Questions tagged as 'c'

0
answers

Calculate the inverse of a matrix

I need help with the following code, I do not know why when calculating the inverse matrix of a 3x3 matrix only throws zeros, the problem occurs when performing the operation corresponding to the inverse matrix; The code is as follows: #includ...
asked by 28.11.2018 / 02:47
0
answers

Product point between two vectors [closed]

It can only be done with vectors (or formations or arrays ) of the same dimension. Are you okay? #include<stdio.h> #include<math.h> int main(){ int a[20],b[20],c[20]; int i,j,na,nb,suma; //Lectura de A printf("Tamaño...
asked by 20.11.2018 / 07:08
1
answer

Save fix in .txt file in C

I want to write an array in a .txt file but I can not find a way to do it. My code writes the matrix but in a linear way. #include <stdio.h> int main(){ int arreglo[3][3] = {{'1','2','3'},{'4','5','6'},{'7','8','9'}}; int largo = 3; FIL...
asked by 10.11.2018 / 22:51
0
answers

Obtain the absolute path of a file in C [Linux]

I'm currently trying to get the absolute path of a file in C [Linux] but I do not get the expected path, but it skips a folder at least that seems to be the error. main.c int main() { char archivos[MAXARCHIVOS][MAXLONG];...
asked by 04.11.2018 / 16:11
1
answer

Failure to save data in a Dynamic Structure

I want to create a structure that grows in size when registering a new data. It saves me the first three data well without any problem, when entering a fourth data the first data is deleted until entering a seventh data the second one is delete...
asked by 15.11.2018 / 22:13
1
answer

Perform several operations with interface between assembler and C

I am trying to perform different operations with assember for the FPU unit of the Intel processors, in the middle of an interface with C. The operations to be carried out are: 43.001 * 0.00751 0.00000001 * 1.4142135623730951 0.1 + 0...
asked by 19.10.2018 / 07:40
2
answers

Error converting degrees Celsius to Farenheit C exercise [closed]

Convert celsius to grades fahrenheit #include <stdio.h> int main(){ int g_c int g_f = 32; int mult = 0; printf("Digite el numero de grados celsius: "); scanf("%i",&g_c,); m...
asked by 25.09.2018 / 23:17
1
answer

help with structures

Hello I need to fill a structure with a condition that is when I enter a negative weight or my path is greater than 3000 stop asking me to enter more data here I leave something that I have done but I can not make the condition #include <st...
asked by 22.10.2018 / 03:18
2
answers

Insert into an array of integers

I am learning to program in C, and I have this exercise that I can not finish solving: "Insert an element in an array of integers, given the insertion position" Does anyone think I'm failing? Would I have to use a helper to move items when...
asked by 15.09.2018 / 19:42
0
answers

Scope of the variables in OpenMP

As I understand when declaring a variable of private type in OpenMP, it does not initialize, it simply makes the memory reservation and when it leaves the parallel scope, it recovers its initial value. The doubt arises when implicitly said va...
asked by 16.09.2018 / 19:59