Answer:
#include <stdio.h>
typedef struct TimeHrMin_struct //struct
{
int hours;
int minutes;
} TimeHrMin;
struct TimeHrMin_struct SetTime(int hoursVal,int minutesVal) //SetTime function
{
struct TimeHrMin_struct str;
str.hours=hoursVal; //assigning the values
str.minutes=minutesVal;
return str; //returning the struct
}
int main(void)
{
TimeHrMin studentLateness;
int hours;
int minutes;
scanf("%d %d", &hours, &minutes);
studentLateness = SetTime(hours, minutes); //calling the function
printf("The student is %d hours and %d minutes late.\n", studentLateness.hours, studentLateness.minutes);
return 0;
}
Explanation:
The answer would be B. An increase in the price of a complement.
Answer:
Following are the program in the Python Programming language.
#define function
def negative_num(num_list):
#set list type variable
nlist=[]
#set the for loop
for n in num_list:
#check negative numbers
if(n<0):
#add the value of n in list
nlist.append(n)
#return list
return nlist
#set new list type variable that store list
newl=[-5,8,-6,3,-4,9,-7]
#print and call the function
print(negative_num(newl))
<u>Output</u>:
[-5, -6, -4, -7]
Explanation:
Here, we define the function "negative_num" and pass an argument "num_list" in its parameter and inside the function.
- Set new list data type variable "nlist".
- Set the for loop which iterate as the list.
- Set the if conditional statement to check the value of the list is less than 0 then, add that negative values in the variable "nlist".
- Then, return the new list.
Finally, we set a variable "newl" which store the list of negative and positive numbers then, we print and call the function.
Answer:
A. Job growth in digital media has been powerful, while print-based media companies are cutting jobs at record levels.
Explanation:
Digital media is both inexpensive and instant. Based on the art and design, it might be less expensive than print media. Campaigns and content can be created, produced, and maintained far more quickly than printed media. Digital media is dynamic and may create user data. Digital media has had a significant influence on how we obtain our daily news. As it is more easy to read, most individuals choose to acquire their news via phone applications. With the increased usage of digital media as a news source, it is worth considering if print media will become outdated.
Print media has been established for decades, and it evolved as a dominant source of news. In the last decade, an increasing number of print media businesses have expanded out from regular print and begun providing news on digital services. Young millennials, in instance, appear to invest additional time online than reading printed publications.