Questions tagged as 'c'

1
answer

Writing of text file with fixed and variable length

I do not understand what I am doing wrong with the writing of the text files, since I get many warnings. Can someone help me know what I'm bugging him about? fread(&reg,1,sizeof(info),fp); while(!feof(fp)) { fprintf(fpTextFijo,"%*ld%-*...
asked by 27.11.2016 / 18:34
1
answer

Management of structures. How to create one inside another

I want the user to add the data of the books and then save them in the library. Any advice to work with two structures? I leave what I advanced so far. #include<stdio.h> #include<conio.h> #include<string.h> //Estructura del...
asked by 12.11.2016 / 19:01
1
answer

Parallel processing of matrices by columns with MPI

I have a matrix (c) of 10x10 (M = 10) elements in which I divide the matrix by rows so that they are executed by 5 different processes (slaves = 5), so that each process corresponds to 2 rows of that matrix. offset = 0; filas = (M / esclavos);...
asked by 04.01.2017 / 21:52
1
answer

How can I get the length of the contents of a HANLDE?

I need to do a program in c to copy the content of a file in another file. I'm using HANDLE objects to open the source and destination file and I'm using DWORD to read the content. The code is as follows HANDLE hIn = CreateFile...
asked by 29.08.2016 / 05:06
2
answers

Search for a word in a matrix by reading from right to left

I am trying the following program: the user enters a word and it should be found in a matrix reading from left to right or from right to left. I have managed to find the words reading from left to right, but not from right to left. I have tri...
asked by 09.05.2016 / 16:21
1
answer

ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] - scanf ("% d", & x);

please could you tell me why the error persists if the scanf is validated. The error I get when I use the library 'mpi'. This is my code: #include <stdio.h> #include <stdlib.h> #include <mpi.h> int insertminimo (); int main...
asked by 08.05.2016 / 18:29
1
answer

How to modify data from a C record?

Well that, how can I modify data from a record, I was trying this way: gets(search); // nombre del dato que queremos modificar fread(&producto,sizeof(_Registro),1,pf); while(!feof(pf)){ if (strcmp(search,product...
asked by 10.04.2016 / 18:36
0
answers

Doubts about i2c in CCS compiler

I have a question about the i2c protocol programming in CCS Compiler with a specific sensor. To fully synthesize I give you an example that appears in the sensor datasheet to obtain data of it. And then I present the code in CCS:...
asked by 17.12.2018 / 18:04
0
answers

how to create multiple processes in C and pipes pipe ()

hello will see I have my code that counts the amount of files in a directory and then returns the name of that file next to your md5sum, what happens is that my task says the following: The application should examine the contents of the "/...
asked by 19.12.2018 / 15:26
1
answer

Get names of a text file and compare your initials

I'm trying to compare the initials of some names previously obtained from a text file, the format of the file would be this: nombre dato1 dato2 nombre dato1 dato2 nombre dato1 dato2 nombre dato1 dato2 I ask the user to type the name of the...
asked by 12.12.2018 / 17:05