Posts by Neo son • 11 points
4 posts
-
0
votes1
answer84
viewsQ: Return malloc to pointer does not stay between functions
I have these two examples here: example 1: void copiaStr(char *a,char *b){ b = (char *) malloc(strlen(a)); for(int i = 0; i < strlen(a) ;i++){ b[i] = a[i]; } } int main(){ char *a = "alou"; char…
-
-1
votes2
answers63
viewsQ: Function of free() in abstract types
I expected the following code to record the students' data, and then immediately erase it from memory: testTurma. c #include "aluno.h" #include <stdlib.h> int main(){ aluno *turma; turma =…
-
0
votes2
answers259
viewsQ: Problem in Pickle library in Python
So, trying to apply the following code, but the compiler ta returning me following problem, I can not think of anything that is not some installation problem, but I got this problem in two different…
-
1
votes1
answer275
viewsQ: Problems with the 'continue' or 'while' command in Python
So I was doing some exercises in python, a language in which I’m learning to program, and it seems to me that the execution flow is not following correctly. # Converte distancia def mettocent(met):…