-
Harini replied to the topic Pointers of c programming in the forum C Programming 2 years, 5 months ago
#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: ochar *namePtr;
namePtr = name;
printf(“%c”, *namePtr); // Output: H
printf(“%c”, *(namePtr+1)); // Output: a
printf(“%c”, *(namePtr+7));…[Read more] -
Harini replied to the topic Pointers of c programming in the forum C Programming 2 years, 5 months ago
#include <stdio.h>
int main()
{
int* pc, c;c = 22;
printf(“Address of c: %pn”, &c);
printf(“Value of c: %dnn”, c); // 22pc = &c;
printf(“Address of pointer pc: %pn”, pc);
printf(“Content of pointer pc: %dnn”, *pc); // 22c = 11;
printf(“Address of pointer pc: %pn”, pc);
printf(“Content of pointer pc:…[Read more] -
Harini started the topic Pointers of c programming in the forum C Programming 2 years, 5 months ago
#include <stdio.h>
int main()
{
int* pc, c;c = 22;
printf(“Address of c: %pn”, &c);
printf(“Value of c: %dnn”, c); // 22pc = &c;
printf(“Address of pointer pc: %pn”, pc);
printf(“Content of pointer pc: %dnn”, *pc); // 22c = 11;
printf(“Address of pointer pc: %pn”, pc);
printf(“Content of pointer pc:…[Read more]
