[ create a new paste ] login | about

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

C++, pasted on Jul 6:
1
2
3
4
5
6
7
8
9
int main()
{    
    //C-style 5b (C-style 2 and 3 and 4 variation)
    char* a= (char*)malloc(6*sizeof(char));
    strncpy(a, "Adeus", 6); //six character to copy also the terminator
    cout << a << endl;
      
    return 0;
}


Output:
1
Adeus


Create a new paste based on this one


Comments: