Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

** Don't need to use in fox machine. 1. Explain the values you got for s1_t and s2_t. Hint: padding. 2. . What is the

image text in transcribed

** Don't need to use in fox machine.

1. Explain the values you got for s1_t and s2_t. Hint: padding.

2. . What is the significance of the difference between s3.vals[0] and s4.vals[0]? Which is faster?

// You must run this on the fox (or hen) machines // gcc -Wall memsice.co/tmpemsize G/tmp/memsize #include #define N 1000 Cypedef struoti cher : long Yi char 2: 31_t; ypedef struoti char int y char 2: 32_ti Cypedef atruoti int valN; 193_t; static void funcl (93_t param) param.valu [0] = 200; static void func2(93_t *param) ( param->vals[0] = 200; . int main(int argc, char *argvil) { 93 t 31 93 t 34; long long k; printf("Size (char) = %ld ", sizeof(char!): printf ("Size (short) - Ald ", sizeof(short)); printf("Size (int) = %ld ", sizeof(int)); printf ("Size (long) Aldin", sizeof(long)) printf("Size (long long) = Sid ", sizeof(k); printf("Size (void *) - $14 ", sizeof (void *); Ald ", sizeof(s1 t)): = $d ", sizeof(32_t)); printf ("Size (31) printf("Size (32_) 33.vals[0] = 100; func1(33): printf("53.val [0] Id ", 33. vals[0]); 34.valg 101 = 100; func2(84); printf("34.vals[0] = 3d ", 54.vals[0]); return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions