Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In answering below questions, assume the sizes of tvpes are as mentioned here: char l byte, short 2 bytes, int 4 bytes, unsigned int 4

In answering below questions, assume the sizes of tvpes are as mentioned here: char l byte, short 2 bytes, int 4 bytes,
unsigned int 4 bytes, loat 4 bytes, long 8 bytes, double & bytes, and 8 bytes for a pointer. You must mention the function
prototype when defning any function.
Write the output fromn the below code:
int main (void) f
double z [3][4]={{1,4,7,10},(2,5,8,11},{3,6,9,12}}i
void *zaddr =(void*) &z;
return 0: }
printf ("a: %ld,%1d,%ld \a",((void*) &z [1]-zaddr),((void*) &z [0)[1]-zaddr));
printf ("b: %1d,%ld,%ld
",((void*)(&z [0]+1)-zaddr ),
(2)(3 points)
(3)(3 points)
Assuming the address of the first byte of z is Ox754c0, fll in the guestion marks and list the output:
int main (vo id)
Write the output from the below code:
1I you nnd uny
((void*) z [1]-zaddr),
double z [3][4]={{1,4,7,10},(2,5,8,11),(3,6,9,12)};
printf ("a: %?,%?
",**z [0]+(2*sizeof (z [0])), &z [2][0]+(1*sizeof (z [2][0])));
printf ("c: %?,%?,%?
",*(z +2),*(*(z+2)+1),*(z +2)+2);
int main (void)
double d [3]=(57,89,102};
double *p [3]={&d[1], &d[1], printf ("a: %1f,%1f,%1f
",
printf ("b: %1f,%1f,%1f
",
return 0: }
1
&d[1]}:
R. Inkulu
*p[1]++,*--p [2],*(p [o]++));
*p [0],*p[1J,*p [2]);
Roll Number:
((void *)(z+1)-zaddr),((void *)(&z+1)-zaddr));

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

More Books

Students also viewed these Databases questions

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago