support@w4writers.com +44 7743 307695
May 02, 2023

Answer:

  1. A software engineer needs a variable to hold whole numbers in a range from -16000 to +34000. which is the most memory efficient data type to use? 

A Long data type that holds 4 bytes will be used since it has a range from -2,147,483,648 to 2,147,483,647. We could not use an int because it has a range from -32,768 to 32,767 on the Arduino board and as such the value +34000 falls out of this range and disqualifies use of int data type. 

  1. A programmer wants to store numbers with a decimal component in a variable. State two valid ways they could declare the variable. 

They would use a float data type for decimal components that lie within the range of 3.4028235E+38 and -3.4028235E+38. Otherwise, use a double data type which on the Arduino Uno is identical to the float variable. 

  1. A software engineer needs a variable to hold whole numbers in a range from 350 to 34000. Which is the most memory efficient data type to use ? 

An unsigned int would be most appropriate since they store a 2 byte value ranging from 0 to 65,535 and our given values lie in that range. 

  1. Specify, with a full and reasonable description of the code, a good way to store the name and runtime of a cinema film in a variable.

There is the use of the “*” after “char*” that indicates an array of “pointers”. 

First store the components in a 2 Dimensional array in which you can have any number of rows according to the number of films you want to store. And in this case I am storing 3 films. In the for loop use a byte as it consumes the least memory. Then use a nested for loop to display the matrix row wise in the serial output. 

Recent Post

Order this Assignment now

Total: GBP120

fables template