Questions tagged as 'array'

1
answer

How to transform pointer into array

I'm doing a program that transforms an array into a transposed array. I'm using 3 functions because I want to learn how to pass parameters from arrays . The main() function calls the mValores function that prompts the user for...
asked by 08.10.2017 / 18:26
1
answer

How to retrieve PHP array for comparison in javascript?

I have a code in javascript that sends some elements of the page to another in PHP via ajax and there are some comparisons. Then it returns this array with the print_r () function: However, I'd like to use return for a second javascri...
asked by 14.09.2017 / 04:07
1
answer

When I click, I want to define the phrase through the indexes

As you can see in the code, when I click I'm defining the phrase in a random way, but when I click, I want the phrase to be defined by the indexes myself, how do I do this? Public class MainActivity extends AppCompatActivity { private Tex...
asked by 13.10.2017 / 05:31
1
answer

Sort by id in AngularJS (Javascript)

I have an AngularJS object: $scope.listaDoCarrinho = [0: { id: "55", setor: "alimento", foto: "Produtos/Produto (55).jpg", descr: "Espaguete Renata", de: 15, … } 1: {...
asked by 12.10.2017 / 05:55
1
answer

How to organize an array by size automatically?

I was looking to create a ranking system. For this I thought of putting all the values inside a Array and then through a function to organize it from the largest to the smallest. However, every time I do each position, I always have to ma...
asked by 13.10.2017 / 18:32
2
answers

Is it possible to assign the first column of a line of a / a vector / matrix?

having as example a vector of two dimensions of type char 2x2: char vet[2][2]; Is it possible to assign to the first line indices of this vector? or do they work like a pointer to the other rows and columns? I tried to do it as fo...
asked by 07.09.2017 / 22:54
1
answer

Union of Vectors in C

Good evening. I have an evaluative activity of the college to be delivered but I can not think of the logic and solve the first activity. Can anyone explain to me where my error is and advice to better understand indexes in for. I make a mess wi...
asked by 27.09.2017 / 03:18
3
answers

print value of given array with PHP

I have this array Array ( [0] => stdClass Object ( [product_image] => http://placehold.it/250x150/2aabd2/ffffff?text=Product+2 [product_name] => Product 2 [product_desc] => Product details [product_size] => S [pro...
asked by 04.09.2017 / 18:08
1
answer

Vector: Enter 5 names and their heights, then show them all in ascending order. [duplicate]

I need to register 5 names and their heights, then show them all in ascending order. The problem is that I can only put the heights in the order, the names are in the order I typed. And also I am not able to use the double in place of the int...
asked by 14.08.2017 / 05:46
1
answer

Receive user vector in C

Hello everyone. I need help getting a vector of integers (separated by spaces) from the user. Here is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> /*Observacoes: 1, se a ordem nao e decrescente -1, se...
asked by 10.08.2017 / 18:54