@harini Active 2 years, 5 months ago 10 Reputation ActivityProfileGroups 0Forums Topics StartedReplies CreatedEngagementsFavorites Search replies: Forum Replies Created Viewing 2 posts - 1 through 2 (of 2 total) Author Posts May 28, 2023 at 3:14 pm #23418 HariniParticipant #include <stdio.h> int main(void) { char name[] = “Harry Potter”; printf(“%c”, *name); // Output: H printf(“%c”, *(name+1)); // Output: a printf(“%c”, *(name+7)); // Output: o char *namePtr; namePtr = name; printf(“%c”, *namePtr); // Output: H printf(“%c”, *(namePtr+1)); // Output: a printf(“%c”, *(namePtr+7)); // Output: o } May 28, 2023 at 3:05 pm #23417 HariniParticipant #include <stdio.h> int main() { int* pc, c; c = 22; printf(“Address of c: %p\n”, &c); printf(“Value of c: %d\n\n”, c); // 22 pc = &c; printf(“Address of pointer pc: %p\n”, pc); printf(“Content of pointer pc: %d\n\n”, *pc); // 22 c = 11; printf(“Address of pointer pc: %p\n”, pc); printf(“Content of pointer pc: %d\n\n”, *pc); // 11 *pc = 2; printf(“Address of c: %p\n”, &c); printf(“Value of c: %d\n\n”, c); // 2 return 0; } Author Posts Viewing 2 posts - 1 through 2 (of 2 total)