Search:

Type: Posts; User: agxphoto

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,818

    Did you get this code above as a starter for your...

    Did you get this code above as a starter for your problem? Or, is there code missing from the above quote? It seems to me that this looks like a starter section of a problem that a professor might...
  2. Replies
    19
    Views
    3,283

    Netbeans, primarily used for java, has some C/C++...

    Netbeans, primarily used for java, has some C/C++ features that you can hook up with MinGW. If you're a beginner, it might be a good choice because it can be used with several different languages. ...
  3. Replies
    4
    Views
    1,738

    I do not understand why there is a "break" in the...

    I do not understand why there is a "break" in the if/else blocks.

    It also seems like the code is reading from a file into an array while also reporting on the word. Have you tried breaking these...
  4. Thread: C Homework

    by agxphoto
    Replies
    29
    Views
    4,177

    It probably has to do with data typing: What...

    It probably has to do with data typing: What kind of data type does a variable hold? Integer? Or, float?

    Integer means whole number only. There are no decimals or fractional parts to an...
  5. Replies
    5
    Views
    1,622

    3 hours for every hour of lecture; in reality,...

    3 hours for every hour of lecture; in reality, it'll be about two per. Ten minutes of study before class shouldn't cut it for any college class. That amount of study time would lay the groundwork...
  6. Replies
    9
    Views
    1,161

    It seems like you have several large arrays. At...

    It seems like you have several large arrays. At least five arrays of 10000 by 4; pass by value will treat those arrays in the functions as their own, even though they are repeats of the original. I...
  7. If your program is not looping through the turns,...

    If your program is not looping through the turns, then your problem is likely to be with control flow: do/while, for, if/then. Look at your overall plan for the program. There should probably be...
  8. Replies
    17
    Views
    2,657

    Okay, thank you for your comments; but, I didn't...

    Okay, thank you for your comments; but, I didn't have any questions about my code. Three-fourths of that program are a direct copy from the example. What little I changed of it; well, most of those...
  9. Replies
    17
    Views
    2,657

    The K&R doesn't discuss scanf at all in chapter...

    The K&R doesn't discuss scanf at all in chapter 1; the example shows a situation where a string's value is a word followed by a newline, with a null character of '\0' placed at the end. The null...
  10. Replies
    17
    Views
    2,657

    Is the string value like, "hello" or is it like,...

    Is the string value like, "hello" or is it like, "hello\n\0"? People think of it the first way, but in C the string will probably be processed as the latter.

    How does your string reversal program...
  11. Replies
    9
    Views
    1,324

    I think the point of that exercise is to show...

    I think the point of that exercise is to show that a variable can be displayed in a printf as a character, an integer or a double value.

    Reference: K&R C, ANSI C, "The C Programming Language,"...
  12. Kernel Protection Failure

    That type of error, Bad Access, is part of the protections built into your MacBook to keep you from over-riding the programs which keep the Mac running.

    You could otherwise write over the top...
  13. Replies
    3
    Views
    908

    I wrapped that code in a main and added in two...

    I wrapped that code in a main and added in two printfs. It compiles with one warning, but works well enough to show the values. Example below. Maybe this will help you.


    main()
    {
    char a[] =...
  14. Replies
    9
    Views
    2,953

    If you could get the still out of the video...

    If you could get the still out of the video somehow, then maybe it'd be plausible to use some system commands to edit the still, once it's already out of the video file. I think that would be a...
  15. Replies
    13
    Views
    4,099

    That 276 in the compiler errors is the line...

    That 276 in the compiler errors is the line number. That should put you right on top of one instance of the problem; notice, though, that if you discover a problem in a certain place, and that idea...
  16. Thread: EOF

    by agxphoto
    Replies
    5
    Views
    1,077

    It means it's time for finals in Comp Sci 101!

    "while (condition){ perform task }" means: while a given condition exists, perform { the task enclosed in brackets }.


    " . . . (c != EOF) . . . "

    Means: c is not equal to End Of File signal...
  17. Thread: Float Values

    by agxphoto
    Replies
    8
    Views
    1,493

    That would get you the reporting of the numbers...

    That would get you the reporting of the numbers as float; but that didn't make the variables get declared as floats, did it?

    You've got a typo of flat in there. Float.

    That first time you...
  18. Thread: Float Values

    by agxphoto
    Replies
    8
    Views
    1,493

    How about declaring some of those variables as...

    How about declaring some of those variables as float instead of integer?

    The modulo for float is going to be %f. For example, %3.0f would reserve three spaces on one side of the decimal and zero...
  19. Replies
    9
    Views
    1,667

    The whole program should be able to be read aloud, just like a smoothly flowing story

    When I read the functions in the example program, I'm not seeing that they are reading right. Functions are just like a formula for an algebra problem when you're working word problems.

    I...
  20. Replies
    21
    Views
    4,467

    Well, if I didn't quote K&R's C, then you might...

    Well, if I didn't quote K&R's C, then you might have mistaken all of those great ideas for my own!
  21. Replies
    21
    Views
    4,467

    "!" is the "not" that turns true into false and false into true.

    K&R's C, Chapter 2, Section 6.

    "The unary negation operator ! converts a non-zero operand into 0, and a zero operand into 1. A common use of ! is in constructions like

    if (!valid)
    rather...
  22. What about a while loop wrapping that one,...

    What about a while loop wrapping that one, important, if?



    . . .
    while (expected common condition exists) {

    if Previous-Important-If (test) {

    Response
  23. One way you could have the stdin to be split up...

    One way you could have the stdin to be split up into columns is to prompt for a tab between numbers. You don't have to hit enter before the end of a line.

    Sometimes when I had some odd behaviors...
  24. One way you could have the stdin to be split up...

    One way you could have the stdin to be split up into columns is to prompt for a tab between numbers. You don't have to hit enter before the end of a line.

    Sometimes when I had some odd behaviors...
  25. Replies
    11
    Views
    6,789

    If you have a copy of K&R's C, try looking at...

    If you have a copy of K&R's C, try looking at Chapter 1, Exercises 1-9 to 1-12 for examples of simple counting and reporting; also, for the core of the problem maybe consider Chapter 6.3 to 6.5...
Results 1 to 25 of 26
Page 1 of 2 1 2