Questions tagged as 'c'

2
answers

Apprentice C (C-Factor)

Someone can help me in the logic of this code? the beginning of it I understand but I get a bit cluttered in the part of the, can someone help me to understand? #include <stdio.h> int main(){ int fatorial, n; printf("insira o numero qu...
asked by 14.12.2018 / 19:55
1
answer

Ignoring the last element in recursive call

I'm implementing a tree in C, and one of my methods prints my tree in preorder, and separating the numbers with - . I created this function: void ImprimePreOrdem(TipoApontador arv){ if(arv!=NULL){ printf("%d-",arv->chav...
asked by 09.12.2018 / 20:18
1
answer

Power using recursion

Well, I'm doing a basic code in C, I'm not very good with this language, I'm learning it, although I've already seen it not used much. It consists of doing the power operation through recursion. The problem is in the output when the power is gre...
asked by 29.02.2016 / 22:17
1
answer

Error reading and comparing numbers in an array

The program must read a number and compare with the numbers of a 3x3 matrix any if the number belongs to a column of the matrix it should print the position, when I type 1 it prints two positions, but the 1 is only in one position . #include &l...
asked by 16.02.2016 / 21:27
1
answer

Problem with "Double" in my calculator I did in "C"

I was doing a simple "C" calculator just to exercise logic, which I learned and for fun, but I had problems, since I would like to transform it and a scientific calculator, I would need more memory than the Float can use, so I tried to u...
asked by 02.05.2014 / 08:55
2
answers

Problem with program of equation of the second degree

I have an interesting problem in my code, the program reads three numbers and says whether it is a triangle rectangle or not, but the problem is that depending on the sequence I type the numbers, program the error because the higher value typed...
asked by 19.04.2015 / 03:00
2
answers

printf does not show expected value

I'm having difficulty displaying some printf , for example: printf("\nDigite as horas : %d"); And at the time of displaying the message, it appears with a side number, for example:    Enter the hours: 89676 What's wrong with th...
asked by 11.04.2015 / 02:20
2
answers

Targeting failure when changing a Struct value in C

A Falha de segmentação error is occurring when trying to access information from a struct. The code is as follows #include <stdio.h> #include <stdlib.h> typedef struct { int val; }Info; void inserir(Info*); void main(){...
asked by 11.04.2015 / 08:32
2
answers

Line break does not work on file

I get the elements of a list but at the time of saving it does not save with line break saves everything on the same line. fprintf(arquivo, "%s\n", p->infoLinha);     
asked by 04.02.2016 / 19:54
2
answers

Back to top in C [closed]

I created a calculator in C, with menu and everything else, with switch case when choosing a function between + , - , * , / , etc. You enter two values and they are executed according to the function. How to do aft...
asked by 22.01.2016 / 13:57