1. Look at the following C code snippet: struct person ( struct { } b; union { float height, weight; int age; char name;

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

1. Look at the following C code snippet: struct person ( struct { } b; union { float height, weight; int age; char name;

Post by answerhappygod »

1 Look At The Following C Code Snippet Struct Person Struct B Union Float Height Weight Int Age Char Name 1
1 Look At The Following C Code Snippet Struct Person Struct B Union Float Height Weight Int Age Char Name 1 (29.11 KiB) Viewed 50 times
1. Look at the following C code snippet: struct person ( struct { } b; union { float height, weight; int age; char name; struct { int grade, room; } teacher; float gpa; } u; enum (TCHR, STDNT} kind; Given the code above, indicate whether each of the following statements are legal or illegal. a. [4 pts] p. kind = STDNT; b. [4 pts] p.u.teacher.room= 108; c. [4 pts] p.height = 50; d. [4 pts] p.b.name = "Jones"; e. [4 pts] p.u.gpa = 3.14;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply