Questions tagged as 'c'

0
answers

Function that returns the number of nodes of a tree that have the two esq and dir fields other than null

I have a binary search tree in which I created a function that should return the number of nodes that have both children (dir and esq fields other than NULL), but my function does not give the expected value. The insertion order is as follows...
asked by 28.11.2017 / 07:15
0
answers

C - when I use the local.h scanf does not work well

I'm creating a database. I used locale.h and setlocale(LC_ALL, "Portuguese") so that accents and keys appear on the windows command line. Because of this, when I make a% w / o of a character with an accent or a cue and make t...
asked by 10.12.2017 / 07:39
1
answer

Error compiling in CodeBlocks - Libboost

I'm compiling here in CodeBlocks, it's been a week since I'm trying to compile, but it always gives some error, and now that it's at the end of the compilation, it's giving some errors and I'm not able to solve it. Can anyone help me solve this?...
asked by 10.12.2017 / 18:31
1
answer

compare an entire row of an array

What I want to do is simple: I want to compare an array or an entire row of variables in an array for certain values in order var[2][]=={1,2,3,4,5} //inteiro. todos de uma vez instead of var[2][0]==1 && var[2][1]==2 &a...
asked by 25.11.2017 / 14:10
1
answer

Serial communication Arduino

I am trying to solve a certain exercise in class by my teacher. Basically the exercise is: With two arduinos prepared to make serial communication between TX and RX, it must transmit four code sequences through a two-key keyboard. Pin 0 - RX...
asked by 24.11.2017 / 00:22
1
answer

I get exited with non-zero status in this code pq?

#include<stdio.h> int main(){ int i,jog,rod,placar[500],ponto=0,p,maxPonto=0,vencedor=0,rodCopia; scanf("%d %d",&jog,&rod); rodCopia = rod; for(i=1;i<=jog;i++){ scanf("%d",&p); placar[i]+=p;...
asked by 23.11.2017 / 01:06
1
answer

Include spaces when reading strings in C

Good people I have a C job to do, in which I have to read information from a lot of different txt.com entries. Each string follows the following format: 12345António Manuel Silva Mendes Frankfurt Varsovia 1 The...
asked by 06.12.2017 / 18:31
2
answers

Two strings starting from one in C

Hello, I need software that reads a full name, consisting of a simple name and a last name, separated by "_" and printed separately. The code should use the following main function: #include <stdio.h> int main(){ char nome[30];...
asked by 29.11.2017 / 04:36
1
answer

Logic error with MOD (%)

Good evening, I have a code that shows me wrong values, in my opinion, my logic is correct, but when I request results, what is shown has nothing to do with the ultimate goal of the code. I have an activity that requests the name of the custom...
asked by 19.11.2017 / 06:56
1
answer

Program with C Recursion

I need to make a program that is a game where the user will input a number and I must determine if it is possible for the user to win the game through a printf saying "Yes" or "No", not it is necessary to show the steps of the program. The game...
asked by 19.11.2017 / 20:43