// Pantea Aria // characters and strings // declare, initialise, print #include int main(void) { // Which of these is a valid string in C? Why? char name[] = {'J', 'o', 'e', '\0'}; // char name[] = "Joe"; // char name[] = {'J', 'o', 'e'}; //not correct // What will this output? // error name = "Anna"; printf("%s\n", name); //Anna // How many elements are in the array below? 4 // char name[] = "Tom"; // print out name printf("%s\n", name); // or ///int i = 0; //while(name[i] != '\0') { // what is name[i] at the beginning ? 'T' // printf("%c", name[i]); //i++; //} return 0; }