MangoKitty

1

votes
2

answer
557

views

BGE Instruction ARM

This test asks to branch under the condition 'BGE' branch to a label. The values stored in my registers being compared are: LDR r0,=0X3 LDR r1,=0X8F CMP r0,r1 BGE a_label SUBS r1,r1, #0XC9 I expected it to branch but somehow 0X8F isn't greater than 0X3. Emulating my code on Keil proves this. Im wond...
MangoKitty
1

votes
2

answer
89

views

Pushing an element onto the stack using linked lists

why when pushing an element onto stack do you return the head pointer? Is this necessary or just good practice? Thank you so much, i think i'm missing something. For example: struct node* push(struct node* head,int data) { struct node* tmp = (struct node*)malloc(sizeof(struct node)); if(tmp == NULL)...
MangoKitty
-2

votes
0

answer
12

views

Finding target sum of two numbers in array

Im getting errors I can't solve : In main -> assignment to expression with array type In function 'twoSum': error: request for member 'length' in something not a structure or union for (int i = 0; i < nums.length; i++) error: expected expression before ']' token return arrayR[]{i, j}; In function 'm...
MangoKitty