Search:

Type: Posts; User: hiven

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,725

    Ah i understand now, thank you.

    Ah i understand now, thank you.
  2. Replies
    6
    Views
    1,725

    Is this even being used in the code though. I can...

    Is this even being used in the code though. I can see letter[0], letter[1] and letter[2], but no mention of just letter.

    Sorry if im being dumb.
  3. Replies
    6
    Views
    1,725

    Quick help needed on simple example

    char c=0;
    int letter [3];

    letter[0]=0; letter[1]=0; letter[2]=0;

    printf("please enter a letter");
    scanf("%c", &c);

    switch (c) {
    case 'a': letter[0]++;
  4. Replies
    26
    Views
    2,348

    Ive been looking at this again and I feel like I...

    Ive been looking at this again and I feel like I understand it but there are few things I could do with clarification if anyone has the time to help.

    The first is, is the mean value stored in...
  5. Replies
    26
    Views
    2,348

    Wait so sorry just so I understand, middle is...

    Wait so sorry just so I understand, middle is just a place filler?

    Am i correct in saying that the result of the sum/counter is meanValue? Would it not be better to use this instead of "middle"?
  6. Replies
    26
    Views
    2,348

    Hi, The issues im having is understanding...

    Hi,

    The issues im having is understanding where mean value is stored, and how "middle" is being used, since it doesnt seem to be equated to anything or given any value.
  7. Replies
    26
    Views
    2,348

    Im really sorry to be a pest, but my exam is on...

    Im really sorry to be a pest, but my exam is on wednesday and so far I cant solve my outstanding issues despite reading up on functions.

    I would really really appreciate if anyone could give me...
  8. Replies
    26
    Views
    2,348

    void sortMiddle(float myList[10], float middle,...

    void sortMiddle(float myList[10], float middle, float inferior[10], float superior[10])
    {
    int counter1=0, counter 2=0, counter 3=0;
    while (counter1<10)
    {
    if...
  9. Replies
    26
    Views
    2,348

    Ah that makes more sense. So in this example the...

    Ah that makes more sense. So in this example the sum is adding the value of each value in myList at a time, adding them up, and then dividing that number by the counter number.

    Is this right? By...
  10. Replies
    26
    Views
    2,348

    Ok. Ive commented the code. There is one line...

    Ok. Ive commented the code. There is one line that I dont fully understand what it is doing, and I also dont understand where the value of sum/counter is going.



    float list[];

    float...
  11. Replies
    26
    Views
    2,348

    Ah ok that clears it up. So in order to answer...

    Ah ok that clears it up. So in order to answer the first part of the question:

    "How would you declare a list of floating numbers in C?"

    Would it be something as simple as this, with x being the...
  12. Replies
    26
    Views
    2,348

    How is it that the same line is used in the model...

    How is it that the same line is used in the model answers without a size, is that an error in the model answer?
  13. Replies
    26
    Views
    2,348

    It tells me that list needs a size. Something...

    It tells me that list needs a size. Something instead like this works:

    float list[1];

    I dont really understand what I should be taking from this though, what does it show?
  14. Replies
    26
    Views
    2,348

    I guess at this point I should start from...

    I guess at this point I should start from scratch.

    "How would you declare a list of floating numbers in C?"

    Is the answer to this simply:

    float list[];

    float is the type (replacing...
  15. Replies
    26
    Views
    2,348

    Hi, So i understand that the top segment...

    Hi,

    So i understand that the top segment checks to see if the counter is less than 10, and then calculates the sum as equal to myList[counter], and then increments the counter. Im not really sure...
  16. Replies
    26
    Views
    2,348

    Need help understanding basic list code

    Hello. Im new on this forum so please go easy. I have an exam coming up soon and Im having trouble understanding the solution to the last answer in the exam. Ive listed both the question and answer...
Results 1 to 16 of 16