C examples for String:char array
Use pointers for strings
#include <stdio.h> int main(void) { const char * mesg = "this is a test!"; const char * copy; /*www . java 2 s. c o m*/ copy = mesg; printf("%s\n", copy); printf("mesg = %s; &mesg = %p; value = %p\n", mesg, &mesg, mesg); printf("copy = %s; © = %p; value = %p\n", copy, ©, copy); return 0; }