Answer:
The answers to 1st question and part 2A is given. However, the 2B is not given complete and thus cannot be answered.
Explanation:
UNION is a keyword used in C Language to have a commonly shared memory that can be used by multiple elements. It is a data-type that allows different data types to use the same shared memory location.
Importance: If you want to minimize the use of memory by sharing it between different datatype variables, then use UNION. For Ex. Let's suppose I want to use 2 variables a and b of type char and int respectively. Now, suppose int takes memory space of 2 bytes and char takes 1 byte then the total amount of memory needed = 2 + 1 = 3 Bytes. But, we want to first make use of a, and once done, we want to declare variable b. We can limit the memory use by declaring a memory space of 2 bytes (max of a and b). First, we can use this space to store the int variable and when done with it, we can use it to store the char variable.
PART 2A
typedef struct{
int partNum;
char partName[25];
} partin;
#define Partin partin
A projector would make his presentation bigger.<span />
Answer: or element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation
form form_id Specifies which form the output element belongs to
name name Specifies a name for the output element
Explanation:
Answer:
#include <iostream>
using namespace std;
int main() {
int currentYear = 2020;
int myCurrentAge = 23;
int myNewAge=myCurrentAge+(2050-currentYear);
cout << "My Current Age is " << myCurrentAge << endl;
cout << "I will be " << myNewAge << " in 2050." << endl;
}
Explanation:
- Initialize the currentYear with 2020 and myCurrentAge with 23.
- Add myCurrentAge with the the result of (2015 - currentYear) and assign this result to myNewAge variable.
- Finally display my current age and after that display the new age in 2050.
Output:
My Current Age is 23
I will be 53 in 2050.
Answer:
Written in Python
import math
degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))
degreesC = round(5 * (degreesF - 32)/9,1)
print(degreesC)
Explanation:
The following header allows you to use Math.Round() method in Python
import math
The following prompts the user for temperature in degrees Fahrenheit
degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))
The following calculates the degree Celsius equivalent and also round it up
degreesC = round(5 * (degreesF - 32)/9,1)
The following prints the degree Celsius equivalent
print(degreesC)