GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Tuesday, March 15, 2011

C - strcpy And malloc

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#define N 20

int main()
{
    system("color 2f");

    char *data = malloc(sizeof(char));
    strcpy(data,"Successfull Compliance");
    puts(data);

    char msg[200];
    strcpy(msg, "Indonesia is a nice one");
    puts(msg);

    return 0;
}

Share/Bookmark

No comments:

Post a Comment