Posts by DarkGV • 73 points
3 posts
-
0
votes1
answer78
viewsA: Display the value of vectors in C
This should return Segmentation fault (if i be 0) i has no initial value (i is any value) if it is 0 then it is working with a null vector, if it is 1 then it is working with a 1 position vector.…
-
1
votes2
answers1519
viewsA: How to compare two chained lists in C?
To compare lists you need to go through the lists until you reach a conclusion. This while will only end when at least one of them reaches NULL (which will be tested at while) soon:…
-
6
votes4
answers14489
viewsQ: Invert string in C
I’m trying to reverse a string in C but the function is clearing it: for(i = 0; i < (int)(size/2); i++) { tmp = buffer[i]; //armazena o character inicial buffer[i] = buffer[size - i]; //Troca o…