Search:

Type: Posts; User: goodn

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    1,477

    I knew about \0, bt I was under the assumption I...

    I knew about \0, bt I was under the assumption I would skip this character thanks to my pre-increment. Oh well, the program works perfectly now anyway.
  2. Replies
    11
    Views
    1,477

    Ok, now it's almost working. #include...

    Ok, now it's almost working.



    #include <stdio.h>
    #include <string.h>
    #define SIZE 1024

    int main()
    {
  3. Replies
    11
    Views
    1,477

    #include #include #define...

    #include <stdio.h>
    #include <string.h>
    #define SIZE 1024

    int main()
    {
    char s[SIZE];
    int i;

    gets(s);
  4. Replies
    11
    Views
    1,477

    So I imagine i would want to make a loop like ...

    So I imagine i would want to make a loop like

    for (i = strlen(S); i != 0; --i)
    {
    printf s[i];(I know that's not how the real code goes)
    }

    right?

    Wow, that was incredibly easy.
  5. Replies
    11
    Views
    1,477

    How would you recommend to reverse a string?

    Hi. For part of a code I'm making, I want to reverse strings.

    .sgnirts esrever ot tnaw I ,gnikam m'I edoc a fo trap roF .iH


    What I was thinking of doing is making a kind of bubblesort...
  6. Replies
    4
    Views
    3,237

    Um, thanks, but didn't you read? I just forgot...

    Um, thanks, but didn't you read? I just forgot the breaks. I know how switches work, I just simply forgot to put in my breaks. I edited my post to say that I found and corrected the problem. Your...
  7. Replies
    4
    Views
    3,237

    Hehe, I also had a couple errors, but I fixed...

    Hehe, I also had a couple errors, but I fixed those. Gues I should really look at my program for 5 minutes before deciding to ask for help!
  8. Replies
    4
    Views
    3,237

    Uh-oh! I am having a major switch problem!

    Hey. i'm making this program right now, and I KNOW what the problem is, but I don;'t know what I did wrong. All the functions and everything work correctly, so no need to worry about those, but I'm...
  9. Replies
    3
    Views
    1,273

    sory, windows 98, jGrasp

    sory,

    windows 98, jGrasp
  10. Replies
    3
    Views
    1,273

    Oh no! What could this error mean?

    I got a test file and a header file. I made the header file.

    My friend made the test file. theoretically, my header file SHOULD work for it!(his file has no errors, and his header file(which used...
  11. Replies
    20
    Views
    13,855

    Problem solved.

    Problem solved.
  12. Replies
    20
    Views
    13,855

    isum This function will take an integer array...

    isum
    This function will take an integer array of numbers and the array size as its parameters.
    It will return the sum of all the numbers in the array as an integer.

    dsum
    This function will...
  13. Replies
    20
    Views
    13,855

    Heh, my professor has done the same thing on his...

    Heh, my professor has done the same thing on his web page! Shame on him!
  14. Replies
    20
    Views
    13,855

    Ok, thanks. One other thing, it seems a lot of...

    Ok, thanks. One other thing, it seems a lot of you put "//comment" for comments?

    Isn't the proper way for comments to be /* comment */?
    wouldn't // just screw your progam up?(I really don't use...
  15. Replies
    20
    Views
    13,855

    OH. I see now. Yeah, I definitely want to return...

    OH. I see now. Yeah, I definitely want to return the highest value, not the index. Thanks for the tip though, I have a function in my next assignment which DOES need the highest index.
  16. Replies
    20
    Views
    13,855

    I'm not quite sure what you mean, but are you...

    I'm not quite sure what you mean, but are you forgetting that the initialazation of the for loop only happens once or something? I don't understand why I need another variable.

    And where did...
  17. Replies
    20
    Views
    13,855

    I also just noticed I was using int for my double...

    I also just noticed I was using int for my double functions, and I was using double variables in ones that should be integers.

    for instance darray[d] where d is a double. Where in the world will...
  18. Replies
    20
    Views
    13,855

    [code]int imax (int iarr[], int num) { int i,...

    [code]int imax (int iarr[], int num)
    {
    int i, max;

    for (max = -36667, i = 0; i < num; i++)
    {
    if (iarr[i] > max)
    max = iarr[i];
    }
    return max;
  19. Thread: Need help.

    by goodn
    Replies
    6
    Views
    1,447

    Hmm, just a question, what are the real life...

    Hmm, just a question, what are the real life applications of making memory proportional to the program's output, or is it just some gimmick your teacher is using to make the assignment harder?
  20. Replies
    4
    Views
    1,151

    Yes, I don't believe saying that homework is the...

    Yes, I don't believe saying that homework is the problem. I believe not stating the problem you are particualrly having is the problem. it will make someone assume that you just want them to write it...
  21. Replies
    20
    Views
    13,855

    int isum (int iarr[], int num) { int i, sum;...

    int isum (int iarr[], int num)
    {
    int i, sum;

    for (i=0, sum=0; i < num; i++) total += iarr[i];
    return sum;
    }

    int dsum (double darr[], double num,)
    {
  22. Replies
    20
    Views
    13,855

    I knew all about what they meant, and about the 0...

    I knew all about what they meant, and about the 0 thing, and I also knew how to declare functions, but now I understand that about how about the box[i] thing. I see how I can increase the function.
    ...
  23. Replies
    7
    Views
    1,571

    I have scanf problems too.

    I use the compiler jgrasp, and scanf presents problems for me too.

    for example, my code will be


    printf ("Enter the value for N: ");
    scan f ("%lf", &N);

    Instead of printing "Enter the...
  24. Replies
    20
    Views
    13,855

    Hi, could someone help me with arrays?

    Hi. I am goodn. i hope to contribute helpfully to your board later, but right now I am the one in need of help. In my c class we are starting to go over Arrays. I really have no grasp of them, other...
Results 1 to 24 of 24