C PROGRAMMING Given code: struct record { char name[10]; int age; }; struct record myfriend = {“Dhang”, 24}; struct record *ptrtomyfriend = &myfriend; ANSWER THE FOLLOWING: a. Write a C statement showing how to display the value of first member being pointed by ptrtomyfriend, using ptrtomyfriend. b. Write a C statement showing how to display the value of the second member being pointed by ptrtomyfriend. c. Write a C statement showing how to store new value of the members being pointed by ptrtomyfriend.
C PROGRAMMING Given code: struct record { char name[10]; int age; }; struct record myfriend = {“Dhang”, 24}; struct record *ptrtomyfriend = &myfriend; ANSWER THE FOLLOWING: a. Write a C statement showing how to display the value of first member being pointed by ptrtomyfriend, using ptrtomyfriend. b. Write a C statement showing how to display the value of the second member being pointed by ptrtomyfriend. c. Write a C statement showing how to store new value of the members being pointed by ptrtomyfriend.
Chapter2: Using Data
Section: Chapter Questions
Problem 16RQ
Related questions
Question
C
Given code:
struct record
{
char name[10];
int age;
};
struct record myfriend = {“Dhang”, 24};
struct record *ptrtomyfriend = &myfriend;
ANSWER THE FOLLOWING:
a. Write a C statement showing how to display the value of first member being pointed by ptrtomyfriend, using ptrtomyfriend.
b. Write a C statement showing how to display the value of the second member being pointed by ptrtomyfriend.
c. Write a C statement showing how to store new value of the members being pointed by ptrtomyfriend.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT