I am studying pointers and this is code used as an example that is in the material given by the faculty. I have been replicating this code in my machine and the output is different from the one presented in the material.
Code:
#include <std...
I have this code:
Arvore* arv_insere (Arvore* arvore, Registro* registro){
if (arvore == NULL){
printf(COLOR_RED "ERROR: Arvore não inicializada" COLOR_RESET "\n");
exit(1);
}
float direction = reg_compare(...
My function main was thus (% with% was set further back):
int main() {
int i;
int *result;
pthread_t tid[N];
for (i=0; i<N; i++) {
if (pthread_create (&tid[i], 0 ,fnThread, (void*)(&i)) != 0){
printf("Er...
When I run this code:
#include <stdio.h>
int main(void) {
int teste[10];
printf("Imprimindo o vetor 'teste': %d\n", teste);
printf("O endereço do primeiro elemento é: %d\n", teste[0]);
return 0;
}
The letters "é" and "ç" com...
How could I print the fifth (index 4 from the dot) part of a real number without using libraries or a "complex" code for opening chapters.
Make a program that reads a real number, and print the fifth part of that number.
I'm trying to pass a array from char to a procedure that will resize (with malloc() ), write its contents and return to main() .
I know that every vector is a pointer and is already passed by reference, but something in...
I want the program to store only 1 sentence per line. Since each sentence is possible to be terminated according to the signs I show in my code example. It does this but when you print on the screen it does not print those same characters which...
I'm trying to learn recursion and am in doubt on an issue I was doing in c, I need to add how many numbers of a vector with n elements are larger than a number x. This recursion simply does not go into the head, I need a clearing.
#include <...
I'm doing a simple hangman game. However, when I read the letter (either with gets or with scanf ), the number of lives drops to 0. I am using Dev-C ++ because it is the program that the teacher uses in class. >
int main() {
i...