Answer:
Following are the function to the given question:
void same_quantity_inventory(inventory *arr, int size)//defining a method same_quantity_inventory that takes two parameters
{
inventory *p = arr;//defining a pointer variable that holds array value
while (p < arr + size)//defining while loop that checks pointer value less than arr and its size
{
if (p->endQty == p->beginQty)//use pointer to check array start and end value
printf("name: %s, start quantity: %d, end quantity: %d\n", p->name, p->beginQty, p->endQty);//print value
p++;//incrementing pointer value
}
}
Explanation:
In the given code a method "same_quantity_inventory" takes two parameters that are "arr and size". In the next step, a pointer variable "p" is declared that holds the "arr" value. It defines the while loop that checks pointer value less than arr and its size inside the loop and if block is declared that use pointer to check array start and end value, and prints its calculated value.
Answer:
Option b (Port 22) seems to the appropriate choice.
Explanation:
<u>Below seem to be some measure you should take to correct this mistake.</u>
- Verify whether Droplet's host IP address seems to be right.
- Verify existing connection supports communication over all the utilized SSH port. Any access points can be able to block port 22 and sometimes customized SSH. For illustration, you could do this by checking different hosts who used the same port, using only a recognized working SSH connection. These could help you identify unless the current problem is not particular to clients' Droplet.
- Authenticate the Droplet configuration settings. Verify that they're not being configured to DROP 's preferred policy, and do not apply the port to require connectivity.
The SSH server also operates on port 22, by default.
Other choices don't apply to the specified scenario. So that the argument presented above will be appropriate.
Answer: Amazon Aurora
Explanation:
Amazon Aurora is a fully managed service which is vital in saving time through the automation of time consuming tasks like recovery, backup, provisioning, patching, repair, and failure detection.
Amazon Aurora also allows the encryption of databases through the use of keys that are managed through the AWS Key Management Service. Therefore, based on the information given the question, type of database service that the Architect should use is Amazon Aurora.
Answer:
#include <stdio.h>
int main()
{
int avg = 0;
int sum =0;
int x=0;
/* Array- declaration – length 4*/
int num[4];
/* We are using a for loop to traverse through the array
* while storing the entered values in the array
*/
for (x=0; x<4;x++)
{
printf("Enter number %d \n", (x+1));
scanf("%d", &num[x]);
}
for (x=0; x<4;x++)
{
sum = sum+num[x];
}
avg = sum/4;
printf("Average of entered number is: %d", avg);
return 0;
}
Answer:
In Python:
def count_over_100(mylist):
kount = 0
for i in range(len(mylist)):
if mylist[i] > 100:
kount+=1
return kount
Explanation:
This defines the function
def count_over_100(mylist):
(1) This initializes kount to 0
kount = 0
(2) This iterates through the loop
for i in range(len(mylist)):
If current list element is greater tha 100, kount is incremented by 1
<em> if mylist[i] > 100:</em>
<em> kount+=1</em>
This returns kount
return kount