return x + y;
Type: Posts; User: nul
return x + y;
Rogue user-space program.
Network scanners and cryptography are complicated and complex subjects. First, concentrate on understanding the language.
You never call your functions. Also, naming your variables the same as your functions is a less-than-great idea.
Consider other conditional operators.... Also there are other ways to "break" a loop, but I'm not sure if this has been covered yet in the book. Use your imagination. Other than the one logic error,...
https://en.wikipedia.org/wiki/Shunting-yard_algorithm
Although it compiles with a few warnings, the printf("start") and printf("file opened") prints out fine for me on Debian.
You should be so lucky! 9 out of 10 times I'm forced to write Java on Windows, which is torture for a C/Linux fan. Ahhh, to each their own I guess :).
A few remarks:
1. The initial question has in fact been answered. The program does run on Linux as Salem has proven.
2. You don't need the -lm flag when compiling as (from a quick glance at your...
I would recommend checking 'c' for white space or semi-colon in your conditional statement for the while loop. In addition to checking for that in the while loop, you also need a counter to track how...
Also take a look at inclusion guards.
Have you tried debugging yet?
Here's some logic for parsing words from your large string:
1. Have a char buffer that is allocated the amount of memory for the max size of a word.
2. Have a char pointer array that you can...
Extremely informative. Thank you so much!!
Thank you for the very detailed write-up/explanation along with code.
I do have a question: would you mind explaining in a little more detail why/how this method of calculating t is so accurate?...
So I haven't looked at this since my last post. Does anybody have a possible solution I could implement?
I've thought of just calculating the exact value at pre-determined points using hard-coded...
The only issue I encounter is complaining about the lack of return type or value for the main function. Also your missing the "#" in front of include.
Salem, thank you very much.
What has me scratching my head is that the approximation comes out exactly as printed in the back of the book. So I use the double variable "t" as the parameter for...
I've implemented the Euler method (Euler method - Wikipedia, the free encyclopedia), but what I'm actually having a problem with is evaluating the exact solution.
The following is the mathematical...
You're still having the same issue of possibly placing too many chars into your array. The situation of 9 non-newline chars, followed by a newline and a null byte.
And if you truly want to return the length of the string, you include the newline in the count.
Your fgetline function reads in ten characters and places them into your array. After this happens, you continue reading characters, but just discard them, UNLESS one is a newline. If it's a newline,...
Question: What happens when you try to read in (fgetline) a string longer than MAXLINE?
HINT: Not what you want to happen.
Also, why are you using another variable in the for loop when the...
When I enter a thread of someone asking for a fully-baked answer, I escape the thread........ See what I did there?
As long as we're suggesting possible names, when I discovered the naming conflict while working through K&R, I used the name fetch_line.....