Questions tagged as 'c'

1
answer

Read archive and order words in alphabetical order (with removal of special characters)

I'm trying to find the error, but I'm not getting it. The program consists of reading a .txt file with the following content, for example:    Home-orange, otolaryngologist flower   notebook-blackberry table Then the program should remo...
asked by 04.04.2018 / 08:28
1
answer

Accessing the allocation causes the program to stop working

I have a problem accessing a struct of subscribers typedef struct Inscrito { char nome[50]; float cadastro; float nota; }; Inscrito *inscritos = NULL; It is a global variable and every time I access it in some way (either to...
asked by 07.04.2018 / 21:20
3
answers

join 2 vectors (a [10], b [10]) into a vector c [20]

How do I join two vectors A [10] and B [10] to create a vector C with 20 elements. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> int main(){ int a[10]; int b[10]; int c[20];...
asked by 07.04.2018 / 23:03
1
answer

C separating string with commas into vectors

I want to separate each line of a file into 2 vectors: v [i] .date and v [i] .value. However, when I run the code, no value I print is correct, and the outputs are random values. Is there something I should change?    Input   02/20 / 18,1140...
asked by 19.03.2018 / 17:48
0
answers

Microchip: ADC_GetConversion

I'm developing an alarm and the "actions" will be performed by voltage dividers (ADCconverter). voltdivneg = ADC_GetConversion(VOLT_DIV_NEG); voltdivpos = ADC_GetConversion(VOLT_DIV_POS); There are 3 states: STAND-BY, FAULT, and ALARM. Vout...
asked by 19.03.2018 / 15:46
1
answer

How to solve the problem of accentuation in the terminal?

I'm writing some strings on the screen using the Opengl library and some of the stored words are accented words, for example: república checa , where the output ends up being: repblica checa can solve this problem without using exte...
asked by 30.04.2016 / 01:03
1
answer

How to insert a string into the data stack

I need to make a stack that does a push, pop and print. So I created the functions and this works. But I wanted to add a String to my stack. Possibly a number and time or just a string. But I can not get either. Could someone help me, please?...
asked by 22.03.2018 / 03:28
1
answer

Problem with printf and scanf - My code does not print the correct information

I have this code here that is not reading the characters correctly when printing the user-populated data on the screen. Can you help me? // Question 1) Make an algorithm that reads a user's name, rg, age, gender, address, phone, and cell. //...
asked by 19.03.2018 / 23:27
1
answer

Thread1: EXC_BAD_ACCESS (code = 1, address = 0x68)

I'm having this problem on ide Xcode. In line 8 the warning    Thread1: EXC_BAD_ACCESS (code = 1, address = 0x68) The .txt file is in the same folder where main is. void construir1(struct elemento **P_inicio){ FILE *arq;...
asked by 27.03.2018 / 02:42
0
answers

Binary file to buffer in c

I am making a protocol and need to turn my files into buffer. For that I made a library. Most works, but in the data_file () function, when I load text files, I get a good result, but when I load binary files, it does not work. Detail: When I am...
asked by 16.03.2018 / 00:55