Answer and Explanation:
The tools that are used in the network investigation process by the forensic departments in order to get better results while dealing with cyber crimes:
Some of the analysis tools are:
Tools for file analysisTools for Internet AnalysisEmail and Registry Analysis toolsDatabase and Network Forensic toolstools for analysis of mobile devices.File viewersTools for mac Operating system analysis.Tools to capture datafirewallsEncryption of networkLike in encryption of the data is encoded by cryptographic codes at the transmitting end and then decoded at the receiving end securely.
. A collection of programs designed to create and manage databases is called a(n))
Answer:
Database Management System.
Explanation:
Database Management System is the collection of programs and data used to create ,define and manipulate the database.
There are several database management systems present and some of them are as following:-
RDBMS (Relational Database Management System)No SQL DBMSCDBMS(Columnar Database Management System).IMDBMS(In-Memory Database Management System).Discuss the purpose of Javadoc.
Answer: Javadoc is type of tool that is used for reading the comments that are formatted in Java source code. It helps in the production of the Java code documentation from these java codes in the HTML(hyper test markup language).
The purpose it serves is changing the API documents into the HTML code documentation or HTML web pages.This service is used while programming takes place.
. How do you find and remove files whose names contain embedded spaces? What would the Linux command(s) be?
Answer:
The Linux command is find.
Explanation:
The Linux command find suffices for finding and removing files whose names contain embedded spaces.
The command find supports tests of different kinds and predefined (and user-defined) actions in conjunction like that one looking for files with embedded spaces and then delete them.
We can achieve this using the following piece of code (as example):
find . -regex '.* +.*' -delete
The command find will look for files in the current working directory ( . ), execute the test -regex, to evaluate files in the current directory using the case-sensitive regular expression test (regex) (it could be also -iregex) that evaluates those files having names with one or more embedded spaces ( +) between zero or more characters before (.*) and after (.*) of these embedded space(s) ( +).
Look carefully that one or more embedded spaces is (are) represented in regular expressions using a space before the metacharacter (+), and characters are represented using the metacharacter (.) before (*), that is, (.*)
In other words, the quantifier (+) represents one or more occurrences (or matches) and quantifier metacharacter (*) zero or more times cases for that evaluation.
So, after testing all files available in the current directory with -regex test, find will execute the action -delete for all files matching the result of such an evaluation (and finally obtaining what we are looking for).
The command find has several other tests (-name, -iname, -ctime, and many more) that can be used with logical operators (-and, -or, -not), some predefined actions like -delete (aforementioned), -ls (list), -print and -quit, and also offers possibilities for user-defined actions, as mentioned before.
What are the uses of the tracrt and ping commands and what information is provided by each.
Answer:
The ping command is used to test the ability of a source computer to reach a specified destination computer. This command is used to verify if the sender computer can communicate with another computer or network device in the network.
The tracert command is used to show the details about the path sending a packet from the computer to whatever destination you specify.
As the screen’s size and resolution change, the _______________ property for a control automatically resizes the control.
Answer: Anchoring
Explanation: Anchoring is the property that helps in the controlling of resizing , position and maintaining the distance control. Anchor control will get activated when the screen of the system starts to change the resolution or the size of the screen.
The anchor control gets into action for the controlling the position in the vertical or horizontal direction or bottom of the form, distance managing according to the edges etc.
Create an array from 0 to 10 by steps of 0.5
Answer:
#here is code in python
#import numpy library
import numpy as np
#create an array from 0 to 10 by steps of 0.5
ar=np.arange(0,10.5,0.5)
#print the array
print(ar)
Explanation:
Import the numpy library as alias "np".Then np.arange() function will call with three parameter to create an array.Here first parameter is start and goes till second parameter -increment.Here 3rd parameter is increment.It will create the array and assign it to "ar".Print the array.
Output:
[ 0. 0.5 1. 1.5 2. 2.5 3. 3.5 4. 4.5 5.
5.5 6. 6.5 7. 7.5 8. 8.5 9. 9.5 10. ]
how to determine if f(x)= -3x+4 from real numbers to real numbers is injective, surjective, or bijective
Answer:
The function is injective.
The function is surjective.
The function is bijective.
Explanation:
A function f(x) is injective if, and only if, a = b when f(a) = f(b).
So:
[tex]f(x) = -3x + 4[/tex]
[tex]f(a) = f(b)[/tex]
[tex]-3a + 4 = -3b + 4[/tex]
[tex]-3a = -3b[/tex] *(-1)
[tex]3a = 3b[/tex]
[tex]a = \frac{3b}{3}[/tex]
[tex]a = b[/tex]
Since [tex]f(a) = f(b)[/tex] if, and only if, [tex]a = b[/tex], the function is injective.
A function f(x) is surjective, if, and only if, for each value of y, there is a value of x such that f(x) = y.
Here we have:
[tex]f(x) = y[/tex]
[tex]y = -3x + 4[/tex]
[tex]3x = 4-y[/tex]
[tex]x = \frac{4 - y}{3}[/tex]
The domain of x is the real numbers, which means that for each value of y, there is a value of x such that [tex]f(x) = y[/tex]. So, the function is surjective.
A function f(x) is bijective when it is both injective and surjective. So this function is bijective.
The if/else if statement is actually a form of the __________ if statement.
Answer:
The answer to this question is "nested".
Explanation:
The answer to this question is nested because, In programming languages, there is a concept of nested if-else statement. In nested if-else statement placing if statement inside another IF Statement that is known as nested If in C Programming.
Example of nested if can be given as
#include <stdio.h>
int main()
{
int a,b,c;
printf("Enter 3 number\n");
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
if(a>b)
{
if(a>c)
{
printf("A is greater: %d",a);
}
}
else
{
if(b>c)
{
printf("B is greater: %d",b);
}
else
{
printf("C is greater: %d",c);
}
}
return 0;
}
output:
Enter 3 number
4
7
9
c is greater: 9
Implements the sequential search method that takes and array of integers and the item to be search as parameters and returns true if the item to be searched in the array, return false otherwise
Answer:
// here is code in java.
import java.util.*;
// class definition
class Solution
{
// function to perform sequential search
public static boolean item_search(int [] arr,int k)
{
boolean flag=false;
for(int a=0;a<arr.length;a++)
{
// if item found then return true,else false
if (arr[a]==k)
{
flag=true;
break;
}
}
return flag;
}
// main method of the classs
public static void main (String[] args) throws java.lang.Exception
{
try{
// variables
int size,item;
// scanner object to read input from user
Scanner scr=new Scanner(System.in);
//ask user to enter size
System.out.println("size of array:");
// read the size of array
size=scr.nextInt();
// create an array of given size
int inp_arr[]=new int[size];
System.out.println("enter the elements of array:");
// read the elements of the array
for(int x=0;x<size;x++)
{
inp_arr[x]=scr.nextInt();
}
System.out.println("enter the item to search:");
// read the item to be searched
item=scr.nextInt();
// call the function with array and item as arguments
System.out.println(item_search(inp_arr,item));
}catch(Exception ex){
return;}
}
}
Explanation:
Read the size of array.Then create an array of the given size.Read the elements of the array.Then read the item to be searched.Call the method item_search() with array and item as arguments.Here check all the elements, whether the item is equal to any of the element of array or not.If any element is equal to item then method will return true otherwise return false.
Output:
size of array:5
enter the elements of array:3 6 1 8 9
enter the item to search:8
true
You get an error when trying to insert a record into a table from a Python script. A possible reason for this could be:
a
Malformed insert statement
b
Failure to connect to the database
c
No permission to insert into the table
d
All of these
Answer:
d) All of these.
Explanation:
When we get an error in inserting a record in table using python script.There could be several reason for that which are as following:-
The insert statement in python can be not well formed.You don't have the permission to insert data in the table.Python is not able to connect to the database.So all of the above written reasons are mentioned in the question hence the answer is option d.
Which of the following is not a command for determining if MySQL is running on Linux (Ubuntu)?
(a) sudo service mysql status
(b) ps -ef | grep 'mysql'
(c) sudo check status mysql
(d) sudo systemctl status mysql
Answer:
(c) sudo check status mysql
Explanation:
The commands service, ps and systemctl, are different ways to find out if MySQL is running on Linux (Ubuntu), but there is not such a command called check to do so in Linux.
Different programs in Linux operating system are organized in processes, and they are all created for a specific purpose: running an application, starting a web browser, and so on.
Some other programs like the init program start and stop essential service processes and there are currently two major implementations in Linux distributions:
System V init (traditional implementation)systemd (emerging standard for init).The commands service and systemctl are related to System V init and systemd, respectively, and can list the status of a program.
Thus, the command service can list if MySQL is running on Linux using the piece of code in the question: sudo service mysql status.
Likewise, the command systemctl can activate and deactivate services, and, among many other functionalities, list the status of a program (like the one in the question: systemctl status mysql).
The command ps (process status) "displays information about a selection of the active processes" [ps man page]. The command has many options, and some are -e (select all processes) and -f (full-format listing). In this case, the command output is piped to grep (global regular expression print) command to find those processes mainly related to 'mysql'.
It is important to remember that command sudo (superuser do) permits a user to "execute a command as the superuser or another user" [sudo man page], since commands service and systemctl require privileges to be run, for security reasons.
Write a complete Java program called Stewie2 that prints the following output. Use at least one static method besides main. ////////////////////// || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! ||
Answer:
// here is code in java.
import java.util.*;
// class definition
class Solution
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// declare and initialize string pattern
String patt1="//////////////////////";
// declare and initialize string pattern
String patt2="|| Victory is mine! ||";
// both patterns are printed alternatively
for(int x=0;x<10;x++)
{
// first print pattern 1
if(x%2==0)
System.out.println(patt1);
// then print second pattern
else
System.out.println(patt2);
}
}catch(Exception ex){
return;}
}
}
Explanation:
Declare and initialize two strings patterns.As there are first pattern on every even line and second pattern on odd line. Run the loop for 10 time and print the pattern based on the position of lines.
Output:
//////////////////////
|| Victory is mine! ||
//////////////////////
|| Victory is mine! ||
//////////////////////
|| Victory is mine! ||
//////////////////////
|| Victory is mine! ||
//////////////////////
|| Victory is mine! ||
Due Friday by 11:59pm Points 100 Submitting a file upload Available after Aug 31 at 12am Challenge: Object Position Calculation Description: Write a Python 3 program called objectposncalc.py that accepts user input from the keyboard for the initial position, initial velocity, acceleration, and time that has passed and outputs the final position based on an equation provided in the requirements. Purpose: Provide experience with writing an interactiv
Answer:
#here is code in python.
#main method
def main():
#read the initial position
in_pos=float(input("enter the initial position:"))
#read the initial velocity
in_vel=float(input("enter the initial velocity:"))
#read the acceleration
acc=float(input("enter the acceleration:"))
#read time
time=float(input("enter the time:"))
# final position =x+ut+(at^2)/2
fin_pos=in_pos+(in_vel*time)+(acc*(time**2)/2)
#print the final position
print("final position is: ",fin_pos)
#call the main method
main()
Explanation:
Read the initial position, initial velocity, acceleration and time from user.Then calculate final position as initial position+(initial velocity*time)+ (acceleration*time^2)/2. This equation will give the final position. print the final position.
Output:
enter the initial position:10
enter the initial velocity:20.5
enter the acceleration:5
enter the time:15
final position is: 880.0
Answer:
gy
Explanation:
What is the return type of writeDouble( double d ), a method of RandomAccessFile.
a) void b) int c) float d) double f ) boolean g) file object h) none
Answer:
The answer is h) none.
Explanation:
The RandomAccessFile.writeDouble(double d) method does not return any value, it converts the double d value into a long type and then, writes it into a file as an eight-byte quantity. So, the method does not return any value but creates a file object.
Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
a. network infrastructure
b. SWOT
c. level of IT expertise
d. IT strategy
Answer: IT strategy
Explanation: IT(Information technology) strategy is the planning that is used in any particular organization for the management of the resources, functions, operation etc to make sure that stakeholders, employees etc have the same aim of working. This method helps in sustainability and achieving the goals.
Other options are incorrect because network infrastructure is the structure made by the network nodes, SWOT(strength, weakness, opportunities and threats) analysis for the analyzation of organization or person, IT expertise level defines the stages persisting particular skills.Thus the correct option is IT strategy.
Which of the following boolean algebra statements is true?
a) x & y = ~x | ~y
b) x | y | z = x & (y | z)
c) x | (y & z) = (x & y) | (x & z)
d) x & (y | z) = (x & y) | (x & z)
Answer:
The only statement that is True is the d) x & (y | z) = (x & y) | (x & z)
Explanation:
The statement x & (y | z) = (x & y) | (x & z) satisfies the Distributive Law of Boolean Algebra that states:
A & (B | C) = (A & B) | (A & C).
You can also check that the others are False if you use the operation notation, lets see that any of the other statements are true:
Statement a) x & y = ~x | ~y is equivalent to x * y=~x + ~y and this is False
Statement b) x | y | z = x & (y | z) is equivalent to x + y + z = x * (y + z), by solving this you have x + y + z = x * y + x * z and those expressions are not the same, so is False
For Statement c) x | (y & z) = (x & y) | (x & z) we have that this one does not satisfies the Distributive Law, therefore is False
Jill uses Word to create an order form. She starts out by creating a table that has three columns and ten rows. She would like her first heading to span the width of the entire table. She does which of the following to accomplish her goal?: *
a. merges the top two cells
b. merges the top three cells
c. merges the top ten cells
d. widens the first cell
Answer: Jill will have to b) merge the top three cells so that her first heading can span the width of the entire table.
Explanation: If Jill merges the top two cells, one of the cells will still remain and therefore she will not be able to span the width of the entire table. She cannot merge the top ten cells because the problem states the has 3 columns. The 10 rows occupy the entire table and are not located at the top of the table. Jill could widen the first cell, however, it will limit her table to one large column and 10 rows. The problem states that only the first heading or row should be occupying the entire width, therefore b) merges the top three cells is the correct answer.
To make her first heading span the width of the entire table which has three columns, Jill should merge the top three cells. The correct option is b. merges the top three cells.
In Microsoft Word, when creating a table, if you want to make a single cell span across multiple columns, you use the merge cells feature. Since Jill's table has three columns, merging the top three cells will create one header cell that extends over the entire width of the table, allowing for a cohesive and clear heading. This is especially useful for providing a unified title or a single descriptive heading at the top of the columns. It's important to ensure that table header cell labels are concise and clear, with captions or descriptions that clearly articulate the table's purpose and organization. In this case, Jill's merged cell can serve as a label to help interpret the cells below in her order form table, making it both functional and visually appealing.
Write a program that converts a temperature in Fahrenheit to temperature in Centigrade. The program will ask the user to enter a temperature in Fahrenheit as a decimal number. It will then display the same temperature in Centigrade as a decimal number. See Testing section below for test data.
Answer:
// here is program in java to convert Fahrenheit to equivalent Centigrade.
// import package
import java.util.*;
// class definition
class Main
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// object to read value from user
Scanner scr=new Scanner(System.in);
// ask to enter temperature in Fahrenheit
System.out.print("enter rented minutes: ");
// read temperature in Fahrenheit
int temp_f=scr.nextInt();
// convert Fahrenheit to Centigrade
double cen=(temp_f-32)/1.8;
// print the temperature
System.out.println(temp_f+" Fahrenheit is equal to "+cen+" Centigrade");
}catch(Exception ex){
return;}
}
}
Explanation:
Read temperature in Fahrenheit from user and assign it to variable "temp_f". To convert the temperature to equivalent Centigrade, first subtract 32 from Fahrenheit and then divide it by 1.8 .This will give equivalent temperature in Centigrade.
Output:
enter rented minutes: 100
100 Fahrenheit is equal to 37.77777777777778 Centigrade
What is the value of each variable after execution?
int x = 2;
int y = 7;
double p = 7.0;
int z = y / x;
double w = p / x;
z:
w:
Answer:
The value of the following variable is given below:
x=2
y=7
p=7
z=3
w=3.5
Explanation:
Following are the program in c++
#include <iostream>// header file
using namespace std; // namespace
int main() // main function
{
int x = 2; // variable declaration
int y = 7; // variable declaration
double p = 7.0; // variable declaration
int z = y / x; // variable declaration
double w = p / x; // variable declaration
cout<<" The value of following variable is given as:"<<endl<<"x:"<<x<<endl<<"y:"<<y<<endl<<"p:"<<p<<endl<<"z:"<<z<<endl<<"w:"<<w;// print all the statement
return 0;
}
Output:
x:2
y:7
p:7
z:3
w:3.5
Here the variable x is initializes by 2 ,y is initializes by 7 and p is initializes by 7.The variable z=y/x gives 3 and variable w=p/x gives 3.5 because variable w is double type
-Define three types of user mode to kernel mode transfers?
Answer:
The three types of user mode to the kernel mode transferred occurred due to the:
It is mainly occurred due to the interrupt when, it send to the central processing unit (CPU).It also occurs due to the hardware exception and when the memory is access illegally as it is divided by the zero. It is mainly implemented or executed by the trap instruction as the system are basically executed by the program.User mode to kernel mode transfers can happen through system calls, hardware interrupts, and software interrupts, allowing a user-level program to request kernel-level operations.
Explanation:User Mode to Kernel Mode TransfersIn computer systems, user mode to kernel mode transfers can occur through three primary mechanisms. These are system calls, hardware interrupts, and software interrupts. A system call is a programmed request to the kernel for a service performed by the operating system that a normal user program is not allowed to do. This is an intended interaction. A hardware interrupt is an asynchronous signal from hardware to the processor requesting attention; it causes the CPU to switch from user mode to kernel mode to handle the event. Lastly, a software interrupt is triggered by executing a specific instruction which intentional causes the processor to enter kernel mode for executing low-level routines that are not accessible in user mode.
Write a class definition for a student. It should have student ID and student name. Include the mutator and accessor functions for both of those member variables.
Answer:
class student {
private:
int studentID;
string student_name;
public:
int getID() // accessor...
{
return studentID;
}
string getname() //accessor...
{
return student_name;
}
void setvalues(int ID,string name) //mutator..
{
studentID=ID;
student_name=name;
}
};
Explanation:
The above written class is in C++.I have created two private members student_ID and student_name.Two accessor function getname and getID and one mutator function setvalues and these functions are public.
True or false? Colons are required when entering the MAC address into the Reservation window?
Answer:
False
Explanation:
A reservation in server-client communication is used to map your NIC’s MAC address to a particular IP address. A reserved MAC address should stay reserved until it gets to a point where a computer needs to get its address from DHCP. It should always remain static. To configure mac address in a DHCP console, you are required to use dashes to separate the MAC values. You can opt not to use dashes if you want to but do not use colons as separators. It will not work and will only populate errors.
________If your program compiles successfully, it will produce correct results. (T/F)
Answer:
False.
Explanation:
It is not compulsory that if the program is compiled successfully it will produce correct result.Suppose if the syntax in the code is all correct but the logic behind the code is wrong or there is a logic error in the program .So the program is certain to give wrong results.
Hence the answer is False.
Declaring a variable in the method’s body with the same name as a parameter variable in the method header is ___________.
a.a syntax error
b.a logic error
c.a logic error
d.not an error
Answer:
a. a syntax error
Explanation:
When the same variable name is repeated in the parameter set and the method body, it will result in a syntax error. This is because the variable in the parameter has a local scope within the method body. Now if we declare another variable with the same name in the method body, it will result in redefinition of the variable and violate the uniqueness principle of variable names in the method code. This will give rise to syntax error.
create a C program to read 3 unique(integer) numbers, find the largest and smallest numbers and print them to the screen. if the numbers are not unique, your program should print an appropriate message and exit. Otherwise, it should identify the smallest and largest numbers and print them to the screen.
Answer:
// here is code in C
#include <stdio.h>
// main function
int main(void) {
// variables
int a,b,c;
int mx,mn;
printf("Enter three numbers: ");
// read the 3 numbers
scanf("%d %d %d",&a,&b,&c);
// if all are not different
if(a==b||a==c||b==c)
{
printf("all numbers are not different:");
}
// find the largest
else{
if(a>b)
{
if(a>c)
mx=a;
else
mx=c;
}
else{
if(b>c)
mx=b;
else
mx=c;
}
// find the smallest
if(a<b)
{
if(a<c)
mn=a;
else
mn=c;
}
else{
if(b<c)
mn=b;
else
mn=c;
}
}
// print largest and smallest
printf("largest of all is: %d \n",mx);
printf("smallest of all is: %d",mn);
return 0;
}
Explanation:
Read three numbers and assign them to variables "a","b" and "c" respectively. Check if all the numbers are different or not.If all are not different then print message "all are not different.".Otherwise find the largest and assign to "mx" and then find the smallest and assign to "mn".Print the largest and smallest of all three.
Output:
Enter three numbers:5 2 9
largest of all is: 9
smallest of all is: 2
A(n) _____ is the unit of network information NICs and switches work with.
Answer: Network card
Explanation:
A network card is unit of the network information NIC (Network interface card) and worked with the switches. The working is basically perform at the given physical layer and subsequently organizing different types of devices that are physically associated together to execute as individual unit.
The network interface card (NIC) is also known as network adapter and the ethernet card in the network. It is the expansion of the card that basically enable the computer system to connect with the networks.
Convert 311 from decimal to hexadecimal. Show your work.
Answer:
(311)₁₀ = (137)₁₆
Explanation:
To convert a base 10 or decimal number to base 16 or hexadecimal number we have to repeatedly divide the decimal number by 16 until it becomes zero and write the remainders in the reverse direction of obtaining them.
311/16 = 19 remainder=7
19/16=1 remainder = 3
1/16 remainder = 1
Writing the remainder in the reverse direction that is (137)₁₆.
Hence the answer is 137.
What is the output produced from the following statements? (Treat tabs as aligning to every multiple of eight spaces.)
System.out.println("name\tage\theight");
System.out.println("Archie\t17\t5'9\"");
System.out.println("Betty\t17\t5'6\"");
System.out.println("Jughead\t16\t6'");
Expert Answer
Answer:
// this will be the output of the following statement.
name age height
Archie 17 5'9"
Betty 17 5'6"
Jughead 16 6'
Explanation:
First print statement will print name, age and height separated by a tab space. Then next print statement print Archie, 17 and 5'9" separated by a tab space in new line.Similarly third print statement will print Betty, 17 and 5'6" and in new line the last print statement will print Jughead,16 and 6' separated by a tab space in the next line.
Which of the following can be used to get an integer value from the keyboard?
Integer.parseInt( stringVariable );
Convert.toInt( stringVariable );
Convert.parseInt( stringVariable );
Integer.toInt( stringVariable );
Answer:
Integer.parseInt( stringVariable );
Explanation:
This function is used to convert the string into integer in java .Following are the program that convert the string into integer in java .
public class Main
{
public static void main(String[] args) // main method
{
String num = "1056"; // string variable
int res = Integer.parseInt(num); //convert into integer
System.out.println(res); // display result
}
}
Output:1056
Therefore the correct answer is:Integer.parseInt( stringVariable );
Answer:
A
Explanation:
) Printing odd numbers. Write Python code that asks the user for a positive number, then prints all the odd numbers from 0 to the number provided by the user. For example, if the user provides the number 7, then you should print the values: 1 3 5 7 *You can use 'range()' with three numbers.
Answer:
#here is code in Python
#read the value of n
n=int(input("enter a number:"))
#print all the odd numbers
for i in range (1,n+1,2):
print(i,end = '')
Explanation:
Read a number from user and assign it to variable "n".Then use a for loop to print all the odd numbers from 1 to n.We can use range() function to print this. here first number is starting of the range and second will be the end of the range. and 3rd one is the Increment to the iterator.
For example In the above code, 1 is the start point and n+1 will be the last. Here
loop will run till n only.Every time value of "i" is increased by 2.
Output:
enter a number:15
1 3 5 7 9 11 13 15