Questions tagged as 'array'

2
answers

Errors with array manipulation in C

Using the following code: #include<stdio.h> #include<string.h> int main(){ //Declaração de Variáveis char jogo; char times[20][15] = {"Corinthians","Atlético-MG","Grêmio","Santos","São Paulo","Internacional","Sport","Palmeiras","Po...
asked by 10.11.2015 / 11:31
1
answer

Why does NetBeans suggest changing an array addition?

I'm starting my studies in programming with Java. I'm creating a class for object in NetBeans that alerts the following message:    Array concatenated with String Why? My code: import java.util.Arrays; public class PessoaGenerica {...
asked by 25.04.2016 / 00:52
1
answer

How could I create the array_column function in versions earlier than PHP 5.5

According to the PHP Manual, array_column function is available from of PHP 5.5 It returns the value of a "column" of a multidimensional array in a single array. Example: $records = array( array( 'id' => 2135,...
asked by 08.09.2015 / 17:36
1
answer

How to save byte array to file in PHP?

I have a array which is an image that is saved in the DB, which method do I use to save to the hard drive?     
asked by 16.01.2015 / 00:18
3
answers

Delete Item Array

I'm trying to remove an item from a array corresponding to [NUMBER] but it's not working. Array: Array ( [0] => Array ( [NUMERO] => 123 [DATA] => 11/11/1111 [VALOR] => 2,22...
asked by 29.10.2014 / 17:11
1
answer

How to remove the red part of the figure?

require("setup_do_banco.php"); $colunas = $pdo->prepare("SELECT * FROM origem WHERE ativado = 1"); $colunas->execute(); while ( $coluna = $colunas->fetchAll(PDO::FETCH_ASSOC) ) { $array_banco = $coluna; } foreach($array_banco as $...
asked by 28.12.2014 / 17:02
1
answer

Create Array of Objects in java and access objects directly

So I need to do the following I have a class with some attributes and methods, I need to generate a array of objects of this class, however I wanted to be able to access them directly, currently what I could do is throw them in a array...
asked by 15.05.2014 / 15:42
2
answers

Size of a vector of characters according to their addressing

Is the size of a character vector given by its address or variable value? Example: char[1000] = "Exemplo Teste" Is the length of this variable 1KB due to its char[1000] address or its size is 13 because of its content?     
asked by 26.12.2018 / 21:40
2
answers

Declaration of a global array of structures in C

I created a cliente structure and the next idea would be to create an array clientes . My idea would be to declare the array clientes globally, so that all functions can interact without being passed as an input parameter...
asked by 21.12.2018 / 22:04
1
answer

How can I subtract from an array with multiple positions with the same number in C?

The activity asks me to report a number of wagons and then asks me to assign a weight to each of them. I calculate the average of these weights and then subtract the average of the weights of each one of them to reach a common weight. Here is...
asked by 03.01.2019 / 18:09