Forum: C Oct 20th, 2007 |
| Replies: 5 Views: 3,077 You're right. My mistake. |
Forum: C Oct 20th, 2007 |
| Replies: 5 Views: 1,064 You and me both. The second while loop is the hard way. It's much easier to do t[i]=0; and then just do a strcmp(s,t); after the first while loop!
Hoppy |
Forum: C Oct 20th, 2007 |
| Replies: 7 Views: 870 That's probably because checkprime has unbalanced braces ({}). |
Forum: C Oct 20th, 2007 |
| Replies: 5 Views: 3,077 I'll describe the algorithm in words. It's your job to write the code. You need a string constant that is 257 characters in length. It's value is a character string containing all of the ASCII... |
Forum: C Oct 20th, 2007 |
| Replies: 4 Views: 861 You're skipping a bunch of characters. For example, if you encounter a "/" and the next character is neither a "/" nor an "*", you do not output it. If you encounter a "/*" and then subsequently... |
Forum: C Oct 15th, 2007 |
| Replies: 10 Views: 1,353 On line 18. num2 is the upper limit of the loop. It's being modified within the loop. This is bound to either give the wrong result (if you're lucky) or cause an infinite loop, depending on what... |