Answer:
The correct answer for the given question is option(b) i.e "Implicit conversion".
Explanation:
Implicit conversion converts one datatype to another without forcefully .it convert the one datatype to another automatically.The implicit type is a type safe conversion .
For example
int i = 57;
float f = l; // convert i to f without forcefully.
The explicit conversion converts one datatype to another forcefully .This type of conversion is not a type safe conversion.
double d = 765.12;
int i = (int)d; // convert d to i forcefully
so the correct option is option(b).
If variable x has value 2 and y has value 1, which values could result from the following Jack expression?
x + 3 * 4 - y
Answer:
The result of the given expression is 13.
Explanation:
Here x and y are the two variable which has value 2 and 1 respectively.
x+3*4-y
Here operator * is more precedence then that + operator so
=2+(3*4)-1
2+12-1 now + operator is more precedence then that - operator so
=(2+12)-1
=(14-1)
=13
Following are the program in C language
#include <stdio.h>// header file
int main() // main function
{
int x=2,y=1; // variable declaration
printf("%d",x+3*4-1); b// final result
return 0;
}
Output:13
Why do we have some network devices that have more than one IP address?
Answer:
This is because a device can have more than a network interface.
Explanation:
IP address has to be unique in a network but a device can have more than a network interface. This is because the device has multiple network cards and for each of the interfaces we can set up an unique ip address in a LAN. For example almost all laptops have at least two network interfaces: one is the ethernet interface, we can connect an ethernet cable to this interface. The other one is the WiFi interface, we can connect to internet using this interface. In this case we can have more than one IP address but they have to be unique.
. How does Word indicate a possible instances of inconsistent formatting?: *
a. With a wavy red underline
b. With a wavy blue underline
c. With a wavy green underline
d. This functionality is not available in Word
Answer:b)With a wavy blue underline
Explanation:Wavy blue lines in the Word document is for representing that the Format consistency checker is in working/on mode .It can identify the inconsistent format instances for the correction while the user is writing the text.
Other options are incorrect because wavy red line is for incorrect spelling of any word and wavy green line signifies the grammatical mistake .The function is available for the format inconsistency as wavy blue line in Word .Thus, the correct option is option(b).
The frequency of a sine wave is defined as:
a.the number of cycles per second
b.the maximum amplitude of the wave
c.the time for one cycle
d.the difference between the high frequency and the low frequency
Answer:
a.the number of cycles per second
Explanation:
The frequency of a sine wave is defined as the number of cycles per second.
Frequency is the inverse of the time period. The frequency of a sine wave is given by 1/TimePeriod . It is generally expressed in units of Hertz(Hz) or sec^-1. Larger the time period, lower will be the frequency and vice versa. So for higher frequency waves we need to ensure that the time period is small.
Register addressing is the fastest way to access memory.
True
False
Answer:
True.
Explanation:
In operating system memory management registers are the fastest way to access memory but their storing capacity is least .They can store data less than 1kb but the access time for register is around 5 ns.
Registers are the smallest unit of memory.The bigger the memory the more is the access time.
Hence the answer to this question is True.
What are design classes? (Points : 6) Design classes are classes whose specifications have been completed to such a degree that they can be implemented.
Design classes are classes whose specifications have been completed to such a degree that they can be programmed.
Design classes are classes whose specifications have been completed to such a degree that they can be approved.
None of these
Answer: implemented
Explanation:I used a bit of deductive logic. Design would be something with parameters and or boundaries like designing a home. Programmed just didn’t seem to fit in because there is no room for creative thinking. Approved? By whom?, you design something to reach a goal and follow to a degree what you designed, maybe within the walls you can add a closet or with design classes they are designed for a purpose but there must be ideas within a design that come up. So implemented makes sense so you have a design that seems to fit and certainly can be implemented meaning it can be used for a purpose to teach or help.
Discuss how cryptology is used on the Internet for e-business or e-commerce. Provide examples and types of cryptographic tools and techniques
E-commerce deals with a wide range of products and services on the internet. Therefore, it is crucial to recognize security and a high degree of confidence required in the authenticity and privacy of online transactions. Sometimes, it can be challenging to trust the internet where these kinds of transactions are made; thus, the need for cryptography. Cryptography provides data security and reduces the risk of cybercrimes, such as hacking and phishing.
Modern Cryptography services can be seen as data authentication, user authentication, data confidentiality, and no-repudiation of origin. The most common type of cryptographic tools and techniques is the use of the RSA Algorithm. It is used for securing communications between web browsers and e-commerce sites. The interactions make use of an SSL certificate, which is based on public and private keys. PKI (Public-Key Infrastructure) is also another excellent example of cryptographic tools and techniques. Based on several things, PKI is used to identify or authenticate the identity of the other party on the internet.
What is the Multiple Items tool?
Explanation:
when a form is created in Microsoft Access using the form tool it displays a single record at a time.To display multiple records and the form should be more customizable then in this case we use Multiple Items tool.
Creating a form using Multiple Items Tool:-
In navigation pane click query or table which contains the data that we want to see on the form.
On create tab,in the group Forms,click more Forms,then click Multiple Items.
-Write a function is_perfect, which accepts a single integer as input. If the input is not positive, the function should return a string "Invalid input." If the input is positive, the function should return True if the input is a perfect number and False otherwise.
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// function
string is_perfect(int n)
{
// string variables
string str;
// if number is negative
if (n < 0)
{
str="invalid input.";
}
// if number is positive
else
{
int a=sqrt(n);
// if number is perfect square
if((a*a)==n)
{
str="True";
}
// if number is not perfect square
else
{
str="False";
}
}
// return the string
return str;
}
// main function
int main()
{
// variables
int n;
cout<<"enter the number:";
// read the value of n
cin>>n;
// call the function
string value=is_perfect(n);
// print the result
cout<<value<<endl;
return 0;
}
Explanation:
Read a number from user and assign it to variable "n".Then call the function is_perfect() with parameter n.First check whether number is negative or not. If number is negative then return a string "invalid input".If number is positive and perfect square then return a string "True" else return a string "False".
Output:
enter the number:-3
invalid input.
enter the number:5
False
enter the number:16
True
Which of the following keywords is used to remove a row in a table? (Points : 2) DROP
DELETE
REMOVE
MODIFY
Answer:
DELETE
Explanation:
DELETE keyword is used to remove a row in a table. The actual syntax is as follows:
DELETE from <TableName> where <Condition>;
For example:
DELETE FROM employee where name='Peter';
This will remove employee with the name Peter from the Employee table.
DROP on the other hand is used to delete the entire table without focussing on a particular row.DROP syntax is as follows:
DROP TABLE <TableName>;
In Mandatory Access Control sensitivity labels attached to object contain what information?
a.The item’s classification
b.The item’s classification and category set
c.The item’s category
d.The item’s need to know
Answer:b)The item’s classification and category set
Explanation: Mandatory access control(MAC) is the security component in the computer system. It is regarding the controlling the access of the operating system by the administrator.The accessing is made limited by the MAC according to the sensitivity of the data .
The authorization for user to access the system is based on this sensitivity level known sensitivity label. The objects contain the information regarding the classification and categories or level of items. Thus, the correct option is option(b).
A(n) --------- statement is displayed on the screen to explain to the user what to enter
Answer: Prompt
Explanation:
The prompt statement is basically used to define the users about the details that what to enter on the screen that is displayed and sort the input data so that it can easily enter.
In the program, the prompt statement and the dialog boxes are used to enter the input data or information in the terminal screen and window.
For example:
In the C++ language, the std::cout function is basically used for the output value and the std::cin function is used to get the input value.
In the java programming, the system.out.ptintln() function is basically used to tell the users to enter the input value in the program.
write a program that reads in initial saving value ( $100 ) and interest rate (use .12 = 12%) per year and then figures out how much will be in the account after 4 months and prints results.
Answer:
// here is program in C++.
// include header
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
float ini_sav;
float i_rate;
cout<<"Enter the initial saving:";
// read initial saving
cin>>ini_sav;
cout<<"Enter interest rate:";
// read interest rate
cin>>i_rate;
// account after 4 months
float account=ini_sav+ini_sav*i_rate*(4/float(12));
// print account
cout<<"Account after 4 months:"<<account<<endl;
return 0;
}
Explanation:
Read initial saving from user and assign it to "ini_sav".Then read interest rate and assign to "i_rate".Then calculate the interest on initial saving after 4 months as "ini_sav*i_rate*(4/float(12))" and to initial saving.This will be the account after 4 months.
Output:
Enter the initial saving:100
Enter interest rate:.12
Account after 4 months:104
. Planning a BI implementation is a complex project and includes typical project management steps. Therefore, the first step in the BI planning process is to _____.
a. define the scope
b. define the budget
c. identify the resources needed
d. define the timeline
Answer:
The correct answer is option a. "define the scope".
Explanation:
Define the scope is one critical step of project management that must take places when the planning of the project is being done. It involves defining certain critical aspects of the project such as: goals, deliverables, features, tasks, deadlines, and costs. Since BI planning includes typical project management steps, define the scope must be the first step.
What is memory paging, and how can it facilitate virtual memory?
Answer:
Memory paging is a memory management technique that controls how memory resources are used and shared by the operating system.
The virtual memory is an alternate set of memory addresses that operating systems in conjunction with the hardware reserve to expand the total amount of addresses(real memory + virtual memory). When the program is actually executed, the virtual addresses are converted into real memory addresses.
The operating system divides virtual memory into pages to facilitate copying virtual memory into real memory, each of which contains a fixed number of addresses. When the page is needed, the operating system copies it from disk(virtual memory) to the main memory(real memory), translating the virtual addresses into real addresses.
The expression that is tested by a switch statement must have a(n) __________ value.
Final answer:
The expression evaluated by a switch statement must have a discrete value, which allows it to be compared with a set of predefined case values. Typically, the switch statement works with integral or enumerated types, and sometimes strings, in various programming languages.
Explanation:
The expression that is tested by a switch statement must have a discrete value. This means that the expression must evaluate to a single value that can be checked against a series of case values. In programming languages like Java or C++, the switch statement typically works with discrete, integral values like integers or enumerated types, and in some languages, it also works with strings. The switch statement then executes the code block associated with the first case that matches the value of the expression, providing a cleaner and more efficient alternative to a lengthy series of if-else statements.
For example, consider a switch statement that evaluates a variable representing a day of the week:
int day = 3;switch (day) { case 1: ... // Code for Monday case 2: ... // Code for Tuesday case 3: ... // Code for Wednesday}Here, the switch statement will execute the code block associated with case 3, since the value of day is 3. The key here is that the value of the expression (the variable 'day' in this example) must be discrete so that it can be compared against the case labels.
Final answer:
A switch statement requires a "discrete value" for its expression, and is used to control the flow of execution in a program. A break statement is often used to exit the switch after a match is found, following the evaluation of a boolean condition.
Explanation:
The expression that is tested by a switch statement must have a discrete value. A switch statement allows for multiple tests to be conducted to determine the proper course of action. It is typically used when you have several if statements that apply to the same variable or when there are multiple nested logic statements that control the flow of the code.
In a switch statement, each case is tested in sequence until a match is found or the end of the switch is reached. To prevent the execution from continuing through subsequent cases, a break statement is often used. The condition in the switch statement that selects the branch is called a condition.
It is important to note that the alternatives in the switch statement are referred to as branches. These branches represent different paths the program's execution can take. Each branch is contingent upon a condition, which is the boolean expression that determines which path is executed. If the condition for a case is true, that branch is executed.
___ should be considered by managers to ensure that newer hardware is compatible with older hardware.
Backward compatibility
Forward compatibility
Integrative compatibility
Reverse compatibility
Answer:
Backward Compatibility
Explanation:
Backward Compatibility means either the Software or Hardware systems which are compatible with the older versions of the software and hardware.It basically means the newer versions of the software or hardware are compatible with the older versions of the same software or hardware.The core technology in both the newer versions and hardware may remain the same. The newer versions uses the same data and technology of the older versions with some upgrades.So, option (A) is correct option.Forward Compatibility is related to the same concept. Forward Compatibility means the older versions of the software and hardware are compatible with the upcoming newer versions of software and hardware. So, option (B) Is wrong option.There are no terms called (C) Integrative Compatibility (D) Reverse compatibility. So, options (C) and (D) are false.A host is rebooted and you view the IP address that it was assigned. The address is 169.254.141.45. Which of the following happened? (Please select one of the four options)
The host received an APIPA address
The host received a public address
The host receive a multicast address
The host received a private address
Answer: The host received an APIPA address
Explanation:
The IP address 169.254.141.45 is within the range of IP address between 169.254.0.0 and 169.254.255.255, which are reserved by the IANA (Internet Assigned Numbers Authority) for those IP addresses denoted as APIPA addresses, where APIPA stands for Automatic Private IP Address.
This means that any IP Address in this range , will be not be in conflict with routable IP addresses.
. Why use a sensitivity analysis?
Answer:
Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.
The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.
It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.
Name and describe the two (2) broad categories of files
Explain what might happen if two stations are accidentally assigned the same hardware address?
Answer: If two different station are addressed with the same hardware address then there are chances of occurrence of the failure in the network at irregular intervals.The failure or error will occur because of the both the devices are seen as one by the network due to same address.
An intelligent network system id used ,it can identify the error can help in the prevention of the failure.Other option for configuring the situation is assigning the MAC(media access control)address to devices which are unique in nature thus, no device can have same address.
Write a program that inputs a series of 10 non-negative numbers and determines and prints the largest of those numbers. Your program should use three variables: Counter - a counter to count to 10 (i.e. to keep track of how many numbers have been input and to determine when all 10 number have been processed) Number - the current number input to the program Largest - the largest number found so far
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int Counter,largest=-1,Number;
cout<<"enter 10 non-negative numbers:";
// read 10 non-negative Numbers
for(Counter=1;Counter<=10;Counter++)
{
cin>>Number;
if entered number is largest so far
if(Number>largest)
{
// update the largest
largest=Number;
// print the largest
cout<<"largest found so far is: "<<largest<<endl;
}
}
return 0;
}
Explanation:
Declare variables Counter,Number and largest=-1.Here Counter is use to keep count of input number.largest to store the largest input so far.And Number to read inout from user.Find and print largest after each input.
Output:
enter 10 non-negative numbers:24
largest found so far is: 24
12
56
largest found so far is: 56
9
8
67
largest found so far is: 67
33
56
98
largest found so far is: 98
100
largest found so far is: 100
Write a recursive function that returns the number of 1 in the binary representation of N. Use the fact that this is equal to the number of 1 in the representation of N/2, plus 1, if N is odd.
Answer:
#here is code in python
# recursive function that counts the number of 1's
def bin_count(num):
#base condition
if num==0:
return (0)
elif num == 1:
return (1)
else:
#recursive call
return bin_count(num//2)+bin_count(num%2)
#read a number
num=int(input("enter a number:"))
#call the function
print("number of 1's is:",bin_count(num))
Explanation:
Read a number from user and call the function bin_count() with parameter num. In the function, if num=0 then it will return 0.If num is 1 then return 1 else it will count the number of 1's inn the binary representation of the number and return the count.
Output:
enter a number:63
number of 1's is: 6
What is the output of the code below?
for (int j = 1; j <= 10; j++)
{
if (j == 3)
{
break;
}
cout << j << endl;
}
Output:
for (int j = 1; j <= 10; j++)
{
if (j == 3)
{
continue;
}
cout << j << endl;
}
Output:
Expert
Answer:
The first output for the following code is given below :
1
2
The second output for the following code is given below
1
2
4
5
6
7
8
9
10
Explanation:
In the first code the loop will iterated
When j=1 the condition of if block will not be executed so it print 1 on console and increment the value of j.
After increment of j it becomes 2 again if block does not executed because the condition of if block is not true so it print 2 on console and increased the value of j.
When j=3 if condition block is executed and it terminate the loop immediately .
Therefore output is :
1
2
In the second code the loop will iterate
When j=1 the condition of if block is not executed so it print 1 on console and increment the value of j.
After increment the value of j it becomes 2 .Again if block will not be executed so it print 2 on console and increased the value of j.
After increment the value of j becomes 3.This time if block will executed ,it will moved directly control to the beginning of the loop and skip the current execution of statements that means it skip the value j=3 and increment the value of j .
Now j=4 this process is same follow untill when j<=10 when j=11 the loop is false and loop will terminate .
Therefore output is :
1
2
4
5
6
7
8
9
10
If the program does not handle an unchecked exception:
a.)
the program is halted and the default exception handler handles the exception
b.)
the program must handle the exception
c.)
the exception is ignored
d.)
this will cause a compilation error
Answer:a.) The program is halted and the default exception handler handles the exception
Explanation: If a exception is left out by the program handler then the processing is stopped and the control of exception handling is done to another handler. The unchecked exception is thus handled by the default exception handler.
Exception occur in the executing programs that try to stop the function by terminating it .The method used for the handling of the program is try catch and throw technique. Unchecked exception are found while the run-time and thus target the processing of the program.Thus,the correct option is option(a).
Other options are incorrect because the current program cannot handle the exception as it has left it unchecked, exception cannot be ignored because it stops the program and compilation error will not be caused.
. assures that individuals control or influence what information related to them may be collected and stored and by whom and to whom that information may be disclosed. A. Availability B. System Integrity . Privacy D. Data Integrity
Answer: Privacy
Explanation: Privacy is defined as information or content that is kept to the selected or desired resources and people.It is like a boundary after which the information should not be shared or disclosed because of the privates reasons such as insecurity , protection etc.It is followed for confidential and sensitive content to remain secure and cannot be misused.
Other options are incorrect because availability is referred serviceability of data, system integrity is assuring no unauthorized action in system for modification and data integrity assures about the safeness and reality of information without manipulation .Thus, the correct option is privacy.
What is the period of a 2 KHz sine wave?
Answer:
Period of the given wave is 0.5 milliseconds.
Explanation:
We are given the frequency of the wave as 2 KHz
We know the relation between period and frequency of a wave is given by
[tex]Period=\frac{1}{frequency}[/tex]
Applying the given values we get
[tex]Period=\frac{1}{2\times 10^{3}}\\\\\therefore Period=0.5\times 10^{-3}seconds[/tex]
Thus period is 0.5 milliseconds.
________ is when the sequence of instruction is guaranteed to execute as a group, or not execute at all, having no visible effect on system state.
Answer: Atomic operations
Explanation: Atomic operations are the process in which are related with the programs which execute in the independent manner and having no relation with other processes or functions.
It is helpful operation in the parallel processing system.The operation assures about being carried out at rapid rate and do not face any deadlock during execution.This does not alter the rate of the system.
Which of the following is not a valid SQL command? (Points : 2) UPDATE acctmanager SET amedate = SYSDATE WHERE amid = 'J500';
UPDATE acctmanager SET amname = UPPER(amname);
UPDATE acctmanager SET amname = UPPER(amname) WHERE amid = 'J500';
UPDATE acctmanager WHERE amid = 'J500';
Answer:
UPDATE acctmanager WHERE amid = 'J500';
Explanation:
The statement written above is not valid SQL statement because there is no SET after UPDATE. Update is always used with SET.If you are updating something then you need to specify the value with which that value should be replaced.
UPDATE acctmanager SET amname = UPPER(amname);
This statement does not contains WHERE clause but it will run all the values of amname column will get updated in the table acctmanager.
Which of the following commands contains an error?
Question 2 options:
CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT, year INTEGER);
INSERT INTO vehicletype VALUES (1,"truck","Ford",2000);
SELECT * FROM vehicletype;
Answer:
The very first command contains an error.
Explanation:
The create query is used to create the table in the database. The syntax of the create query is :
create table tablename(column1 datatype,column2 datatype ........columnn datatype);
So there is a keyword table is missing in the given query. so it is incorrect query.
INSERT INTO vehicletype VALUES (1,"truck","Ford",2000); This query is correct.
SELECT * FROM vehicletype; This query is also correct.