Question: Variables and Memory Use Reminder: Assume a TM4C123 is being used unless specified otherwise. For each declaration, indicate how many bytes will be allocated in
Variables and Memory Use
Reminder: Assume a TM4C123 is being used unless specified otherwise.
- For each declaration, indicate how many bytes will be allocated in memory
i)long input_num2;
ii)int sensor_readings[10];
iii)unsigned short scan_data[20][40];
- For each, indicate the value of my_length after executing each fragment of C code. Function strlen is a standard C library function. Specify N/A if the value of my_length cannot be determined.
i) my_length is .
char msg[] = CPRE288;
int my_length = 0xFFFFFFFF;
my_length = strlen(msg);
ii) my_length is .
char msg[7] = CPRE288;
int my_length = 0xFFFFFFFF;
my_length = strlen(msg);
iii) my_length is .
char msg[100] = {C,P,R,E,,2,8,8,};
int my_length = 0xFFFFFFFF;
my_length = strlen(msg);
iv) my_length is .
char msg[] = {5, 7, 10, 0, 9, 2, 0, 3, 5, 77, 23};
int my_length = 0xFFFFFFFF;
my_length = strlen(msg + 4);
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
