Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Evaluate pointer expressions (40 points) The table below lists a set of C variables, their address, and their values. For each expression below, show
3. Evaluate pointer expressions (40 points) The table below lists a set of C variables, their address, and their values. For each expression below, show what it evaluates to . Assume that an expression evaluating to true always has the value 1 Also, assume that char and int are the same size and both take up one location in LC-3 memory . Also, assume the expressions are evaluated independently without updates . In the case of arrays, the initial values should be interpreted with the same meaning as C array initializers Hint: If a pointer is used to dereference a memory location either using array notation or pointer notation, the resulting type of the expression must match the base type of the pointer, regardless of what might actually be in memory . Variable Base Value(s) int a int b char c int* d int e[10] Address 0xFF00 0xFF01 0xFF02 0xFF03 0xFF04 -20 0xFF00 (1,1,2,3, 5,8,13 ,21,34,0 int** f 0x3104 0xFF03 char str [50] 0x3105 "The wave of the future is technology
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started