Using the code below (IGNORE ALL COMPILE ERRORS) and assume an int = 2 bytes, fl
ID: 3563532 • Letter: U
Question
Using the code below (IGNORE ALL COMPILE ERRORS) and assume an int = 2 bytes, float= 4 bytes, char = 1 byte, pointer = 4 bytes
a. #include <stdio.h>
b. struct rec
c. {
d. int i;
e. float f;
f. char c;
g. }
h. int main()
k. {
m. struct XXXXXX *p;
p. p=(struct rec *) malloc (2 * sizeof(struct rec));
q. if ( p == NULL ) return 1;
r. (*p).i=10;
s. (*p).f=3.14;
t. (*p).c='a';
u. printf("%d %f %c ",p->i,p->f,p->c);
v. YYYYYYY
x. return 0;
z. }
1.What should the XXXXXX on line
Explanation / Answer
Using the code below (IGNORE ALL COMPILE ERRORS) and assume an int = 2 bytes, float= 4 bytes, char = 1 byte, pointer = 4 bytes
a. #include <stdio.h>
b. struct rec
c. {
d. int i;
e. float f;
f. char c;
g. }
h. int main()
k. {
m. struct XXXXXX *p;
p. p=(struct rec *) malloc (2 * sizeof(struct rec));
q. if ( p == NULL ) return 1;
r. (*p).i=10;
s. (*p).f=3.14;
t. (*p).c='a';
u. printf("%d %f %c ",p->i,p->f,p->c);
v. YYYYYYY
x. return 0;
z. }
1.What should the XXXXXX on line
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.