Questions tagged as 'array'

2
answers

strcpy is merging numeric format with other chars

I do not know if I could make myself understood in the title, but when I use strcpy() to copy a char* to another when I put a format so "teste" it works normally, but when I put a string format 3 letters (digits in case),...
asked by 02.06.2018 / 23:47
3
answers

How to store any string in C?

How do I store a string ) without first knowing the size of this string , for example: #include<stdio.h> int main (){ char nome[]; /* a array não tem tamanho determinado porque o input ainda não foi dado */ printf...
asked by 14.01.2017 / 14:30
1
answer

How to put variables within vectors?

How do I create variables within a vector? Something like: int arr[] = {int x=1, int y = 2};     
asked by 17.12.2014 / 23:13
2
answers

Return with all the lines of the foreach

I have the following script : <?php $recursos_data = array( array( "id" => "0", "recurso_nome" => "madeira", "producao" => "%produz%", "estoque" => "200"...
asked by 28.10.2014 / 00:22
2
answers

Sort words with accents in PHP

I am trying to alphabetize an array in PHP, where the key of each array position is a word. I'm using ksort . Sorting works, the problem is that accented words such as "acid" are placed at the bottom of the list. I need to make the...
asked by 09.10.2014 / 18:27
2
answers

Is it possible to implement a dynamic array inside a C structure?

How is it possible to create a dynamic array inside a structure Example typedef struct historico_de_fabrica { Hist_id_rolos rolos[1000]; //<- este array em vez de ter 1000 posições queria em //memoria d...
asked by 24.04.2014 / 19:06
2
answers

How to send an Array via POST to a PHP controller

I need to pass an array via POST to my PHP controller, the only way I have in mind is not to pass an array, but to pass the information through a separator (,; |), but I did not want to have to keep blowing up the other side (Controller). At...
asked by 27.02.2014 / 22:06
3
answers

How to transform a query into a json?

I'm trying to transform the data returned from a database query in Json format, so far it's almost right, but I believe the format is being created incorrectly! json is being generated as follows! [{"codigo":"1","nome":"Lucas Marioano Perei...
asked by 17.04.2014 / 15:38
1
answer

How to pass an array as an argument of a function per copy?

As an array is used as a pointer in many situations . A parameter that expects an array is actually a pointer, so what it copies is the memory address and not the array data, p> But what if I want to get the data right? I know the size...
asked by 27.01.2017 / 13:00
1
answer

Vector within vector. What does he do in that context?

40 students were asked about the quality of food in the student canteen, on a scale of 0 to 10. (1 meaning awful and 10 mean excellent). Put the forty responses into an entire array and summarize the search results. public static void main...
asked by 29.01.2016 / 20:10