help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aitzaz
    New Member
    • Oct 2006
    • 2

    help

    sir,
    plz send me the solution of this program.

    Question

    Create a program that declares an integer array with five elements. Now store in that integer array five different elements (10,20,30,40,50 ) using a pointer variable only.

    Hints

    The identifier of an array is equivalent to the address of its first element, as a pointer is equivalent to the address of the first element that it points to.

    If A[5] is an array then the expressions A[2] and *(A+2) designate the same thing. Use (*A+2) to store the value in the third element of array.
  • Jai Vrat Singh
    New Member
    • Oct 2006
    • 18

    #2
    Take hint from this post http://www.thescripts.com/forum/thread556816.html

    Comment

    Working...