The below code will help you to solve the given problem and you can execute and cross verify with sample input and output.
#include<stdio.h>
#include<string.h>
int* uniqueValue(int input1,int input2[])
{
int left, current;
static int arr[4] = {0};
int i = 0;
for(i=0;i<input1;i++)
{
current = input2[i];
left = 0;
if(current > 0)
left = arr[(current-1)];
if(left == 0 && arr[current] == 0)
{
arr[current] = input1-current;
}
else
{
for(int j=(i+1);j<input1;j++)
{
if(arr[j] == 0)
{
left = arr[(j-1)];
arr[j] = left - 1;
}
}
}
}
return arr;
}
Answer:
True.
Explanation:
An expression containing the && and operator is only true if both of the operands present in the expression are true otherwise it will give the result as false if either one of them is false or both of them are false.In the question it states that the expression in true either or both of it's operand are true.
Hence the answer is true.
Answer:
I. hatching
II. filter
Explanation:
Sarah is creating an image. She wants to achieve tonal effects with parallel lines by varying their densities and distribution patterns. She will use <u>hatching</u> to do this. She also wants to add special effects on the image. Therefore, she will use <u>filters</u>.
Hatching refers to an art technique in which parallel lines are used to shade by drawing them closely together.
Stippling is an art technique used in the making of patterns by using small dots.
Filters is a technique of changing image characteristics. It is used to change the picture characteristics & to add special effects to an image such as the shade, contrast, tone, brightness etc.
We therefore see that, <u>hatching</u> and <u>filter</u> are the correct answers respectively
Answer: setJMenubar
Explanation:Menus that are component of the Menu bar that display the options and tools for any function that can be performed in the system have the connection with the window in the field of java through the command of the setJMenubar. It is the command which is given to execute to bring the menu to the particular frame and get it attached according to the JFrame. Therefore, the correct option is setJMenubar.