Search:

Type: Posts; User: figarojones

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    657

    OOOOOHHHHHH!!! No wonder! Thank you!

    OOOOOHHHHHH!!! No wonder! Thank you!
  2. Replies
    2
    Views
    657

    Simple loop clarification

    I was given a couple pieces of code that don't make any sense to me. I was hoping you could explain where my comprehension fails.


    int row = 0, col = 0;

    while(row++ < 10);{
    ...
  3. So how do I do that with pointer arithmetic. I...

    So how do I do that with pointer arithmetic. I keep trying and nothing works.

    Here's my latest code. Can you please tel,l me what I'm getting wrong?



    void revArray(int arr[N])
    {
    int...
  4. I thought that because it was a pointer, I didn't...

    I thought that because it was a pointer, I didn't need to declare the size in there (again, I'm still learning, and this can be a bit overwhelming). I have to do this without modifying the main code,...
  5. Reversing an array via poiinters in a function

    I am currently taking a c programming class, and have just had the worst time trying to figure out how to properly use pointers and functions. I understand how they work in theory, but I just can't...
  6. Replies
    10
    Views
    1,942

    Thank you for all the responses. Some...

    Thank you for all the responses. Some clarification may be needed. I was given the main, and then asked to write the functions to fit it. The only thing I've done is add math.h, and written the...
  7. Replies
    10
    Views
    1,942

    Pointers and functions help

    I'm currently a student taking an online C programming class, and this board has been a lifesaver. Well, it looks like I need your guys help again.

    Was given a fully written code that I needed to...
  8. Replies
    5
    Views
    1,004

    Just realized that I was applying the %f to i and...

    Just realized that I was applying the %f to i and not d (which was part of my problem). I turned d into a double variable, and everything's working now. Thank you!

    I must be tired.
  9. Replies
    5
    Views
    1,004

    So I should set i & d as long? I thought that...

    So I should set i & d as long? I thought that variable automatically converted all variables with whatever parameters you gave it (i.e. The value of i, which starts out int, is converted to long int...
  10. Replies
    5
    Views
    1,004

    Pointers and functions help

    I am currently taking an online C class, and right now we're covering pointers and their use with functions. I thought I had them down, and then I copied the following demo code down and am getting...
  11. Replies
    2
    Views
    928

    THANK YOU!!! It worked perfectly (after I...

    THANK YOU!!! It worked perfectly (after I realized that 'custArray[i].state == stateArray[i]' needed to be replaced with 'i < NAME_LEN' ).
  12. Replies
    2
    Views
    928

    Loop comparing 2 strings?

    I am currently a student learning c, and I had to make a struct loop to collect info for 10 customers, then prompt the user to input a two-digit state code, and then have the program output every...
  13. Ahhhhh, I forgot about a space for the '/0' as...

    Ahhhhh, I forgot about a space for the '/0' as well. Silly me!

    Thank you! I have to say, this forum has been a lifesaver.
  14. Don't know if this is a struct, a loop, or an fgets issue.

    I am currently a student learning c, and I had to make a struct loop to collect info for 10 customers.

    #include <stdio.h>
    #include <stdlib.h>
    #define NAME_LEN 10


    int main() {

    ...
  15. Thank you, that was it. The font in my book (and...

    Thank you, that was it. The font in my book (and my ide) make '1' and 'l' look exactly the same. What was happening was that '234' was getting counted as 3 numbers. It didn't make sense to me, but...
  16. Actually, avg is the only thing that works (I...

    Actually, avg is the only thing that works (I actually thought I'd removed it, as it is not pertinent to the rest of the code. Sorry about that. It's removed now). I'm talking about how I'm inputting...
  17. Function not working properly. What am I missing?

    I am currently a student in C, and I'm trying to learn functions. However, the very first demo code the book gave just does not work (I keep getting undefined results). I've triple checked and I have...
  18. Thank you! I understand why they didn't include...

    Thank you! I understand why they didn't include the purpose now, but I wonder why they included it at all. Seems like one of those things they should include in a chapter on working with more archaic...
  19. I'm afraid you misunderstand. I know all about...

    I'm afraid you misunderstand. I know all about escape sequences (imagine how much of a headache life would be without '\n'). I'm specifically asking about the escape sequence '\?'. I don't understand...
  20. What is the use of the '/?' escape sequence?

    I'm currently taking a c-programming course, and in my text book the list of escape sequences includes '/?' with the note that it is barely ever used. This peaked my curiosity, because it infers that...
  21. Hmmmmm... Well, thank you! That makes total...

    Hmmmmm... Well, thank you! That makes total sense. I suppose I just misread it.
  22. Very simple clarification about strings (I hope).

    I'm currently taking an online C-programming class, and one of the things that was taught to remove a '\n' from a string, was to use the line
    str [lenOfStr - 1] = '\0';

    I get that the '-1'...
  23. Replies
    4
    Views
    1,363

    What? No, I checked that out a dozen times last...

    What? No, I checked that out a dozen times last ni.... ohhhhHHHHHHHHHHHHHHH ARRGGGHHHHH!!!!!!

    HOW COULD I HAVE MISSED THAT??!!!!!

    *clears throat*

    Thank you, that was quite helpful.
  24. Replies
    4
    Views
    1,363

    Thank you! It helped, and I was able to pull it...

    Thank you! It helped, and I was able to pull it off. However, I have a new issue. I'm trying to get a character count, and I'm having an issue with any showing up. Perhaps you could help me with what...
  25. Replies
    4
    Views
    1,363

    Copying portions of arrays?

    I am currently taking a C class, and I have been assigned to



    Prompt the user and accept a string of no more than 254 characters
    Prompt the user and accept a second string of no more than...
Results 1 to 25 of 28
Page 1 of 2 1 2