Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

the last printf("%s",*title[5]); command isn't working,why?

Shikha SinghShikha Singh bhopalMember Posts: 2
edited March 14 in C and C++

****#include<stdio.h>
int main()
{
char title[]={"tale of 2 cities","wuthering heights","don quixote","odyssey","moby dick","hamlet","gulliver travel"};
charbestbooks[3];
char
englishbooks[4];
bestbooks[0]=&title[0];
bestbooks[1]=&title[3];
bestbooks[2]=&title[5];
englishbooks[0]=&title[0];
englishbooks[1]=&title[1];
englishbooks[2]=&title[5];
englishbooks[3]=&title[6];
printf("%s\n",
englishbooks[2]);
englishbooks[2]="changed";
printf("%s\n",
englishbooks[2]);
printf("%s",*title[5]);
return 0;
}

Tagged:
Sign In or Register to comment.