Posts by Arthur Vieira • 19 points
2 posts
-
-1
votes1
answer33
viewsQ: Helps in allocating memory for a struct
int main(){ setlocale(LC_ALL, ""); cout << sizeof(Livro); paragrafo(); int cont; Livro *livros; while(true){ int op; cout << "1) Maior de 3 números"; paragrafo(); cout << "2)…
-
1
votes1
answer665
viewsQ: Difference in char* and const char* at the beginning of a function in C
const char* lerArquivo(FILE *file, int tam, char *path){ file = fopen(path, "r"); int cont; char *palavra; for(cont = 0; cont < tam; cont++){ fscanf(file, "%c", &palavra[cont]); palavra[cont…