Answer: Indexed
Explanation: Indexed property in the database system is for indexing .In this process reduction of the record/disk numbers results in the increase in the optimized performance. The structure of the index is in column form.
This technique rapidly provides the data from the table containing database when every query arises or requirement is proposed. Therefore the efficiency of the database increases.
Other options are incorrect because validation rule and text are regarding the verification of the data user and text respectively and expression is defined as the group of one or more value.Thus the correct option is indexed.
Convert AB4F from hexadecimal to binary.
Answer:
AB4F=1010101101001111.
Explanation:
Every bit of hexadecimal number is a 4 bit binary number.So to convert a number from hexadecimal to binary number by finding the corresponding binary number for each bit of hexadecimal number and then write it in the same sequence.
A=1010
B=1011
4=0100
F=1111
Writing in the same sequence of the hexadecimal number.
AB4F = 1010101101001111.
write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
The program then calculates and writes to the screen BMI (body-mass index) that user with two decimal places.
Answer:
// here is code in C++(bmi.cpp).
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
float weight,height;
cout<<"enter the weight(in kilograms):";
//read the weight
cin>>weight;
cout<<"enter the height(in meters):";
//read the height
cin>>height;
// calculate the bmi
float bmi=weight/(pow(height,2));
// print the body-mass index with two decimal places
cout<<"BMI is: "<<fixed<<setprecision(2)<<bmi<<endl;
return 0;
}
Explanation:
Read the weight from user and assign it to variable "weight",read height and assign it to variable "height".Then find the body-mass index as (weight/height^2).Here weight should be in kilograms and height should be in meters.
Output:
enter the weight(in kilograms):75
enter the height(in meters):1.8
BMI is: 23.15
Final answer:
The C++ program calculates a user's BMI by asking for their weight in kilograms and height in meters, then outputs the result with two decimal places using the formula BMI = Weight / height².
Explanation:
The Body Mass Index (BMI) is an important measurement used to categorize weight categories that could lead to health issues. In this C++ program, the user will be prompted to enter their weight in kilograms and height in meters. The program will then calculate their BMI using the formula BMI = Weight / height² (kg/m²), and display it on the screen with two decimal places.
Here is a sample C++ program that calculates BMI:
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double weight, height, bmi;
cout << "Please enter your weight in kilograms: ";
cin >> weight;
cout << "Please enter your height in meters: ";
cin >> height;
bmi = weight / (height * height);
cout << "Your BMI is " << fixed << setprecision(2) << bmi << endl;
return 0;
}
The program ensures the BMI is presented with two decimal places using the iomanip library functions fixed and setprecision. After compilation, the user can run the program, input their data, and get their BMI value on the screen.
Name and describe the two (2) broad categories of files
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.
The File method lastModified() returns
a) date b) int c) double d) long e) specified by the programmer f) none
Answer: d) long
Explanation: The lastModified() is a function found in the Java class.This function returns a value in the long form in the File method.It represents the time in the long value which denotes the last time the file was modified.In case of exception error ,0L value is returned.
Other options are incorrect because int and double because it has 32 bit integer form and 64 bit float form respectively whereas lastModified() function works in 64 bit having two's complement integer.The return type cannot be specified by programmer.Thus the correct option is option(d).
. 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.
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.
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.
Why is WPS desirable?
Answer:
WPS is known as wireless protected setup that is basically used for the wireless security purpose. The WPS system is basically make the connection easily between the router and other network devices.
The WPS desirable as it make the connection and configuration of the network more simple with the given access point.
In WPS, the users contain the pin and it is 8 digit long pin that is basically associate with the access point.
a = [2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 33 34 35 36 37 38 39 40]
b = [1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 43 45 47 49 50 54 59 60]
In MATLAB, only using fully-vectorised code (ie. no loops) divide A by B element by element.
Answer:
[tex]C = a./b[/tex]
Explanation:
In MATLAB, the following command:
[tex]C = A./B[/tex]
Performs the element by elemet division of A and B. This comand is called Right-array division.
So, in your case, we could divide A by B element by element, only using fully-vectorised code (ie. no loops), with the following code:
[tex]a = [2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 33 34 35 36 37 38 39 40];
b = [1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 43 45 47 49 50 54 59 60];
C = a./b[/tex];
C would be the element by element division of A and B, with no loops.
.Writе a call to function calculatеAvеragе(), passing it rainfall
Answer:
calculateAverage(rainfall);
Explanation:
The above written statement is for calling a function calculateAverage() in the main function passing rainfall as the argument in it.
Always remember when calling a function you should store the result of the function in the same return type as the function except void.If the return type of the function is void then you don't need to store it in any variable.
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.
Write a statement that computes the square root of a variable called discriminant
and stores the value in a variable called result.
Answer:
// here is statement in C++ to compute square root of a variable.
double result=sqrt(discriminant);
Explanation:
Sqrt() method will compute the square root of a variable in C++.Read a value of discriminant and find the square root of it and assign it to variable "result".
Implementation in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
double discriminant;
// ask to enter discriminant
cout<<"Enter the discriminant:";
// read discriminant
cin>>discriminant;
double result=sqrt(discriminant);
cout<<"Square root of discriminant is:"<<result<<endl;
return 0;
}
Output:
Enter the discriminant:50
Square root of discriminant is:7.07107
-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
Explain how for loops can be used to work effectively with elements in an array?
Explanation:
There are three types of loops in programming languages which are as following:-
for.while.do while.The syntax for all the three loops is different.You will see mostly for loop used with the arrays because they are easy to implement.
the syntax of for loop is :-
for(int i=initial value;condition;i++)
{
body
}
In for loops you only have to write the conditions in only line else is the body of the loop.
for example:-
for array of size 50 printing the each element
for(int i=0;i<50;i++)
{
cout<<arr[i]<<" ";
}
You have to initialize i with 0 and the condition should be i<size of the array and then increase the counter.
Convert binary number 11101111.10111 to decimal
Answer:
[tex]N_{10}=239.71875[/tex]
Explanation:
In order to obtain the decimal number we have to use the next formula:
[tex]N_(10)=d*2^{(i)}\\where:\\N=real number\\d=digit\\i=position[/tex]
(The position to the right of the decimal point we will take it as negative)
Using the formula we have:
[tex]N_{10}=(1*2^7+1*2^6+1*2^5+0*2^4+1*2^3+1*2^2+1*2^1+1*2^0+1*2^{-1}+0*2^{-2}+1*2^{-3}+1*2^{-4}+1*2^{-5})[/tex]
[tex]N_{10}=239.71875[/tex]
Assume a 8x1 multiplexer’s data inputs have the following present values: i0=0, i1=0, i2=0, i3=1, i4=0, i5=0, i6=0, i7=0. What should be value of the select inputs s2, s1 and s0 for the value on the multiplexer’s output d to be 1?
s2=
s1=
s0=
Answer: s₂ = 0 s₁ = 1 s₀ = 1
Explanation:
In brief, a multiplexer is a digital circuit (generally buit with combiantional logic) , that selects one of the inputs to be present at the output, based on the combination of the values present in auxiliary inputs called select inputs.
As a rule, the number of inputs (m) and the number of select inputs (n) satisfy this condition: m = 2ⁿ
At any time, the input which order, be equal to the binary combination of the select inputs, will be present at the output.
In our case, being an 8x1 multiplexer, we will have 3 select inputs, denoted as s₂, s₁, s₀.
The only input which current value is "1", is i3, so, in order to send an "1"to the output, the binary combination at the select inputs must match the number of the input to be selected, i. e., 3.
So, s₂s₁s₀ must be read as 3 in binary; 011, so s₂=0 s₁=1 s₀= 1.
What is the difference between the subu instruction and the sub instruction? State how will the processor behave differently for these instructions.
Answer:
The subu instruction are the type of the immediate arithmetic operation which basically give the binary result in the 32 bits that are stored in the destination register.
The subu instruction typically represent as subtract unsigned. It basically check the overflow of the unsigned number.
The sub instruction basically subtracts the second source operand from the principal source operand, and stores the outcome in the goal operand. This instruction basically used in the pseudocode to perform various tasks.
___ 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.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.
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.
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 applies the Euclidean algorithm to find the greatest common divisor of two integers. Input should be two integers a and b and output should be the greatest common divisor of a and b. Test your program with several examples using both positive and negative values for a and b.
Answer:
// here is code in c++.
#include <bits/stdc++.h>
using namespace std;
// function that return greatest common divisor
int g_c_d(int num1, int num2)
{
if (num1 == 0)
return num2;
return g_c_d(num2 % num1, num1);
}
// main function
int main()
{
// variables
int num1,num2;
cout<<"enter two numbers:";
// read two numbers from user
cin>>num1>>num2;
// call the function and print the gcd of both
cout<<"greatest common divisor of "<<num1<<" and "<<num2<<" is "<<g_c_d(num1.num2)<<endl;
}
Explanation:
Read two numbers from user and assign them to variables "num1" and "num2".Call the function g_c_d() with parameter "num1" and "num2".According to Euclidean algorithm, if we subtract smaller number from the larger one the gcd will not change.Keep subtracting the smaller one then we find the gcd of both the numbers.So the function g_c_d() will return the gcd of both the numbers.
Output:
enter two numbers:5 9
greatest common divisor of 5 and 9 is 1
enter two numbers:-25 15
greatest common divisor of -25 and 15 is 5
The Euclidean algorithm is used to find the greatest common divisor of two integers, which is implemented in a Python program that works with both positive and negative integers. An example demonstrates that the GCD of 48 and 18 as well as -48 and 18 is 6.
The question involves writing a program that uses the Euclidean algorithm to calculate the greatest common divisor (GCD) of two integers. The Euclidean algorithm is a method for finding the greatest common divisor of two numbers, which is the largest number that divides both of them without leaving a remainder.
The program will take two integers as input and provide their greatest common divisor as output. To accommodate both positive and negative input values, the algorithm can be implemented as follows in Python:
def gcd(a, b):
while b != 0:
a, b = b, a % b
return abs(a)
# Examples using the function
gcd_result1 = gcd(48, 18)
print(f'The GCD of 48 and 18 is {gcd_result1}')
# The function can also handle negative values
gcd_result2 = gcd(-48, 18)
print(f'The GCD of -48 and 18 is {gcd_result2}')
This example demonstrates that the greatest common divisor of 48 and 18 is 6, and the GCD of -48 and 18 is also 6 because the GCD is always a non-negative number.
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
.When an argument is passed ______________, the called method can access and modify the caller’s original data directly.
a.either by value or by reference
b.by value
c.using keyword ref
Answer:
c.using keyword ref
Explanation:
In C# when we have pass any variable by reference we use the ref keyword. When we pass a variable by reference in the function the changes done in the function are directly happening on the original variables.
When a variable is passed by value a copy of these variable is created in the function and the operation is done on those copies.No changes can be seen on the original variables.
Hence the answer is option c.
What are some kinds of Web sites that should prohibit anonymity and why?
Answer:
Some websites like proxy bypass and virtual private network (VPN) prohibited the anonymity as it affected the surfer during long rum in the system.
The proxy bypass is the type of the server that mainly used in the local address. The proxy is the type of he intermediate server which basically stand in the computer and also in the remaining part of the internet. This is basically used in the corporate for the network protection for using the content in the system.
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.
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.
. 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).
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.