Questions tagged as 'c'

0
answers

Remove accentuation of a string in C language [closed]

I'm having a college work on Threads and competition control (OpenMP) in C, which is giving me a bit of a headache. The work consists of taking text from any file and separating it from% cos_de% producers and consumers, where consumers...
asked by 05.12.2018 / 19:16
1
answer

nome.exe has stopped working. I can not fix this [duplicate]

My code in C gives a crash displaying the following error:    name.exe stopped working I do not know how to fix this. Here is the code I've already done: #include <stdio.h> #include <string.h> #include <stdlib.h>...
asked by 10.07.2016 / 04:34
1
answer

How to reuse a pthreads?

I'm using pthread.h and using the following functions: // // Cria A thread // thread_argsPP[contthreadsPP] = contthreadsPP; pthread_create(&threadsPP[contthreadsPP], NULL, ReceivePinPad, (void *) &thread_argsPP[cont...
asked by 21.07.2016 / 15:13
3
answers

Should I allocate the structure member date as well?

Assuming the following structure: typedef struct lnode{ struct lnode *next; void *data; int id; }Lnode; Let's say I want to store a Lnode in heap : Lnode *exp = malloc(sizeof(*exp)); Should I now also use malloc...
asked by 01.02.2016 / 17:36
0
answers

Linux Sockets - Doubt [closed]

Why use these functions with socket implementations and what they are for? select() FD_SET() FD_CLR() FD_ZERO()     
asked by 25.01.2016 / 23:42
1
answer

Dynamic allocation problem - Targeting failure

Define two structures to represent a line. I need to open a file that contains the values of one line per line, putting the values in a linked list. This I was able to do. #include<stdio.h> typedef struct{ int x,y; }ponto; typedef struct...
asked by 10.03.2016 / 16:59
1
answer

Problems when printing the file of ordered numbers

Well, good night, I'm having a problem with this algorithm, so please enlighten me with your knowledge. I apologize in advance if it is difficult to understand the code, I am still in the second period.    The goal of the algorithm is:...
asked by 05.08.2018 / 23:34
1
answer

C library function in Postgresql

I'm using Visual Studio 2015 to create a function in a dll, and when I try to use it in Postgres, I get the following message:    server closed the connection unexpectedly       This probably means the server terminated abnormally       befor...
asked by 22.09.2016 / 21:31
0
answers

Doubt about the GTK + graphics library (Drawing a Tree B in C language)

Good afternoon, Recently I had a job that was basically the implementation in C language with graphical interface of a B-Tree, the program should allow and show the insertion, removal and search operations, rebuilding the tree at every step....
asked by 09.06.2016 / 16:37
1
answer

What is the operator for in the context of virtual memory paging?

I'm seeing the virtual memory implementation and I have this code: #define INDEX_FROM_BIT(a) (a / 8*4) #define OFFSET_FROM_BIT(a)(a % (8*4)) static void set_frame(u32int frame_addr) { u32int frame = frame_addr/0x1000; u32int idx =...
asked by 15.12.2015 / 22:35