Posts by Moni • 67 points
5 posts
-
1
votes1
answer108
viewsQ: Read from file and use read parts to call functions
I have a file that contains calls to functions present in my code. Some examples of functions are criar(), inserir(elemento, conjunto), listar(conjunto) where the arguments are integers passed to…
-
2
votes1
answer121
viewsQ: Mark unused positions on a vector
We assume that, in a given implementation, the positions of a vector may contain values of -2^16 to 2^16. You need to "mark" unused positions (for example, put a * ). However, given the range of…
-
1
votes1
answer41
viewsQ: Access memory allocated on a pointer
If I have a pointer vector of the type *p[tamanho], in which each position will be occupied by p[tamanho] = malloc(10*sizeof(int)), how to access each position of this vector allocated with the…
-
0
votes1
answer42
viewsQ: Use generated data in a function
Hello! The function below aims, whenever called, to allocate a memory space that will serve as a "set" for future uses. These sets must be identified by a number, starting at 0 for the first set and…
-
2
votes2
answers4172
viewsQ: Read comma-separated file data in C
I need to read the data of an entry in the format: 100,Refrigerator,180,90,89,1200.00,4,white After some researches, I found the Strtok function that separates the data between commas, and the code…