Posts by whoami • 23 points
3 posts
-
1
votes1
answer137
viewsQ: Increment pointer inside C-linked list
Good people, theoretically when we create a pointer and make it point to an array, int a[10] = {0,1,2,3,4,5,6,7,8,9}; int *p = a; then to increment the pointer to the next element we do something…
-
0
votes1
answer515
viewsQ: Pass pointer array to function
I need some help with this exercise. I did the whole exercise and runs well only that in the end gives error because of passing the address of the matrix to the function. What’s the problem here?…
-
1
votes0
answers90
viewsQ: Sum the diagonal of a matrix (pointers)
Can anyone explain to me what "a[i]+i" means? When i=0 the pointer points to 2. But when i=1 shouldn’t be a[1]+1 = 4+1 = 5? In practice it points to 8... #include <stdio.h> #include…