A Problem in part b

Discussion in 'C' started by sujan.dasmahapatra, Oct 16, 2009.

  1. sujan.dasmahapatra

    sujan.dasmahapatra Member

    Joined:
    Jun 11, 2009
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Male
    3. You must complete both parts a and b.
    a. Write a C program that has a declaration in main() to store the following numbers into an array named channels: 2, 4, 5, 7, 9, 11, 13. There should be a function call to display() that accepts the channels as an argument named channels and then displays the numbers using the pointer notation *(channels + i).
    b. Modify this display() function to alter the address in channels. Always use the expression *channels rather than *(channels + i) to retrieve the correct elements.
    //////////////
    Part a is done.
    Can anyone tell me whats the meaning of part b I am can someone hel how could I modify the display function !
    Thanks
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Have you written the display() function yet? If not then I suggest you do so, then you will be able to modify it according to part b. It may make more sense when you have written the function.

    However I'm not clear what it means by "alter the address in channels". There isn't an address in channels. Does it mean "alter the numbers in channels"?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice