Questions tagged as 'c'

1
answer

strncpy function simulation

I did a function that simulates what strncpy does in the string library. Copy a number of characters from one word into another. But I do not want to change the original string ... and it does. I can not find a way to not modify it. I pass the f...
asked by 08.09.2017 / 03:06
1
answer

Memory request

I tell you my question. I have a simple program in C, I am working with linux Mint. The only thing he does is ask for memory until he can not ask for more. Here I put the code: #include <stdio.h> #include <stdlib.h> int main(){...
asked by 10.09.2017 / 21:36
1
answer

Array storage failure average function

I have this code for a university job but I have problems when calculating the average of the data that was entered into the array. Make an impression of the arrangement in the average function and it throws possibly random values and I do not u...
asked by 08.09.2017 / 23:17
1
answer

Error file in C

I'm doing a simple text file exercise, but it turns out that I miss the message "The program stopped working" and I do not know why, I do not see anything strange. The error jumps to put the year of the date of birth. Code: #include <std...
asked by 02.09.2017 / 16:02
1
answer

function strstr (from the library string.h) made by me

I made a program that pretends to be the function strstr , of the library string.h . Enter 2 strings per keyboard and the function finds the second string in the first one by returning a pointer (if it does not find it returns NUL...
asked by 07.09.2017 / 21:11
1
answer

Pipeline a -bash in C

I have a question about how the computer uses an open pipeline with the bash shell. Suppose I have a "master" program # 0, and a series of slave programs # 1, # 2, # 3 ... And also, the result of # 1 is used by # 2, # 2 by # 3, and so on. If my...
asked by 27.08.2017 / 15:20
1
answer

invalid conversion from 'char' to 'const char'

When I use the functions strcmp, strlen, strcat or strcpy I always get the same error, the program says the following: Error: invalid conversion from 'char' to 'const char'. Could someone help me? I attach the code and a photo of a pro...
asked by 22.08.2017 / 08:55
1
answer

How can I use a DLL written in C

I'm a little new with this library management. It turns out that I need to use the GNU Libmicrohttpd library found on this link link . This library the inconvenience that I have found is that it is written in C and the project that I am d...
asked by 16.08.2017 / 15:37
0
answers

XML for C in Netbeans

I am using Fedora 26 and Netbeans 8.2 I need to include the libxml library to parse XML files with the C language. I can not find information on how to do this. I already have the libxml and libxml2 libraries installed in Fedora.     
asked by 13.08.2017 / 21:27
0
answers

C - Sometimes a function is not executed

I have a pseudo graph conformed by adjacency lists, where tree is an array of "lista_t" typedef struct nodo { int value; struct nodo *next; } nodo_t; typedef struct { nodo_t *primero; nodo_t *ultimo; int len; } lista_t; Well and...
asked by 06.07.2017 / 07:47