Search:

Type: Posts; User: cb0ardpr0gr^mm3r

Search: Search took 0.01 seconds.

  1. FloridaJo, Yes, I've been told that this book is...

    FloridaJo, Yes, I've been told that this book is actually a difficult book and that a lot of beginners shouldn't start with such an intense book. That made me feel a lot better about having...
  2. I don't want to quote anyone because this is a...

    I don't want to quote anyone because this is a reply to both the second and third posts. I wasn't being specific enough lol I'm not really debating stopping. What I'm worried about is picking up bad...
  3. K&R 2nd Ed a bad beginner's book? Bad practices? (plan to hop to obj-c next)

    I was told by someone on stackoverflow that K&R Edition 2 is outdated and that the "language and its usage (in terms of best practice, etc.) have changed a lot since it was written."

    The problem...
  4. Replies
    7
    Views
    1,934

    Experimenting

    I tried to experiment by doing the following, which truncates the quotient before continuing with the operation:



    int main()
    {
    double num = 10.3;
    double den = 3.3;
    double mod;
    int trun;
  5. Replies
    7
    Views
    1,934

    Simple mod function won't work

    I'm studying K&R. I'm on exercise 4.3. Part of the exercise requires me to calculate the remainder of two double types.

    The following code isn't working for me, though:



    double...
  6. Replies
    2
    Views
    792

    Why is 9 % 10 = 9?

    9 mod 10 gives 9, but why?

    9 / 10 = 0, so the remainder should also be zero shouldn't it?

    This works the same for 0-9, but why?
  7. Woah. I was really confused. I didn't realize...

    Woah. I was really confused. I didn't realize that '0' was an ASCII character that had an internal value, so it read as just zero to me. Laser cleared that up for me.

    Thanks to all of you guys...
  8. What is the point of including - '0', if I'm just...

    What is the point of including - '0', if I'm just looking for the value of whatever is stored in s[i]?
  9. Problems interpreting simple syntax construct and explanation from K&R

    This is excerpted from K&R pages. 42-43

    The explanation reads that this function coverts a string of digits into its numeric equivalent.

    Do they explicitly mean numbers by saying digits? If so,...
  10. Thanks laser. The missing semi colon was the...

    Thanks laser. The missing semi colon was the problem. Btw, I'm only using getch so that the program doesn't automatically terminate once the lines are displayed.
  11. Simple c program to read in input and display output won't compile in VS-08

    #include <stdio.h>
    #define MAXLINE 1000
    int getline(char line[], int)

    int main()
    {
    int c, length;
    char line[MAXLINE];

    while((length = getline(line, MAXLINE)) > 0){
  12. To Laserlight, I apologize for the confusion....

    To Laserlight,

    I apologize for the confusion. It is already 5am in my area, so I'm pretty exhausted. This is also pretty frustrating at this point.

    To explain where my confusion lies, to my...
  13. I installed Codeblocks with MinGw, and I still...

    I installed Codeblocks with MinGw, and I still seem to be having the same problem. I will write the code and describe the problem.



    #include <stdio.h>

    main
    {
    int c;
  14. The main problem that I'm having with Visual...

    The main problem that I'm having with Visual Studio 2008 and K&R's ANSI C is that the getchar() function never returns EOF(-1) as it reaches the end of a char, so the example programs starting by...
  15. You're right Anduril, my post was pretty...

    You're right Anduril, my post was pretty ambiguous. I was trying to use Visual Studio 2008 with K&R ANSI, but I was getting logical errors once some of the examples were compiled. Then I realized...
  16. Which Unix should I use while reading K&R ANSI?

    I just picked up a copy of The C Programming Language by K&R. Which Unix should I use while studying C with this material?

    Thanks!
  17. Replies
    2
    Views
    1,021

    Linked list source code errors

    I have been using an online C tutorial to study C. The tutorial is ctutor.pdf, by Tim Ward, which can easily be found online. I'm currently studying Linked lists. The example code seems to have...
  18. Awesome reply bernt. I will have fun playing with...

    Awesome reply bernt. I will have fun playing with this program for a bit now.

    Thanks a bunch!
  19. Logical errors with if and if-else statements

    I am trying to recreate the Monty Hall problem, statistically. For those of you that are not familiar with the Monty Hall problem, I will skim through the idea behind it. You are on a game show and...
  20. Thanks for the input fellas. To Tater: I...

    Thanks for the input fellas.

    To Tater: I haven't gotten into studying structures or linked lists yet, but I will very soon.

    Adak, very good information. You make me wish I would have found this...
  21. Help with phone book console app in C

    Hey guys,

    I'm sorry for the long post, but I've been working on this for 2 days and I still can't figure it out.

    I made a phone book console app just to sharpen up on the basics of C. Thus far,...
  22. Help with a pointer exercise in the C programming language

    I have the following exercise to do from Tim Ward's online C tutorial:

    Define a character array and use "strcpy" to copy a string into it. Print the string out by using
    a loop with a pointer to...
  23. Replies
    1
    Views
    1,244

    Autoclicker help

    I'm trying to make a simple program with c, but I'm not sure where to start.

    The program needs to simulate the clicking of a window with the space bar. I'd like to be able to do this with the...
Results 1 to 23 of 25