Search:

Type: Posts; User: C0__0D

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,638

    Also, I never put the full path of the file, I...

    Also, I never put the full path of the file, I usually do it such as


    FILE* ifp = fopen("one.txt", "r");
  2. Replies
    9
    Views
    1,638

    Try replacing the r in your fopen to "r" ...

    Try replacing the r in your fopen to
    "r" notice the double quotes and not single quotes...
  3. I tried changing the function to this and no...

    I tried changing the function to this and no luck:


    void initialize_table()
    {
    DBEntry* database_entry = malloc(sizeof(DBEntry)*MAX_ENTRIES);
    int i;

    for (i=0; i<MAX_ENTRIES;...
  4. Having trouble setting hash-table entries to NULL

    Here is my code so far:



    //LINEAR CHAINING OR SEPERATE CHAINING...
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
  5. Bump

    Bump
  6. I realized that instead of initializing the...

    I realized that instead of initializing the question, I need to initialize the wine such as:


    for (i=0; i< number_of_wine_questions; i++)
    {
    strcpy(wine[i].question, wine_questions[i]);
    ...
  7. Thanks! I got it to work!

    Thanks! I got it to work!
  8. I tried to change it to wine.question[i] to no...

    I tried to change it to
    wine.question[i] to no avail. Not sure how to fix this issue.
  9. Attempting to create a multiple choice quiz, works but with a warning

    I am trying to create a multiple choice quiz so I can learn the menu at my new job, while doing a side project but I am having a warning when outputting. Can you guys take a look at this to see what...
  10. Replies
    5
    Views
    791

    The line after bill Clinton is num queried

    The line after bill Clinton is num queried
  11. Replies
    5
    Views
    791

    2 Here's the relevant text file: 2 5 PETER...

    2

    Here's the relevant text file:
    2
    5
    PETER GRIFFIN NOVEMBER 30 1989
    ERIC CARTMAN AUGUST 17 1988
    STEVE JOBS OCTOBER 21 1988
    JOHN SMITH APRIL 20 1980
    BILL CLINTON NOVEMBER 2 1990
  12. Replies
    5
    Views
    791

    Help with bug in freshmen level homework

    Good Morning, There is a bug in my code and I have been trying to figure out why its happening, I have never seen a bug like this and in the main function when I print out the queried first name...
  13. Replies
    3
    Views
    11,088

    I like your idea but I figured it was the way to...

    I like your idea but I figured it was the way to sort it by day of the year as that's what the professor and other students suggested. Would you suggest reconfiguring the merge sort to take in an...
  14. Replies
    3
    Views
    11,088

    MergeSort on struct array

    Hi I am creating a program that uses mergesort to sort birthdays by their day of the year. In my current build, I am storing an array of structs into a new date_array and sorting the date_array, then...
  15. Replies
    21
    Views
    2,733

    I have not given up. I don't give up THAT easily...

    I have not given up. I don't give up THAT easily :p but am frustrated beyond imagination. Okay, I put the name arrays in the loop, here's where I am at:



    # include <stdio.h>
    # include...
  16. Replies
    21
    Views
    2,733

    No matter what I try I keep getting a...

    No matter what I try I keep getting a segmentation fault 11 error. This is very frustrating as I cannot continue with writing this program :( I have tried multiplying by num_students, putting the...
  17. Replies
    21
    Views
    2,733

    I took everyones advice and attempted to malloc...

    I took everyones advice and attempted to malloc enough space for the number of students:






    # include <stdio.h>
    # include <stdlib.h>
    # include <string.h>
  18. Replies
    21
    Views
    2,733

    I multiplied the person struct by num_students...

    I multiplied the person struct by num_students but am still getting the seg fault :(
  19. Replies
    21
    Views
    2,733

    Why am I getting a segmentation fault?

    Hello fellow C programmers. I am trying to write a program for homework and am having trouble when creating the basic foundation for this assignment. When I try to compile I get these errors:


    ...
  20. Replies
    5
    Views
    860

    Post the output of your program in code tags.

    Post the output of your program in code tags.
  21. I have to multiply linked lists that can contain...

    I have to multiply linked lists that can contain up to 10,000 digits, which is too large for the unsigned int type, which is why they are being read in as strings. The steps that I am going to take...
  22. Yes the error is on line 34. The type is of...

    Yes the error is on line 34. The type is of BigInt why am I getting this error, and is my logic correct at least? I believe it is my problem is I don't know how to test code like this. Sure you can...
  23. Make your own post. And always put your post in...

    Make your own post. And always put your post in CODE tags!
  24. Alright after stepping aside for a week, this is...

    Alright after stepping aside for a week, this is the code that I have so far:


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

    typedef struct integer
    {
    int digit;
  25. Can someone explain why this simple recursion function crashes.

    # include <stdio.h>

    // if num = 5 print 4*2=8
    // if num = 6 print 6*4*2 = 48

    int even_prod(int num)
    {
    if (num%2 != 0)

    return (even_prod(num-1));
Results 1 to 25 of 51
Page 1 of 3 1 2 3