[ create a new paste ] login | about

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

C, pasted on Aug 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdlib.h>
#include <string.h>
struct Hash
{
        char *pointname;
};
 
int main()
{
    char buff[10] = "FIRST";
    int a = 0;
    struct Hash hashes[10];
    hashes[a].pointname = NULL;
    hashes[a].pointname = buff;
    printf("%s\n",hashes[a].pointname);
    hashes[a].pointname[2] = '!';
    printf("%s\n",buff);
    return 0;
}


Output:
1
2
FIRST
FI!ST


Create a new paste based on this one


Comments: