[ create a new paste ] login | about

Link: http://codepad.org/sweH1pVh    [ raw code | output | fork | 1 comment ]

godneil - C, pasted on Aug 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
# include <stdio.h>
int main(void)
{
    char string[] = "jesus is love";
    char *pointer = string;
    *pointer = 'J';

    printf("God is love %c \n", *pointer);
    printf("God is love %s", pointer);
    
    return 0;

}


Output:
1
2
God is love J 
God is love Jesus is love


Create a new paste based on this one


Comments:
posted by godneil on Aug 22
Changing items in an Array using a pointer
reply