Questions tagged as 'array'

1
answer

Problem dividing a string vector in C

I'm doing a program that needs you to find half a string vector, but that half can not cut any words, so that half would have to be the next space found after half. Soon after finding this half the program must divide the vector into 2 string ve...
asked by 02.07.2018 / 15:02
2
answers

How to remove null value from a foreach or array

I'm doing a query on a table that has a blank value (student: note). In a page I do the function with select and set the array on a return to call on another page, but I can not delete the blank value to print only those that have data. $valor...
asked by 14.06.2018 / 15:55
1
answer

C # - How to print all the values of an array with the command Console.WriteLine (???) ;?

// Make an array copy and print the 2. int[] original = new int[] { 2, 5, 3, 8, 9, 12, 15, 7 }; int[] copia = new int[original.Length]; for (int index = 0; index < original.Length; index++) { cop...
asked by 26.05.2018 / 14:40
3
answers

Convert an array of numbers into a single string in php

How do I transform an array of numbers into a single string in php? In the code below the variable $ result is the array of numbers, and I tried to convert it to a single string with the implode () function. But it does not seem to work becau...
asked by 27.05.2018 / 22:47
2
answers

What's the difference in assigning an already started array to an uninitiated array?

char nome[10]; nome = "w" //Aqui ocorre um warning, por quê isso ? char nome_dois[10]; nome_dois[0] = "w" // Aqui e normal, como esperado. "w" is in a static memory? How much of% is in a dynamic or static memory? When I call...
asked by 25.05.2018 / 05:32
1
answer

Delete repeated elements of a vector in C

I have to make an algorithm in C that receives values from the users and the armzazena in 2 different vectors (X and Y) and then shows the union (all elements of X and Y without repetitions), the difference elements of X that do not exist in Y,...
asked by 28.05.2018 / 19:41
1
answer

Filling index of non-existent results of a select with 0

I make a select in the database which returns me a array of data. With this, I make the following foreach on it: foreach ($resultado4 as $key => $value7) { $array6[$value7['carteira'].'flores'] = $value7['floresqt...
asked by 01.06.2018 / 19:37
1
answer

Access data inside array in PHP

Hey guys, all right? I have a problem with a project I'm developing. I get a form where the user informs the data but in this form, it is possible that it clicks a button to insert new inputs and inform other data. The array I am using as...
asked by 24.09.2018 / 14:02
1
answer

Blank space at the end of each array index?

I'm performing a line break without using the wordwrap() function. I'll get a string with the text, and an int with the length of characters allowed by rows as a parameter. I'll have to cut that string, then insert it into an already c...
asked by 23.09.2018 / 20:09
2
answers

Find JavaScript array elements [duplicate]

I would like to create a input that receives a value entered by the user and that when I click a button it executes a function that checks if the value entered exists in my array and if there is an index it is contained. var vetor = [1...
asked by 05.04.2018 / 08:02