Posts by heavydsoul • 65 points
5 posts
-
1
votes1
answer303
viewsQ: How to make a pointer point to NULL?
I need an element position in a dynamic vector to be empty, so I can check if I can place an element inside it later. However, the compiler does not allow it. Follow my code: MATRIZ_ESPARSA…
-
1
votes3
answers196
viewsQ: Is it possible to store values without using static vectors?
I need to create a sparse matrix of the cross-dynamic list type and my cells are the type: typedef struct CELULA{ int linha; int coluna; double valor; }CELULA; But every time I create a new cell in…
-
2
votes0
answers269
viewsQ: Generate random numbers in a vector of floats in the C language
I would like to know methods of generating a sequence of random numbers, ranging from 0 to 10, of type float in a size 10 vector.
-
1
votes1
answer41
viewsQ: Doubt regarding the passage of parameters
In the code below, in line 5, the function foo1t calls the function foo1 passing two parameters to it, however, the function foo1 has only one parameter. Is it possible to do this or the code is…
-
0
votes1
answer2102
viewsQ: C ordering using recursion
I need to make a vector ordering code using recursion. I looked into the sorting methods and found two that would be interesting: Lection Sort and Quicksort. However, I tried to use Selection Sort…