Answer:int x = 5;
if(x < 5)
cout << "line 1 ";
cout << "line 2";
A. line 1 line 2 B. line 1 C. line 2
D. line 1 E. line 1line 2
line 2
2. What would be output by the following code? _______
int x = 0;
while(x < 5)
{
cout << x << " ";
x++;
}
A. 0 1 2 3 4 5 B. 1 2 3 4 5 C. 0 1 2 3 4
D. 0 E. 0 0 0 0 0
3. After execution of the following code, what will be the value of input_value if the value 3 is entered at the keyboard at run time? ________
cin >> input_value;
if (input_value > 5)
input_value = input_value + 5;
else if (input_value > 2)
input_value = input_value + 10;
else
input_value = input_value + 15;
a. A. 8
b. B. 13
c. C. 18
d. D. 0
e. E. 5
4. What would the user see displayed on the screen after the following lines of code are executed?¬¬________
int i = 6;
if (i == 10)
cout << “value: “ << i;
else
cout << "hmmm";
A. value: i B. value: 10
C. hmmm D. value: ihmmm
E. value: 10
Hmmm
5. What is the output of the following lines of code? ______
for(int i=0; i<4; i++)
cout << (i * 3) << " ";
A. 0 1 2 3 4 B. 0 3 6 9
C. 0 3 6 9 12 D. 0 1 2 3 E. 0 0 0 0
Explanation:
Answer:
Here is c program:
#include<stdio.h>
#include<conio.h>
void main()
{
//Variable declaration
//array to hold 6 values you can change this as needed
float nums[6];
//integer i is for loop variable
int i;
//to hold maximum value
float max=0.0;
//clear screen
clrscr();
//iterate 6 times you can change as per your need
for(i=0;i<6;i++)
{
printf("Enter a number:");
scanf("%f",&nums[i]);
//check if entered value is greater than previous value
//if it is greater then assign it
if(nums[i]>max)
max = nums[i];
}
//print the value
printf("The largest number entered was %f",max);
getch();
}
Explanation:
A combination circuit would be needed for security because if you had a strait circuit if any one of those sensors or the keypad was ripped off the circuit will now let the flow of electricity be possible but with a combination circuit it helps eliminate that problem because even if on flow path is cut off, other paths are still available <span />