alocação
Space occupied between different types of integers
By the table of official MySQL documentation, and a question here in the SOpt, a doubt arose.
Considering the table:
L ... n disk space?
If you don't" Reserve "this space, how does it" increase " afterwards?
does this change from bank to bank?
Problem with valgrind and dynamic allocation in C++
I have a program somewhat larger than this, I have selected the part that I can not solve, are errors that seem unfounded, I ... (N1), numbers that, in another part of the project, will serve to take an average according to the selected aggregation key.
Dynamic allocation in C++
I was learning a little more about dynamic allocation in C++ on the internet, and a code from a teacher caught my eye.
Is a ... caught my attention was that this code does not would it be invading memory since only a space of 2 bytes has been allocated?
How to pass a dynamically allocated struct to a function in C?
The program must dynamically allocate the struct and pass it as a parameter.
#include <stdio.h>
#include <stdlib.h& ... p;escolha);
if(escolha==0)
break;
}
printar(cadastro, N);
free(cadastro);
return 0;
}
Accessing the allocation makes Program stop working
I'm having a problem accessing a struct of subscribers
typedef struct Inscrito {
char nome[50];
float cadastro;
... to show the code until the end
(I already tried to pass the subscribed pointer to the function and gave the same error)
Is it always good to deallocate memory before a "abrupt" exit of the program with the call of the exit function?
When I was starting to learn pointers and dynamic memory allocation in C, I was told that all memory allocated in the program ... ion, where in the event of an error would a call to exit() be required? Is it recommended to do a deallocation before exit()?
Recognize the 'enter' key in C
I am trying to make a code that prints only the third stop of a typed string, but my program is endless, how to recognize the ... }while(letra!=' ');
i++;
printf("%d", (int)letra);
}while ((int)letra!=10);
free(texto);
return 0;
}
How to print a list in C?
/* define a struct TAD lista */
struct lista {
float info; /* dado */
struct lista *prox; /* ponteiro para ... m = t;
}
}
lista.c above
Oque I want is just take the lista_imprime function and put it in main, but I'm not getting
Pseudo-object orientation in C and dynamic allocation
I am trying to make a minefield in c using ncurses.h and when I go to make the vector of "bomb objects" Linux says it can't f ... amount)
{
for (int i = 0; i < amount; i++)
{
mvwprintw(win, bomb[0]->y, bomb[0]->x, "O");
}
}
Hello, I'm trying to do a data structures exercise in c, but there is an error and I can't find it. Follows the utterance and the code
4. Write, in C a system for registering and viewing students.
/ / / to store all students, implement a dynamic vector of po ... printf("%s %s %s %s \n", &dados->nome, &dados->matricula, &dados->nascimento, &dados->rg);
}
}
Problem with perfect number in C
I'm having trouble showing if the number is perfect, when I put 6 it says it's not perfect, and I can only use pointer and dy ... Um número perfeito\n", *number);
} else {
printf("%d Não é um número perfeito", *number);
}
return 0;
}
Error when deallocating array-double free or corruption C
Hello, I'm making a program to rotate an array, which after allocating performs the rotation function, and then deallocates t ... in the case, the cop Matrix), x and y is the size of the Matrix necessary for the image to be rotated.
Theta = 90º as example
Handling batteries in C
I am a beginner in C and have the following exercise:
The parking lot here contains a single mall that holds up to
ten ... to, &carro, placaAux, manobraAux);
}
}
If anyone can help with any tips on how to proceed, I appreciate it.