Questions tagged as 'c'

2
answers

Perform function at every given time [closed]

Hello I would like to implement a function in my program that performs a task every time period having this code as an example something so I am wanting void main(){ while(1){ if(passou 5 minutos){ chama_funcao();...
asked by 24.09.2017 / 00:01
1
answer

Segmentation fault, stack in c

I do not know what might be giving this error in my code, please if anyone knows what's happening. Here's the code. #include <stdio.h> #include <stdlib.h> struct no { int dado; struct no *prox; }; typedef struct no criano...
asked by 28.09.2017 / 14:33
1
answer

C stack, problem with output

I'm making a stack, the data entered by the user has to allocate from descending order from the top, but whenever I print the first one on the top it exits as 0 which would be the highest value. Here's the code: #include <stdlib.h> #i...
asked by 28.09.2017 / 23:27
2
answers

while not running from the beginning

#include <stdio.h> #include <stdlib.h> main(){ int parar=1; // Condição para parar. int a=0, b=0, c=0; //Elevadores int count=0; //Numero de pessoas char elevador=""; //Elevador do{ printf("Elevador: "); scanf("%c", &e...
asked by 13.06.2017 / 05:21
1
answer

Import multiple libs into a single include in c

Is there a way to import all libs from my program into just include like in other languages: import re, datetime, math (Python)? After reading about preprocessing directives here (Little is said about the include on thi...
asked by 16.06.2017 / 18:16
2
answers

Why do you accept values beyond the size of the vector?

INT vetor[3]; vetor[0] = 110; vetor[1] = 12; vetor[2] = 30; vetor[3] = 13; vetor[4] = 1; Cout << vetor[0]; Cout << vetor[1]; Cout << vetor[2]; Cout << vetor[3]; Cout << vetor[4]; In shor...
asked by 01.08.2017 / 04:19
1
answer

What would be Pro * C / C ++?

From what I saw it is using in Oracle, but can I use it with another bank? Pro * C / C ++ is useful today? Could you pass an example code? Does it have PL / SQL difference? Or are they used together?     
asked by 08.08.2017 / 13:47
1
answer

How to get a result type n1 + n2 + n ... = x?

I'm learning C programming online and I wrote this code to find the perfect numbers in a given range, but I'd like to show the result with the sum of the divisors, for example: 1 + 2 + 3 = 6 PERFECT !!! 1 + 2 + 4 + 7 + 14 = 28 PERFECT !!! M...
asked by 16.03.2017 / 23:14
1
answer

How to present only odd and even values with three variables in C?

My variables are: int codigo; --> Sendo esta variável para o switch int numero1,numero2,numero3; The user will enter three variables: printf("Digite o primeiro numero inteiro: "); scanf("%d", &numero1);...
asked by 28.03.2017 / 23:29
2
answers

What is the limit of multidimensional vectors?

I'm running a test and it gives me an error when I try to create a vector [1000] [1000]. Are there limits for vectors? The error code ( Application stops responding ) is as follows: int main (){ int DIM_X = 1000; int DIM_Y = 1000;...
asked by 12.02.2017 / 14:01