This is a c programming problem i will give a thumbs up if answered correctly thank you!
Posted: Thu May 05, 2022 1:22 pm
This is a c programming problem i will give a thumbs up if
answered correctly thank you!
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;
answered correctly thank you!
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;