Answer:
Business Central query objects enable you to retrieve records from one or more tables and then combine the data into rows and columns in a single dataset. Query objects can also perform calculations on data, such finding the sum or average of all values in a column of the dataset.
Answer:
a=[23,6,78,36,3,250,127,210,-5]
i = len(a) # calculate length
j = min(a) # calculate minimun
k = sum(a) # calculate sum
l= sum(a)/len(a) # calculate mean
print(i)
print(j)
print(k)
print(l)
z = 0.0
i=0
x=[23,6,78,36,3,250,127,210,-5]
y = int(l)
while x[i] < y:
z= int(x[i]/y)
print(z)
x[i] = x[i] - y
z=z+1
i=i+1
Explanation:
So above we have calculated Count, minimum, sum and mean/average. Also we did a simple division and printed quotient.
Answer:
This is the complete correct program:
#include <stdio.h>
#include<sys/types.h>
#include<unistd.h>
int value = 128;
int main()
{
pid_t pid;
pid=fork();
if (pid==0) /* child process */
{
value +=8;
return 0; }
else if (pid > 0) {/* parent process */
wait (NULL);
printf ("PARENT: value =%d\n" ,value); /* LINEA */
return 0;
}
}
The output of the LINE A is:
PARENT: value = 128
Explanation:
The fork() function used in the program creates a new process and this process is the child process. The child process is same as the original process having its own address space or memory.
In the child process the value of pid is 0. So the if condition checks if pid==0. Then the child process adds 8 to the value of its variable according to the following statement
value +=8;
Now the original process has value = 128. In else if part the parents process has the value of pid greater than zero and this portion of the program is of the parent process :
else if (pid > 0)
{ wait (NULL);
printf ("PARENT: value =%d\n" ,value);
return 0; }
So the value 128 is printed at the end in the output.
wait(NULL) is used to wait for the child process to terminate so the parent process waits untill child process completes.
So the conclusion is that even if the value of the variable pid is changed in the child process but it will not affect the value in the variable of the parent process.
<span>GUI is a graphical user interface. It is a graphical window that provides interaction with the user.
</span>The button is a pushbutton, which can be pressed to trigger an action.<span>
A graphic control component or a control element is a component that provides a button control in a GUI application. It is also called a control element because it </span><span>is an element of interaction between the user controlling the application.</span>