C Pointers to struct

  1. Declare a struct named "Person" with members "name" and "age".
  2. Declare a pointer variable "ptrPerson" of type "struct Person".
  3. Allocate memory for "ptrPerson" using the "malloc" function and the "sizeof" operator.
  4. Assign values to the members of the "Person" struct using the arrow operator "->" through the pointer "ptrPerson".
  5. Access and print the values of the "name" and "age" members using the pointer "ptrPerson" and the arrow operator "->".
  6. Deallocate the memory allocated for "ptrPerson" using the "free" function.