Posts by Gustavo Oliveira • 61 points
5 posts
- 
		1 votes2 answers139 viewsQ: How to test if the free(); function worked correctly?I’m creating the abstract kind of 2D Matrix data, and one of the functions I’m doing in TAD is this: int mat2D_free(TMat2D *mat) { free(mat->data); free(mat); } That is, a function to destroy the… 
- 
		0 votes0 answers26 viewsQ: Function that copies vector to another, already passing the destination address as parameterI want to make a function that copies a vector from double to another vector, allocating the new vector in the function that copies it. That is the function: void copiarvet(double *vet_origem,… casked Gustavo Oliveira 61
- 
		0 votes2 answers155 viewsQ: Variable receiving trashConsidering this simple password validator in C: #include <stdio.h> #include <string.h> int main(void) { char buff[5]; int pass = 0; printf("\n Entre com a senha : \n"); gets(buff); if… 
- 
		0 votes2 answers97 viewsQ: How to make a method that compares values from two objects?Given the following Java algorithm that calculates BMI: class Pessoa { String nome; double peso, altura; double calculaIMC () { return peso / (altura * altura); } String avaliaIMC () { double imc =… javaasked Gustavo Oliveira 61
- 
		2 votes2 answers1276 viewsQ: Undefined variable in PHPI am trying to run this PHP code using object orientation and am having difficulties. <?php class Circulo { // declaração de propriedades public $raio = 0; public $area = 0; // declaração de…