Posts by user3629249 • 149 points
4 posts
-
0
votes2
answers65
viewsA: Segmentation Fault when removing list occurrences
suggestion: #include <stdio.h> #include <stdlib.h> struct lligada { int valor; struct lligada *next; }; typedef struct lligada *LInt; // protótipos int removeAll (LInt *l, int x); int…
-
2
votes1
answer706
viewsA: Socket in C does not compile
suggest code: incorporate comments to the question compile cleanly documents why each header file is included and now the proposed code #include <stdio.h> // printf(), perror() #include…
-
0
votes2
answers259
viewsA: Optimization of multiple ifs into something more practical
#include <string.h> // strlen() //#include <stdio.h> #define NUM_ALPHA 26 struct Quantidade{ int qtd; }; //char string = //"aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj";…
-
3
votes3
answers216
viewsA: Why is there an asterisk left?
The question code does not take into account that, in this algorithm, the value of row changes less frequently than column. Therefore, it would be better to use a couple of nested loops instead of…