Question 6 (6 points) struct S { char a; double b; char *c; char d[20]; int e; char f; short *g; short h; float *i; } my_struct; What is the size of the above structure (in bytes)? A Rearrange the above structure to preserve the memory. What is the optimal size of the new structure (in bytes)? A/

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question
Question 6 (6 points)
struct S {
char a;
double b;
char *c;
char d[20];
int e;
char f;
short *g;
short h;
float *i;
} my_struct;
What is the size of the above structure (in bytes)?
A
Rearrange the above structure to preserve the memory. What is the optimal size of
the new structure (in bytes)?
A/
Transcribed Image Text:Question 6 (6 points) struct S { char a; double b; char *c; char d[20]; int e; char f; short *g; short h; float *i; } my_struct; What is the size of the above structure (in bytes)? A Rearrange the above structure to preserve the memory. What is the optimal size of the new structure (in bytes)? A/
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 1 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr