R
raashid bhatt
From 5 -6 day i have been learning c pointers i think i have learned
pretty much Please Check me if i am right
char (ptr*)[10]; // Means a pointer to array of 10 chars
char *ptr[10]; // Means array of pointers to chars's
which i can assing the following like this
char str[][10] = {"string1", "string2"};
char (ptr*)[10] = str;
or
char (ptr*)[10] = &str; // Both are Equal
and
char *ptr[10] = {"string1", "string1"};
char *ptr[10];
ptr[0] = "string1";
ptr[1] = "string2";
If i am Wrong Please correct me
pretty much Please Check me if i am right
char (ptr*)[10]; // Means a pointer to array of 10 chars
char *ptr[10]; // Means array of pointers to chars's
which i can assing the following like this
char str[][10] = {"string1", "string2"};
char (ptr*)[10] = str;
or
char (ptr*)[10] = &str; // Both are Equal
and
char *ptr[10] = {"string1", "string1"};
char *ptr[10];
ptr[0] = "string1";
ptr[1] = "string2";
If i am Wrong Please correct me