Questions tagged as 'ponteiro'

0
answers

Basic pointer question

I needed to make a program that the user enters two sentences, then the program identifies the first occurrence of sentence 2 in sentence 1, and then deletes that occurrence and prints the new first sentence. For example, the user types "the mou...
asked by 22.04.2018 / 20:23
1
answer

Why use pointers as function parameters?

I already have some knowledge about pointer, but I wanted to understand why in most cases people use pointers as parameters in functions. I'm currently studying algorithms through the GeeksforGeeks portal, which I find very cool because it...
asked by 18.05.2017 / 13:46
1
answer

Pass array of pointers to function

People need help in this exercise. I did the whole exercise and it runs fine only in the end it gives error because of passing the array address to the function. What's the problem here? Suppose I have to pass the address of the array, make a...
asked by 09.04.2018 / 20:12
1
answer

How to dynamically allocate an array using a pointer pointer in a void function

I'm trying to allocate an array in a void function, by sending a pointer pointer int **sigma , as lerArquivo(char *alfabeto, int *Q, int *Q0, int *F, int ***sigma, FILE *arq); , but I'm having difficulty allocating memory spac...
asked by 17.03.2018 / 16:57
0
answers

List and Pointers in C

I'm trying to create a static list, and I can not display the product name in the printf("\n Indice: %d Valor: %s",i,p->nomeProduto[i].valor); list, only the "ListList", the query function probably does not work. Here is the whole c...
asked by 05.03.2018 / 18:52
0
answers

Sort a pointer inside a struct

In this chained list, a vector of 10 positions is set. First, you must choose which position to complete and then how many values to add (% with%). So far so good. The problem is that I'm trying to sort the vectors incrementally, but I'm d...
asked by 11.03.2018 / 00:21
0
answers

Structure and Pointers in C: Binary Tree

Hello, I'm trying to create a math expression tree with the following logic: My expression is a string, and I have 4 character options: (: When finding this character, my code must create a node for pref , insert in its conteudo(...
asked by 16.02.2018 / 15:10
1
answer

How to create a pointer to save the address of a binary tree root and then use this address to call the root?

Hey guys, I have a problem with my seemingly simple code to solve, but I still get confused with pointers. The code is to insert each digit and operator of an entire parenthesized expression into a binary tree. The logic is, when I find a "("...
asked by 15.02.2018 / 15:40
2
answers

Vector ordering by function in C

Good morning! I'm having trouble passing a vector to void function so that the ordering is done and returned, as well as problem to pass to another void function whose purpose is to display the already organized vector. The compiler returns t...
asked by 14.12.2017 / 10:51
1
answer

Binary search tree

#include <stdio.h> #include <stdlib.h> #include <string.h> struct arvore { int key; struct arvore * right, *left; }; typedef struct arvore Arvore; Arvore * alocar(int key) { Arvore * p = (Arvore *)malloc(siz...
asked by 02.12.2017 / 17:04