Questions tagged as 'c'

1
answer

Conversion error from int to String

This code I'm using to study C, is not converting (at least eh what I think) to INT temp10 to CHAR ... with an error appearing: line 5: 5182 Targeting failure (recorded core image) What can it be? int main() { // aqui esta tudo OK!...
asked by 17.09.2016 / 03:02
1
answer

The queue code has a search error. How can I fix it?

I use the search 2 times in my code and it is a binary search in order to respect the criteria imposed in the heading of this exercise. But the question is the binary search module because the compiler tells me that the arguments are being pa...
asked by 23.09.2018 / 21:07
0
answers

How to know if the refcount of any object in python is not 0 when the interpreter is closed?

I created a module and a submodule with CPython in which I put a dubious Py_INCREF(submodule); . The code is this: PyDoc_STRVAR(MEU_modulo_doc, "Esse eh meu modulo.\n" ); static struct PyModuleDef MEU_modulo_def = { PyModuleDef_HEAD_...
asked by 14.09.2018 / 19:50
1
answer

Invert Dynamic Stack

Can anyone help me with this stack? The purpose is to create a function that invert the values of the stack, I tried to do this use the Invert () function of the code below, but it is not working, when I execute it simply closes the code. If any...
asked by 20.09.2018 / 04:07
0
answers

Message "undefined reference to 'itoa'" when trying to use itoia function

I found in some sites people talked about using the itoa function to convert an integer into a string containing the number in binary format. Code example that should do this: #include<stdio.h> #include<stdlib.h> int main(){...
asked by 15.09.2018 / 21:11
0
answers

Implementation of mutex in child process creation code (fork)

Hello I want to create a mutex to protect the part of the code accesses the pointer to sort the vector. The intention is to create the same amount of child processes for the number of processors in the machine, and each process orders some o...
asked by 13.09.2018 / 02:43
0
answers

Program to find saddle points in matrix 3x3

Hello. I can not get the program to show the saddle point: #include <stdio.h> int main() { int matriz [100][100],maior,menor; for(int i = 0;i < 3;i++){ for(int j = 0;j < 3;j++){ scanf("%d",&matriz[i...
asked by 06.09.2018 / 20:23
0
answers

How to "draw" a binary tree?

I have a problem trying to create an algorithm to "draw" a binary tree as below: But I have a problem to implement. I'll show my code below: #include <stdio.h> #include <stdlib.h> #include <math.h> typedef struct {...
asked by 06.09.2018 / 19:07
1
answer

'function_name': Identifier not found

void inserePoli1(poli **topo1, int val, int expo) { polinomio1 *novo; char cmd; novo = new poli; novo->valor = val; novo->expoente = expo; if (*topo1 == NULL) { novo->prox = NULL; *topo1 = novo;...
asked by 17.09.2018 / 19:15
0
answers

Hashtable_t * hashtable = NULL;

I'm banging my head to understand this syntax, does that mean it? and especially this _t . I'm studying this program #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <limits.h> #include <strings...
asked by 17.09.2018 / 16:23