Posts by Leonel Fontes • 11 points
2 posts
-
0
votes2
answers81
viewsA: Problems in C algorithm
In addition to the previously suggested corrections I suggest you use this line of code after the scanf’s. This way it always consumes everything that is inserted in the buffer until the ' n' and…
canswered Leonel Fontes 11 -
1
votes2
answers1600
viewsA: Vector size in C
#include <stdio.h> #include <stdlib.h> struct categoria_st{ char nome_categ[25]; int num_subcateg; char subcateg_st; } int main(){ int n_categ; //primeiro pedir ao utilizador o numero de…