Answer:
A. Install host-based firewalls on all computers that have an email client installed
Explanation:
Since the employee accidentally opened the email that contained malicious content and the computer on the company network got infected, it needs to install host-based firewalls on all computers that have an email client installed on the system. A host-based firewall is a type of firewall installed on individual client or server which controls the incoming and outgoing networking data and identifies whether to allow it or not. The host-based firewall can easily identify and block suspected exploits like viruses, worms or trojan horses.
By installing host-based firewalls on all computers that have an email client installed secures the entire network of computers.
Answer:
The answer is C.
Explanation:
To prevent such thing from happening in the future, the employee/company should Install end-point protection on all computers that access web email
Which statement will call this module and pass 12 as the argument?
Module showValue (Integer quantity)
Answer
a) Call showValue( Integer)
b) Call showValue (12)
c) Call showValue( Integer 12)
d) Call showValue( Real)
Answer:
Call showValue (12)
Explanation:
The function is a block of the statement which performs the special task.
if you define the function, then you have to call that function.
Then, program control moves to the function and start to execute otherwise not execute the function.
the syntax for calling the function:
name(argument_1, argument_2,....);
we can put any number of arguments in the calling.
check the options one by one for finding the answer:
Call showValue( Integer): this is valid calling but it passes the variable, not the 12. this is not correct.
Call showValue( Integer 12): This is not valid calling, because it passes the data type as well which is incorrect.
Call showValue( Real): this is valid calling but it passes the variable, not the 12. this is not correct.
Call showValue (12): this valid calling and also pass the value 12.
Therefore, the correct answer is option b.
Methods used with object instantiations are called ____ methods.
a.
accessor
b.
instance
c.
internal
d.
static
Answer:
b. instance
Explanation:
Methods used with object instantiations are the instance methods. When a class is instantiated we get a reference to the object. Invoking a method on the object , executes the corresponding instance method.
For example:
String s = new String("test");
int len = s.length();
Here length() is an instance method of String object s.
Which of the following is a true statement?
a. Message body in reachable by the main program.
b. Two methods can have the same header.
c. Formal and actual parameters may have the samenames.
d. Local variables are recognized by the mainprogram.
Answer: D. Local variables are recognized by the main program
Explanation: Local variables can be accessed in the function that they are defined within .If you require the variables which should be accessible by every function in a particular program the they should be defined globally in the program . Therefore local variables are recognized by the main program throughout.
Answer:
d. Local variables are recognized by the main program.
Explanation:
Local variables are recognized by the main program, is a true statement.
However, message body in reachable by the main program, two methods can have the same header, and formal and actual parameters may have the same names are NOT true statements.
What to do: please remember to comment each line.
1 Initialize x to be zero
2 Prompt the user for the next operation (Addition or Subtraction)
3 Prompt the user for the next operand (y).
4 Perform the operation (x + y or x – y depends on the operation selected by
the user), and store back the result to x.
5 Output x in decimal.
6 Go back to step 2 until user input “q” as the next operation, then exit.
Answer:
#include <iostream>
using namespace std;
int main()
{
//initialization
float x=0.0;
float y;
char operation;
//print the message
cout<<"Please enter the operation (Addition or Subtraction): ";
cin>>operation;
//loop for enter th operand again until enter 'q'
while(operation != 'q'){
//print the message for operand x
cout<<"\nPlease enter the operand x: ";
cin>>x;
//print the message for operand y
cout<<"\nPlease enter the operand y: ";
cin>>y;
//check for condition for '+' and if true then add the operands
if(operation == '+'){
x=x+y;
}else if(operation == '-'){ //if user enter '-' then subtract the operands
x=x-y;
}
//print the output
cout<<"\nThe output is: "<<x<<endl;
cout<<"\nPlease enter the operation (Addition or Subtraction): ";
cin>>operation;
}
return 0;
}
Explanation:
Create the main function and define the variable x equals zero and declare the variables y and operation.
print the message for the user to enter the operation ('+' or '-') by using the instruction cout.
Store the value in the variable by using the instruction cin.
Then, take the loop to repeat the statement again and again until the condition is true.
print the message inside the loop for asking about the operands from the user.
then, use condition statement for checking the operation and if condition match, then execute the particular operation.
The above operation executes until the user enters not enter the character 'q'.
when the user enters the 'q', the loop terminates and print the output.
. What is an RFC?How it's produced?
Answer: Request for Comments(RFC)is an official document containing methods, behaviors, research, internet specifications, protocols in systems connected to the internet.
RFC are produced by computer scientist , experts in the field of networking, protocols who author them and then send for approval from Internet Engineering Task Force(IETF). After there approval it is then assigned a serial number after which it cannot be modified.
Explanation:
RFC is an official document to propose and bring out new changes in the field of engineering and communication.
Once RFC has been produces it can also bring out modifications in the form of amendments.
Which of the following is the new linecharacter?\r\n\l\b
Answer:
\n
Explanation:
\n is called the new line character.It is used to go to the next line or the start of the new line.\n is used in Linux while in windows uses \r\n called carriage return.But generally \n is used in most of the programming languages also.
The minimum spanning tree of an undirected graph G exists if and only if G is connected. True or False?
Answer: True
Explanation:
The definition of minimum spanning tree(MST) says that the graph must be connected and undirected to be considered for MST. It has (V-1) edges where V is the number of vertices. The minimum spanning tree is implemented using Kruskal's algorithm whereby it starts by considering the minimum weighted edge and covers all the edges upto (V-1) edges. So for MST it has to be connected
C++ programming true or false questions
1. We have a class called animalType. Answer the following questions about clas animalType.
a. Its constructors will be named animalType. (True or False)
b. Return type of its constructors will be void. (True or False)
Answer:
a. True
b. False
Explanation:
Constructor is used to initialize the object of the class.
Rules of constructor:
1. Constructor name must same as the class name. it means, if the class name is animalType, then constructor name must be animalType.
2. Constructor does not have any return type. it means, it does not return anythings.
Therefore, part (a) is true, Constructor name must same as the class name.
and part (b) is false, because constructor does not have any return type.
As it is a good practice that C# broughtback the concept of GOTO statement and Pointer? If your answer isyes then how C# control the worst effect of those features. Pleasebe brief?
Answer:
No for GOTO
Yes for Pointer
Explanation:
GOTO statement
This declaration is used to pass control to the program's marked declaration. The label is the valid identifier and is positioned just before the declaration from which the control is transmitted.
It becomes hard to trace a program's control flow, making it hard to comprehend the program logic. Any program in C language can be written without using a GOTO statement.
Pointers
A C # pointer is nothing but a variable holding another type of memory address. However, in C # pointer only the memory address of the value types and arrays can be declared.
C # supports pointers to a restricted extent. Unlike reference kinds, the default trash collection system does not track pointer kinds. Pointers are not allowed to point to a type of structure containing a type of reference or a type of reference.
During the garbage collection process, the C #garbage collector can move objects in memory as they wish. The C #offers a unique fixed keyword for telling Garbage Collector not to move an item. This implies that the place of the value kinds referred to is fixed in memory. This is called pinning in C #.
The GOTO statement and pointers in C# can simplify some coding tasks but can also make the code harder to read and C# controls these downsides by offering structured programming constructs and by restricting pointer usage to unsafe contexts.
The introduction of the GOTO statement and pointers in C# can be seen both positively and negatively. While the GOTO statement allows for easier navigation and breaking out of control structures, it often results in code that is hard to read and maintain. To mitigate such issues, C# provides structured programming constructs like loops, conditional statements, and methods to manage control flow more effectively.
C# also manages the risks of pointers by requiring explicit permissions and special contexts for their usage, thus limiting their misuse.
Control Mechanisms in C#
Instead of GOTO, use loops (for, while) and conditionals (if, switch) for better readability.Pointers are only allowed in unsafe contexts to highlight potential risks.The methods of the Character class that begin with ____ return a character that has been converted to the stated format.
a.
in
b.
to
c.
is
d.
for
Answer:
most probably the answer is 'to'
What happens when an exception is thrown, but the try statement does not have a catch clause that is capable of catching it?
Answer:
A checked exception indicates something beyond your control has gone wrong. ... If an exception does not have a matching catch clause, the current method terminates and throws the exception to the next higher level. If there is no matching catch clause at any higher level, then the program terminates with an error.
When mathematicians use a two-dimensional array, they often call it a ____.
a.
matrix
b.
grid
c.
net
d.
mesh
Answer:
matrix
Explanation:
The two dimensional array store the value similar to matrix.
Two dimensional array contain row and column similar to matrix.
For example:
int arr[3][3], it means 3 rows and 3 column
and [tex][A]_{3*3}=\left[\begin{array}{ccc}1&2&3\\4&5&6\\7&8&9\end{array}\right][/tex]
and if we want to retrieve the data from array arr[1][2], it means first row and second column.
so, 2 dimensional array is basically a matrix.
Do you think there are some disadvantages to "For Loop"? Or when using it is not good for its program?
Answer:
I think there are no disadvantages of for loop as far as i know.
Since for loop is entry controlled loop (i.e , the condition is checked for entering in the loop body).So when you want to execute the body first in the program for loops are not good fit for this type of conditions.You can use do while loop in these cases which is an exit controlled loop(body is executed first after the condition is checked) .
for example:-Iterating over and printing the circular linked list.
ETL & ELT are thesame.? True? False
Answer:
False.
Explanation:
ETL & ELT are NOT the same.
The _________ is the part of a function definition that shows the function name, return
type, and parameter list.
Answer:
The function prototype is the part of a function definition that shows the function name, return type, and parameter list.
Explanation:-
In general we write a function definition as:
return_type function_name(parameter list) //this is the prototype
{
//function body
}
Final answer:
The term that completes the student's sentence is 'function header' or 'prototype', which includes the function name, return type, and parameters. It is essential for understanding how to use the function and what to expect from it.
Explanation:
The blank in the student's question should be filled with the term function header or prototype. This is the part of a function definition that shows the function name, return type, and parameter list. The function header specifies what the function is called, what type of data it returns, and what arguments it takes. The structure of the function header can vary between programming languages, but generally it includes the function name, followed by parentheses that contain the parameters (or arguments), and prefixed by the return type.
For example, in the function definition of int main(), 'int' is the return type indicating that the function will return an integer value, 'main' is the function name, and the empty parentheses indicate that this function takes no arguments. In another example, a function named 'f' might take three arguments - a, b, and c - and work with them internally to produce a result.
Understanding the function header is crucial for programming because it allows you to know how to properly call the function and what kind of data to expect back from it. Creating clear and concise function headers makes programs easier to read, understand, and debug.
Give at least 5 indicators which help to identify systems andtables as potential de-normalizationcandidates.
Answer and Explanation:
The five indicators are
There is existence of repeating groups which needs to be processed in a single group not individuallymany reports exist which need to be processed onlinetables need to processed in different way by different users at the same time certain columns need very large time for the de normalization take 60% as the alarming numbermany calculations needs to be applied to columns before queries can be answered
What is the
stored program concept?
Answer:
The stored program concept is defined as, in the architecture of computer where computer acts as internal store instruction and it is important because has high flexibility and user does not required to execute the instruction again and again. It is basically works on the principle of Von neumann architecture, as in which the instruction and the data are both same logically and can be used to store in the memory.
with open source operating systems,both the executable code and source code are available:
true or false?
Answer:v True
Explanation: Open source operating system is the system that has source code that can be modified and enhance them . It can also be shared between the public as it is available in the open form . There are many examples of the open source operating system like Linux, Ubuntu etc. which has both executable code and source code as well. so therefore the given statement is true.
__________ refers to the idea that eachemployee should report
to only one manager.
a. Span of control
b. Unity of command principle
c. Emergent leadership
d. Bureaucracy
Answer:
The correct answer is B. Unity of command principle refers to the idea that each employee should report to only one manager.
Explanation:
The Unity of Command Principle is one of the 14 administration principles imposed by Henry Fayol that determines that none of the employees of an organization should receive orders from more than one superior.
That is to say, the principle of the unity of command establishes that no employee should have more than one superior in order to avoid confusing situations and disorders that affect the productivity of the organization in question.
When a method returns an array reference, you include ____ with the return type in the method header.
a.
( )
b.
[ ]
c.
< >
d.
{ }
Answer:
b. []
Explanation:
Arrays are represented using [] . When a method returns an array reference, the method header contains an entry of the type <data-type>[].
For example, a method test which returns a reference to integer array and takes no parameters is of the form:
int[] test();
Similarly a method list_chars which takes a String as an argument and returns an array of chars has the form:
char[] list_chars(String s);
)What is proceduralabstraction, and why is it important inComputer Science
Answer:
Procedural abstraction is a method in which all sub tasks of a whole functionality must be created separately as method and each method/ procedure must be performing a distinct functionality. For example if we want to write a program to calculate and display result of students in class and create separate methods to get students record, to calculate grades to display results is a procedural abstraction approach. Here not only the methods created have distinctive function the administrative can vary the level of abstraction as well.
It is important in computer science for the following ways:
1) Increase the level of code readiness as all separate functionality tasks will have a separate methods.
2) Prevents unauthorized of data.
What are different types of inner classes ?
Answer:
Inner class in Java is basically a class in a class, i.e. a member of another class.
There are 4 types of inner classes in Java.
a) Nested Inner class
b) Method local Inner class
c) Anonymous Inner class
d) Static nested class
The simplest statement you can use to make a decision is the ____ statement.
a.
Boolean
b.
true false
c.
if
d.
this
The simplest statement you can use to make a decision is the if statement. Thus, option C is correct.
What is a statement?A statement within a programming language is just a syntactic construct of an arbitrary programming language that also expresses a course of action. A series of one or more statements make up a program built in this language. There could be internal parts to a proposition.
The simplest illustration of a decision framework in Java seems to be the if statement. A conceptual test that can result in a positive or negative outcome is expressed in an if statement.
The if statements inside the if the branch were carried out if the test's outcome is true. In this case, the statement can either be true or the statement can either be false depending upon the condition.
Therefore, option C is the correct option.
Learn more about statement, here:
https://brainly.com/question/20837448
#SPJ6
Why we need each section of prologprogram?
Answer:
Prolog program are used in the artificial intelligence and the web development in a systematic manner process. As, it is also sometimes known as declarative language which basically consist of some facts and list. Prolog program are divided into the sections that are:
Domain sectionsClauses sectionsPredicates sectionsGoal sectionsWe need each section of the prolog program because all the sections introduced the systematic program and performed there particular functions so by using all these processing steps an efficient function are formed.
Suppose you want to write a program that will read a list of numbers from a user, place them into an array and then compute their average. How large should you make the array?
Answer:
The size of the array is dependent on the amount of memory the program can access.
Explanation:
Here according to the question the user is in need of memory space equal to the amount of numbers read from the list. So the size of the array should be equal to the total numbers read from the list. if the user reads 5 number from the list then the size of the array should be int a[5] if the numbers are integers. Wastage of memory space is not appreciated in a good piece of code.
A class diagram _____.
Answer
provides an overview of a class's data and methods
provides method implementation details
is never used by nonprogrammers because it is too technical
all of the above
Answer:
provides an overview of class's data and methods
Explanation:
Class Diagram is used in software engineering to represent:
- classes
- attributes
- methods
- relationship between classes
It provides a representation of the static layout of the application in object oriented design. It does not provide method implementation details. In fact code skeleton can be automatically generated from class diagram using appropriate UML tools.
Suppose a vector of ints initially has these 8 elements:
6 7 5 9 1 3 2 4
(a) How many swaps will be performed during a selection sort of the elements?
Answer:
Using the Selection Sort algorithm there will be 5 swaps in total within the vector of ints.
Explanation:
A Selection Sort algorithm compares the first value in the vector with the rest of the values and swaps it for the lowest value. It then moves on to the next value in the vector and repeats the process until the whole vector is sorted.
Initial Vector : 6 7 5 9 1 3 2 4
1st Swap : 1 7 5 9 6 3 2 4
2nd Swap: 1 2 5 9 6 3 7 4
3rd Swap : 1 2 3 9 6 5 7 4
4rth Swap: 1 2 3 4 6 5 7 9
5th Swap: 1 2 3 4 5 6 7 9
After the 5th Swap the Vector is completely Sorted.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
Reference variables allow arguments to be passed by ____________.
Answer:
Reference
Explanation:
The Reference type variable is such type of variable in C# that holds the reference of memory address instead of value. Examples for reference type are classes, interfaces, delegates and arrays.
We can pass parameters to the method by reference using ref keyword
It’s mandatory to initialize the variable value before we pass it as an argument to the method in c#
For example,
int x = 10; // Variable need to be initialized
Add(ref x); // method call
If you pass parameters by reference in method definition, any changes made to it affect the other variable in method call.
Here's a sample program:
using System;
namespace ConsoleApplication
{
public class Test
{
public static void Main()
{
int i = 10;
Console.WriteLine("i=" + i);
Add(ref i);
Console.WriteLine("i=" + i);
Console.ReadLine();
}
public static void Add( ref int j)
{
j = j + 10;
Console.WriteLine("j="+j);
}
}
}
Output:
i=10
j=20
i=20
In java, Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space. Example output for userNum = 20:
Answer:
while(userNum > 1){
userNum = userNum /2;
System.out.print(userNum+" ");
}
Explanation:
Probably don't need the print statement, but it doesn't cause an error.
This solution uses a while loop in Java to repeatedly divide a number by 2 and print the result until the number is less than 1. The example code and explanation illustrate the process clearly.
To solve this problem, you need to write a while loop in Java. This loop will continue dividing the given number by 2 until it reaches 1. Here's the step-by-step solution:
Example Code:
import java.util.Scanner;In this code:
We initialize userNum with a value (20 in this example).The while loop continues as long as userNum is greater than or equal to 1.In each iteration, we print userNum followed by a space and then divide it by 2 using integer division.The output for userNum = 20 will be: 20 10 5 2 1 .
Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The first integer indicates how many numbers are in the list. Assume that the list will always contain less than 20 integers. Ex: If the input is:
Answer:
integers=[]
while True:
number=int(input())
if number<0:
break
integers.append(number)
print("",min(integers))
print("",max(integers))
Explanation: