Questions tagged as 'c'

0
answers

Letter comparison

I was able to make a letter entered by the user show another Example: c returns A, since the letter A is the most often used in our alphabet. So I can unveil a message for example, because in the message the letter that comes out most is C,...
asked by 22.04.2018 / 00:51
0
answers

CMake - Compile file in C using object file

Hello, I have a very general question: Assuming I create the main.c , list.c and list.h files. And you want to create the list.c object file, which contains the helper functions I will use in main.c whose signatures are in the he...
asked by 22.04.2018 / 06:52
1
answer

Double-chained list - C

This code is giving error in the libraries, can someone help me? # include<stdio.h> # include<stdlib.h> # include<string.h> # include<ncurses.h> # include<curses.h> # include<ctype.h> //#define MALLOC(x) ((x...
asked by 25.04.2018 / 02:14
0
answers

Multiple definitions of functions in c

I'm doing a program that uses several functions in separate .h files, however, I've been facing the problem of multiple function definitions because of some includes. I used the code below to instruct the preprocessor to handle this: #ifndef _...
asked by 28.04.2018 / 20:15
0
answers

FIFO with STRUCT does not work

Good evening, ten days ago I posted this question: How to create FILA passing a STRUCT with community support I've created this code: #define TAM 5 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <lo...
asked by 28.04.2018 / 23:59
0
answers

Program involving threads in C

Basically, I have a program that has two threads: adicionar and remover . Both manipulate an integer variable called quantity. If quantidade reaches the value 10, the thread adicionar enters the suspended state a...
asked by 29.04.2018 / 17:10
1
answer

Why use pointers as function parameters?

I already have some knowledge about pointer, but I wanted to understand why in most cases people use pointers as parameters in functions. I'm currently studying algorithms through the GeeksforGeeks portal, which I find very cool because it...
asked by 18.05.2017 / 13:46
1
answer

Print student grades in an array

I wanted to print all the notes at the end of the program, but I can not. Ex: Aluno 1: Nota 2 Aluno 2: Nota 4 etc... #include <stdio.h> #define resp 3 #define nota_aluno 3 int main()...
asked by 19.04.2018 / 17:18
0
answers

Receive serial data, does not work first

I'm using the code below to access the serial port of a raspberry Pi and receive the data sent by the UART, running ALMOST perfectly. When Linux starts and runs the software it stops and does not receive anything, but if it quits and starts a...
asked by 17.04.2018 / 15:53
0
answers

httprequest with curl in C returning values

Hello everyone reading. I'm trying to create a simple md5 hash file validation code with my web server. I basically want to send the hash and if it is the same registered on my web server and it will return with true or false, if true retu...
asked by 17.04.2018 / 18:01