Toymods Car Club
www.toymods.org.au
F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Members Members    Search Search
Toymods » General Car Talk » WAY OT: C programmers, I know there are some of you out there

Show: Today's Posts  :: Show Polls 
Email to friend 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
THE WITZL
Forums Junkie


Toymods Social Secretary

Location:
Sydney
Registered:
July 2002
 
WAY OT: C programmers, I know there are some of you out there Sat, 24 May 2003 07:47 Go to previous message
Ok, this is waaaay outta left feild i know. But i am desperate.

Im having serious issues comprehending the use of pointers and structures. Im particular with an assignment i have for uni, which is due on monday.

The assignment is to do the following: "allow the user to enter an arbitrarily long string of characters from the keyboard, and when the user types the carriage return character (enter), your program should print all of the characters onto the screen in reverse order".
And it MUST use a stack, in the form of the following structure:

struct node
{
char ch;
struct node *ptr_node;
}


and then use the functions
int pop(struct node **top);
void push(struct node **top, char ch); /* not sure if char ch should be same as in the struct definition */
int is_empty(struct node *top);

The main first hurdle i face is how to read the charcters from the scanf operation into a node struct and then pass it to the push function everytime a character is pushed! Im lost! Sad

HELP!
  Send a private message to this user    

SubjectPosterDate
Read Message   WAY OT: C programmers, I know there are some of you out there  THE WITZLSat, 24 May 2003 07:47
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 08:16
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 08:20
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 08:33
Read Message   Re: WAY OT: C programmers, I know there are some of you out there THE WITZLSat, 24 May 2003 09:29
Read Message   Re: WAY OT: C programmers, I know there are some of you out there stylezSat, 24 May 2003 09:30
Read Message   Re: WAY OT: C programmers, I know there are some of you out there THE WITZLSat, 24 May 2003 09:40
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 12:53
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 13:46
Read Message   Re: WAY OT: C programmers, I know there are some of you out there THE WITZLSat, 24 May 2003 14:03
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboSat, 24 May 2003 15:12
Read Message   Re: WAY OT: C programmers, I know there are some of you out there shinzuiSat, 24 May 2003 22:47
Read Message   Re: WAY OT: C programmers, I know there are some of you out there wilbo666Sun, 25 May 2003 00:12
Read Message   Re: WAY OT: C programmers, I know there are some of you out there shinzuiSun, 25 May 2003 03:53
Read Message   Re: WAY OT: C programmers, I know there are some of you out there NarkMon, 26 May 2003 07:11
Read Message   Re: WAY OT: C programmers, I know there are some of you out there THE WITZLMon, 26 May 2003 12:35
Read Message   Re: WAY OT: C programmers, I know there are some of you out there NarkMon, 26 May 2003 23:37
Read Message   Re: WAY OT: C programmers, I know there are some of you out there THE WITZLTue, 27 May 2003 02:25
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboTue, 27 May 2003 08:55
Read Message   Re: WAY OT: C programmers, I know there are some of you out there NarkWed, 28 May 2003 02:39
Read Message   Re: WAY OT: C programmers, I know there are some of you out there isaacTue, 27 May 2003 10:09
Read Message   Re: WAY OT: C programmers, I know there are some of you out there RibboTue, 27 May 2003 20:58
Read Message   Re: WAY OT: C programmers, I know there are some of you out there isaacWed, 28 May 2003 02:35
Read Message   Re: WAY OT: C programmers, I know there are some of you out there ehendrikdWed, 28 May 2003 04:57
Previous Topic:Old or New School
Next Topic:The Run...

Goto Forum:
-=] Back to Top [=-

Current Time: Wed Jan 22 14:52:59 UTC 2025

Total time taken to generate the page: 0.0065610408782959 seconds

Bandwidth utilization bar

.:: Contact :: Home ::.

Powered by: FUDforum 2.3.8
Copyright ©2001-2003 Advanced Internet Designs Inc.