Thanks, SO.
Type: Posts; User: Sereby
Thanks, SO.
I am invovled in a project where I need to analyze C code that was written a couple of years ago by another programmer. Most of it is self-explanatory. However, it appears that some of the routines...
OK, I got you - I'm really just starting out with binary, so I just wanted to see those zeroes to help mark the bits in my head.
One stupid question - I seem to be unable to enter binary numbers that contain more than one 0 in the msb's (like 00000001), although something like 10000000 is displayed as expected. Is there a way...
Funny, good ol' Windows Calculator, huh? OK, thanks!
Yes, I can Google a bazillion of these, but I just wanted to see if anyone had recommendations for a good Win calculator that's geared specifically towards programmers to deftly handle bin, dec, hex...
Oh, very helpful (re: compliments) - thanks!
If the range of an int is -32768 to 32767, then what is this range in hex? Is it possible to represent negative values in hex?
Ah, thank you, Salem.
I'm curious to see if there's a way to compile C code written in Crimson Editor using the Visual C++ 6 compiler. I tried to adapt the editor's instructions for using the Borland compiler, but it...
Ahhh, relief...
Ahhh, wise advice. The book was purchased for me, and I'm required to use it.
So...I'll stick with int main(void) according to the FAQ.
If I understand you correctly, the problem I have is not with the logic, but with the fact that the sort function names are actually backwards? Well, that's what you get from a "teach Yourself C in...
/* Inputs a list of strings from the keyboard, sorts them */
/* in ascending or descending order, then displays them */
#include <stdio.h>
#include <string.h>
#include <process.h>
#include...
OK, that's what I thought. Thanks.
Here's a quote from The Stanford CS Ed Library (http://cslibrary.stanford.edu/105/):
Is this accurate? If so, what's the alternative?
I Googled this and found many resources, but I'd like to ask Those Who Know:
Where can I find a useful resource of C source code (especially for beginners)?
Thanks!
OK, thanks.
The following code fragment comes from Schildt's 4th Edition Complete C Reference:
/* Example of passing a structure pointer to a function */
/* Extraneous code deleted */
struct example {
...
OK, thanks!
If I'm using fgets() for console input, yet I don't know how long the input will be, what would be the most appropriate value for the second parameter? Also, would specifying a very large buffer size...
Well, from the FAQ I can plainly see that gets() is bad, bad. The FAQ also suggests using fgets(), but I don't want to work with files right now. Would it be appropriate to use scanf() instead?
I'm curious about something. I'm practicing working with strings. Below is a code snippet that I have a question about:
char string1[], string2[];
main()
{
puts("Enter text for string1:");...
OK, I see now. Thanks guys!
Hmmm, at this point in the book, "cast" is not covered. Could you please explain what it means?