You should learn how to use the looping structure in C. You can just google it out.
Type: Posts; User: WatchTower
You should learn how to use the looping structure in C. You can just google it out.
You do not need "person *p" to delete a node in front. You cannot point temp to p anymore after bringing back the memory to the operating system. As tabstop mentioned you have to make the head point...
At least I now understand why there are lots of compilers. So if the compiler follows the standardization of C then I guess that would be the compiler of your choice?
You can google out "Truth Table" it'll help you understand it easily.
I agree, that would be a pretty good advice. Remember that in developing an application, planning is the longest part. You have to think first, analyze the problem.
What I don't like in C programming is having different types of compiler around and you must have enough knowledge to know which is good or not.
this thread can help you as well.
The break statement is not inside the for loop. Remember that if you have to execute more than one statement in a for loop you have to enclose it using the "{" and "}".
The output was truly a surprise, I never thought of this existing in C.. But a very good example though.
I never thought of that, so simple, hehehehe..
x is assigned value but it's not used.
I have been doing lots of exercises on the book that I have then I went to encryption. This is just a very simple encryption on the book. It says that you have to enter only 4 digit number and each...
So with the code sample that you showed to me, the tower will also move. So to animate the towers and disk both the tower and disk should move. I thought the only thing that will move are the disks.
This truly challenging for me. Thank you for the algorithm, this is all I need to start coding this. I'll be posting my updated code just in case I experienced a problem. I'll be analyzing the...
Exactly, I can use the gotoxy of borland to make it move, but prior to that I must have an idea on how to resolve the problem I have stated in my first post.
I already created the solver for the tower of hanoi. But I wanted to make a simple presentation of how the solver is working by showing the movement of the box as shown below. The problem I'm facing...
After hours of writing lots of traces in recursion I now understand what actually happened. I also tried your example sebastiani, thanks so much for your sample program.
Thanks for the example, but my brain is not working in that example. Here's the calling I created. I don't know if this is correct or not, if it's correct then the problem I have is understanding the...
//2
void hanoi( int disc_num )
{
if( disc_num != 0 )
{
//first function call
hanoi( disc_num - 1 );
printf( "Me first\n" );
//function function call
I actually understand how recursive function works ( but only with recursive function calling itself once ) but this is my first time analyzing a recursive function calling itself twice.
I've traced it many times but can't get it.
void hanoi( int disc_num, int peg1, int peg2, int peg3 )
{
if( disc_num != 0 )
{
hanoi( disc_num - 1, peg1, peg3, peg2 ); //this...
Coming from the idea of other programmers around the net I have coded this tower of hanoi solver using recursive function. The problem i'm facing is analyzing how the recursion processed the...
I see, I understand now.
ok, so I understand that it switch doesn't have to check any condition. What do you mean at bottom? computed goto?
I was just curious what is the : switch( gender ) <- isn't this a condition? How...
It doesn't need to check the cases is that what you mean? If we remove break it's going to execute the succeeding statement to the next case does that prove that it's not checking the cases?
...