Search:

Type: Posts; User: snoopfrogg

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    9
    Views
    10,677

    If I'm not mistaken fgetc() reads the character...

    If I'm not mistaken fgetc() reads the character currently indicated by the internal file position indicator of the particular file pointer (fp).

    fgets() will stop reading the when either (n-1)...
  2. Thank you!

    Thank you!
  3. Ah, thanks, now I'm getting the proper output. Do...

    Ah, thanks, now I'm getting the proper output. Do you mind explaining why that kept happening?
  4. Default Case Keeps Printing In Switch Statement

    I'm working on a simple program that maintains parts in a database. The program tracks parts stored in a warehouse. Information about the parts is stored in an array of structures. The program is...
  5. Replies
    15
    Views
    12,458

    You don't need the for loop or getchar() in your...

    You don't need the for loop or getchar() in your main function.
    Your bstSort function is incorrect.
    You don't increment the position of the array when storing the inorder traversal in arr
    ...
  6. Replies
    15
    Views
    12,458

    Your first post states: /* Destroys the...

    Your first post states:

    /*

    Destroys the binary tree structure by doing an inorder traversal

    and frees the dynamically allocated memory of each node.
    */
    void bstDestroy(struct Node...
  7. Replies
    11
    Views
    2,720

    I just realized the function doesn't call...

    I just realized the function doesn't call itself... lol, my b.
  8. Replies
    11
    Views
    2,720

    Are inline functions always recursive?

    Are inline functions always recursive?
  9. Replies
    36
    Views
    11,871

    She actually gives us a shell script to make sure...

    She actually gives us a shell script to make sure it passes those conditions, and they do.
  10. Replies
    36
    Views
    11,871

    Thanks for the feedback. I really appreciate it....

    Thanks for the feedback. I really appreciate it. What's the best way to avoid referencing garbage in my case? The program works for the test cases I was given, but I'd rather not practice bad...
  11. Replies
    36
    Views
    11,871

    Do you mind explaining this, please?

    Do you mind explaining this, please?
  12. Replies
    36
    Views
    11,871

    I figured it out! I believe my assumption about...

    I figured it out! I believe my assumption about my if statement being the problem was correct!

    Here's what my code looks like now:



    #include <stdio.h>
    #include <stdlib.h>

    #define SIZE...
  13. Replies
    36
    Views
    11,871

    I tried using a while loop in the replaced...

    I tried using a while loop in the replaced function to see if that would produce the same output. With that being said, my output is incorrect.

    If I input defendddd, the output is defend3ddd...
  14. Replies
    36
    Views
    11,871

    Would it be easier for me to use a while loop in...

    Would it be easier for me to use a while loop in this situation?
  15. Replies
    36
    Views
    11,871

    I incremented the str and replaced pointers but I...

    I incremented the str and replaced pointers but I still can figure out how to fix my for loop. All the expected outputs are correct, but I would like to eliminate the loop index to get the same...
  16. Replies
    36
    Views
    11,871

    is tmp declared as a char *tmp? I know what you...

    is tmp declared as a char *tmp? I know what you posted was psuedo code. I'm just trying to make sense of it.
  17. Replies
    36
    Views
    11,871

    Help with progamming assignment

    I am working on a program that ask the following:

    Write a program that replace repeated three characters in a string by the character followed by 3. For example, the string aabccccaaabbbbcc would...
  18. Replies
    3
    Views
    3,321

    Wouldn't it be easier to use a for loop in this...

    Wouldn't it be easier to use a for loop in this situation? Wouldn't the while loop run indefinitely if you don't initialize the count i?

    For example:



    #include <stdio.h>
    #include <math.h>
    ...
  19. Replies
    6
    Views
    4,179

    Thanks!

    Thanks!
  20. Replies
    6
    Views
    4,179

    Now I see what Salem meant by the arrays a...

    Now I see what Salem meant by the arrays a mirrored in both halves of the array. Thank you.
  21. Replies
    6
    Views
    4,179

    So *p just gets assigned to *q which would be N-1...

    So *p just gets assigned to *q which would be N-1 elements and *q gets assigned *p which would be the first element of the array?



    Can you explain please?
  22. Replies
    6
    Views
    4,179

    Pointers, Pointer Arithmetic and Arrays

    I'm having a bit of trouble understanding pointers and arrays. As well as pointer arithmetic. The problem is as follows:

    What will be the contents of the a array after following statements are...
  23. Thanks for the advice.

    Thanks for the advice.
  24. I finally figured it out. I created a search...

    I finally figured it out. I created a search function to make sure I'm not copying any duplicated element into array 3. It searches through the elements in array 3 and inserts elements the elements...
  25. That's weird... I ran the test inputs you posted...

    That's weird... I ran the test inputs you posted and this the output I got
    15653

    I'm a bit confused on what I need to do to make it run properly. Do you mind explaining to me what I should do?...
Results 1 to 25 of 31
Page 1 of 2 1 2