Questions tagged as 'c'

1
answer

Removal of element at the beginning of the list chained in C

In this program in C, I'm trying to create a function that removes the first element from a linked dynamic list ... #include <stdio.h> #include <stdlib.h> struct no { int dado; struct no *prox; }; The functions of the s...
asked by 17.12.2017 / 22:51
1
answer

I can not sort the notes with the use of struct

I want to sort the student's grades, but I can not do it because when I receive the grades I'm using the index j, I think that's the problem, but I do not know how to solve it. #include<stdio.h> #include<stdlib.h> double ordena(d...
asked by 02.01.2018 / 21:55
1
answer

Matrix comparison error

The question asks for a comparison of arrays, I tried to compare them, but the answer if they are the same appears several times and I do not know how to solve this problem, is what is causing the 10% error that the uri is reporting. Here th...
asked by 28.12.2017 / 21:17
0
answers

Problem removing nodes from a list

Good evening, I'm doing a program that is kind of a "candy crush" in SDL. And I needed your help to help me remove the balls from the game, which in this case are the nodes in the list. The program is going through the game looking for the...
asked by 13.12.2017 / 21:16
2
answers

Vector ordering by function in C

Good morning! I'm having trouble passing a vector to void function so that the ordering is done and returned, as well as problem to pass to another void function whose purpose is to display the already organized vector. The compiler returns t...
asked by 14.12.2017 / 10:51
1
answer

How to install LLVM?

How do I install clang / LLVM on windows to run C programs in bash if it ever appears "failed to find msbuilt toolsets" when installing llvm ??     
asked by 12.12.2017 / 01:05
2
answers

Input is not making sense

void cadastroturma () { char turma[30],caminho[100]; printf ("Diga o nome da turma a ser cadastrado:\n"); scanf ("%[^\n]", &turma);//Já tentei com gets e fgets getchar();//Já tentei sem esse getchar printf ("\nAgora o caminho onde quer gravar...
asked by 11.12.2017 / 12:01
1
answer

Error when trying to calculate the factorial, by parameter passage

I'm studying functions by passing the parameter, the teacher asked to calculate the factorial of a number per pass parameter, the maximum I got was the code below, even though the code does not execute. #include <stdio.h> #include <st...
asked by 07.12.2017 / 22:27
1
answer

Binary search tree

#include <stdio.h> #include <stdlib.h> #include <string.h> struct arvore { int key; struct arvore * right, *left; }; typedef struct arvore Arvore; Arvore * alocar(int key) { Arvore * p = (Arvore *)malloc(siz...
asked by 02.12.2017 / 17:04
1
answer

How to remove a node in a binary search tree with these specifics?

I have the following binary tree: Defined by the following data struct: typedef struct Node{ int data; struct Node * left; struct Node * right; } node; typedef struct Node * root; And I have the following function: void re...
asked by 04.12.2017 / 23:46