Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Tags
Member Avatar for faithful4ever

Hi, Am trying to do up a Fibonacci sequence for MIPS (School requires us to make use of HASE Simulator). I have done up the following code but the output seems to be a tad wrong. ADDI R2 R0 1 ADDI R3 R0 1 ADDI R4 R0 1 ADDI R1 …

Member Avatar for faithful4ever
0
592
Member Avatar for faithful4ever

I've been posed a question that goes as such: *"What software constructs would you expect to have in a 2-D model that conforms to the OO paradigm?"* Anybody has any experiences to share or input with regards to this question? Thanks a lot!

Member Avatar for rubberman
0
66
Member Avatar for faithful4ever

My struct is as such: [CODE] typedef struct pqueue { char str[20]; int priority; }pqueue; pqueue q[MAXQ]; [/CODE] When I'm displaying the items in the priority queue, I am trying to sort it by priority, so I have the following comparison function: [CODE] int compareByPriority(const void *a, const void *b) …

Member Avatar for faithful4ever
0
123
Member Avatar for faithful4ever

I'm trying to get a user's input repeatedly until he/she types in 'done'. So what I have done is: [CODE] printf("Enter a name to save and its priority\n"); scanf("%s %d", q[rear].str, &q[rear].priority); [/CODE] How can I check for the user's input until he types the word 'done'? So if the …

Member Avatar for faithful4ever
0
134
Member Avatar for faithful4ever

I just have a quick question. Say I have a struct for the purpose of commenting in which it could be filled up or left blank depending on the user. Therefore, I need to dynamically allocate memory to the array comments. [CODE] typedef struct userComments { char comments; } name; …

Member Avatar for zeroliken
0
130
Member Avatar for faithful4ever

Hi, I'm trying to define a dynamic array that consists of an email address and a home address. How can I define them dynamically using malloc() in the below struct? [CODE] typedef struct entry{ char name[40]; /* contains name */ char phone_number[9]; /* contains phone number */ struct entry *next …

Member Avatar for -[xxxxxxx]-
0
144
Member Avatar for faithful4ever

Say I have a struct: [CODE] typedef struct entry{ char name[40]; /* Contains name */ char phone_number[9]; /* Contains phone number */ struct entry *next ; /* next is used to navigate through structures. */ } contact; [/CODE] I have a pointer: [CODE] contact *email, *address; [/CODE] In my main(), …

Member Avatar for zeroliken
0
130
Member Avatar for faithful4ever

I have an array of structures: [CODE]typedef struct { char name[20]; int ID; int status; } seat;[/CODE] Then, basically, I'm trying to print out the list of empty seats in a reservation system. [CODE]void listEmpty(seat plane[MAXCAP]) { int i; for(i = 0; i < MAXCAP; i++) { if(plane[i].status == 1) …

Member Avatar for Ab000dy_85
0
219
Member Avatar for faithful4ever

Hello all, Basically I'm trying to code a program that makes use of recursion to reverse an input integer, e.g. 123 will result in a display of 321. I've coded the program this far, but it just displays the last digit only. Where have I gone wrong? I.e. Instead of …

Member Avatar for histrungalot
0
727