[ create a new paste ] login | about

Link: http://codepad.org/0VfE9GoD    [ raw code | output | fork ]

kamarakay2000 - C, pasted on Jul 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
int main()
{
    int array[]={11, 13, 17 ,19};
    int x;
    int *aptr;
    aptr = array;
    aptr = aptr+2;
    *aptr = 0;
    for(x=0; x<4; x++)
    {
       printf("Element %d: %d\n", x+1,array[x]);
      // aptr++;
    }
    return(0);
}


Output:
1
2
3
4
Element 1: 11
Element 2: 13
Element 3: 0
Element 4: 19


Create a new paste based on this one


Comments: