typedef _people {    int age;    char name[ 32 ]  ; } People_T ;   People_T  data [ 3 ]; Using string lib function, Assign  30 and Cathy to the first cell,  Assign  40 and John to the second cell  and Assign 50 and Tom to the third cell     People_T *ptr ;  Declare a pointer pointing to the structure data and print the age and name using the pointer.   your output can be :  30 Cathy 40 John 50 Tom

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

typedef _people {

   int age;

   char name[ 32 ]  ;

} People_T ;

 

People_T  data [ 3 ];

Using string lib function, Assign  30 and Cathy to the first cell,  Assign  40 and John to the second cell  and Assign 50 and Tom to the third cell  

 

People_T *ptr ; 

Declare a pointer pointing to the structure data and print the age and name using the pointer.

 

your output can be : 

30 Cathy

40 John

50 Tom

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT