Questions tagged as 'c'

2
answers

How to check the existence of a folder?

How to check for a folder with a C / C ++ program, it looks for the directory, if it does not find the directory specified, it will make the decision to create it.     
asked by 14.12.2016 / 00:54
1
answer

Brute force algorithm for game resolution Sudoku in C

I have the following code written in C : #include <stdio.h> #include <stdlib.h> #include <time.h> // Variáveis globais int jogo_tabuleiro[9][9] = {0}; int func_quadrante(int quadrante, int numero) { int linha_inic...
asked by 28.06.2016 / 06:00
1
answer

Error when printing static list

How do I print to my static list? #include <stdio.h> #include <stdlib.h> #define MAX 3 struct alunos { int matricula; char nome[30]; float nota1, nota2; }; typedef struct lista { int quant; struct alunos dado...
asked by 10.10.2016 / 18:05
1
answer

"#define" defines a global variable?

I have always used some define s, but now this question has arisen, when I use #define am I creating a global variable? Are there any losses in this usage? Example: Make program to read 10 numbers: I put% with% amount 10 and...
asked by 30.11.2018 / 22:52
1
answer

How to make a clone from a linked list in c?

How can I make a linked list without being recursive, I have this so far. Code : typedef struct slist *LInt; typedef struct slist { int valor; LInt prox; }Nodo; LInt clone (LInt a) { LInt k; if(a==NULL) {return NULL;}...
asked by 22.04.2015 / 21:05
1
answer

What is the best way to create a binary tree in C language? [closed]

Being a binary tree a set of records that satisfies certain conditions. I would like to know how best to implement a binary search tree in C language would be using a headless or headless structure?  Not taking into account your scan mode...
asked by 01.09.2015 / 15:24
3
answers

How to convert a string to const char *?

I'm trying to make an audio player (an mp3 player) using the SDL_mixer library. The problem is that I have a function that returns a string (a directory of a song) that I need to pass this string as an argument to the function *Mix_...
asked by 19.02.2014 / 04:30
2
answers

Pointer to struct

I was studying pointers to struct , and I saw that there are two ways to use it. can be: (*ponteiro).variavel Or: ponteiro->variavel According to what I read, when we put *ponteiro.variavel , because of the order of prec...
asked by 19.10.2018 / 18:41
1
answer

quicksort interpretation

I've learned Haskell, and now I'm beginning to learn C. I've been trying to get my quicksort code in Haskell to C but I did not succeed. So I decided to look at some books and found the following code: /* Função de inicialização da Quicksort....
asked by 30.08.2014 / 03:16
4
answers

Online Programming in C? [closed]

I want to know if there is a site that allows you to program online, I tried to use the Cloud9 IDE, but I can not program in C, does anyone know of a site to program in C without having to install any program?     
asked by 20.03.2014 / 10:50