[Solved] Pointer array and structure in C
[ad_1] struct a s1={“Hyderabad”,”Bangalore”}; assigns “Hyderabad” to ch and “Bangalore” to str. printf(“\n%c%c”,s1.ch[0],*s1.str); prints the first character of the strings. Since ch is an array, ch[0] represents its first character. Since str is a character pointer, it points to the first character of a string here. So, *s1.str will have value ‘B’ printf(“\n%s%s”,s1.ch,s1.str); simply prints … Read more