Answer: In external hashing the hash table is in disk where each slot of the page table holds multiple entries which refers to pages on the disk organised in the form of buckets.
B-trees are self balancing trees which contains sorted data and allows insertion, deletion, traversals
Traversal is the process of visiting the nodes of the tree data structure.
Explanation:
External hashing is different from internal hashing and it refers to concepts in database management systems. Internal hashing stores only single record maintained in page table format, whereas external hashing holds multiple entries.
B-trees are generalisation of binary trees where it can have more than 2 children.
Traversal of trees helps in insertion, deletion, modification of nodes in tree data structure
Write a program which promptsuser to enter an integer value. Using while loop print the valuesfrom
zero up to the number enteredby the user.
• Enlist the odd numbers out of them
• Enlist the prime numbers out of odd number list and printtheir sum (add all the prime numbers)
Answer:Following is the c++ code for the problem:
#include <iostream>
using namespace std;
int main() {
int number;
cout<<"Enter the number"<<endl;
cin>>number;
int i=0,c=0,odd[500];
while(i<=number)//loop for printing the numbers form 0 to number.
{
cout<<i<<" ";
if(i%2!=0)// storing in the odd array if the number is odd.
{
odd[c++]=i;//storing odd numbers..
}
i++;
}
cout<<endl;
i=0;
cout<<"The odd numbers are "<<endl;
while(i<c)//loop to print the odd numbers.
{
cout<<odd[i]<<" ";
i++;
}
cout<<endl<<"The prime numbers are "<<endl;
i=0;
int sum=0;
while(i<c)//loop to print the prime numbers..
{
int div=2;
while(div<odd[i])
{
if(odd[i]%div==0)
break;
div++;
}
if(div==odd[i])
{
cout<<odd[i]<<" ";
sum+=odd[i];//updating the sum..
}
i++;
}
cout<<endl<<"The sum of odd prime numbers is "<<sum<<endl;//printing the sum..
return 0;
}
Output :
Enter the number
49
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
The odd numbers are
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
The prime numbers are
3 5 7 11 13 17 19 23 29 31 37 41 43 47
The sum of odd prime numbers is 326 .
Explanation:
First I have printed the values from 0 to n and i have taken an array to store odd numbers.After that i have printed the odd values.And after that i have printed prime numbers among the odd numbers and their sum. These all operations are done using while loop.
What is the role of programmers in an organization?
Answer: The major responsibility of a programmer is the development of the computer programs for an organization.
Explanation: Programmers tends to have good programming language knowledge for developing programs according to the need. They are supposed to create coding pieces as per the requirement in a software programming language. They are also have a duty of testing the program code. They should persist the skill of problem solving as well as critical thinking to be a good programmer in a particular organization.
What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float?
Answer:
A bool can hold only true or false values.
A char can hold maximum 65535 characters.
An int can hold maximum positive value of 2,147,483,647.
A float can hold maximum positive value of 3.4 x 10^{38}.
Explanation:
Primitive data types in Java language can be categorized into boolean and numeric data types.
Numeric can be divided further into floating point and integral type. Floating data type includes float and double values while and integral data type which consists of char, int, short, long and byte data types.
Every data type has a range of values it can hold, i.e., every data type has a minimum and maximum predefined value which it is allowed to hold. The intermediate values fall in the range of that particular data type.
Any value outside the range of that particular data type will not compile and an error message will be displayed.
The data types commonly used in programming are boolean, char, int and float.
A boolean variable can have only two values, true or false.
A char variable can hold from 0 to 65535 characters. Maximum, 65535 characters are allowed in a character variable. At the minimum, a char variable will have no characters or it will be a null char variable, having no value.
An int variable has the range from minimum -2^{31} to maximum 2^{31} – 1. Hence, the maximum positive value an int variable can hold is (2^{31}) – 1.
A float variable can hold minimum value of 1.4 x 10^{-45} and maximum positive value of 3.4 x 10^{38}.
The above description relates to the data types and their respective range of values in Java language.
The values for boolean variable remain the same across all programming languages.
The range of values for char, int and float data types are different in other languages.
The AND operator is written as two ____.
a.
asterisks
b.
equal signs
c.
ampersands
d.
plus signs
Answer:
ampersands
Explanation:
In the programming the AND operator is denoted as '&&' , two ampersands.
it is used to between two conditions and give Boolean result.
It has four possible result:
first condition TRUE second TRUE, result TRUE
first condition TRUE second FALSE, result FALSE
first condition FALSE second TRUE, result FALSE
first condition FALSE second FALSE , result FALSE
For example:
(5 > 0 && 7 > 4): it gives the result TRUE because both are true.
5 > 8 && 7 > 4): it gives the result FALSE because one is false.
Develop a program so that the output will produce the following :
the circumference of the circle is 33.912
the area of the circle is 91.5624.
Answer:
#include <iostream>
using namespace std;
int main()
{
float radius = 5.4;
float circumference = 2 * 3.14 * radius;
float area = 3.14 * radius * radius;
cout<<"the circumference of the circle is "<<circumference<<endl;
cout<<"the area of the circle is "<<area<<endl;
return 0;
}
Explanation:
Include the library iostream for using the input/output instructions.
create the main function and define the variable with value. Then,
use the formula to calculate the circumference and are of circle.
[tex]circumference = 2*\pi *radius[/tex]
[tex]area = \pi * radius^{2}[/tex]
here, choose [tex]\pi = 3.14[/tex]
after that, display the result.
Note: All variable define in float type.
write a pseudocode statement that generates a random number inthe range of 1 through 100 and assigns it to a variable namesrand.
Answer:
srand(time(NULL));
int namesrand = rand() % 100 +1;
Explanation:
srand() is the function which is used for seeding the rand() function.
it defines the starting point different in whenever rand() function executes. Therefore, rand() generate the output different in every execution.
rand() is the function that generates the random number within the range.
for example;
rand() % 20
it generates the random number within the range [0,20).
NOTE: 20 not included in the range and zero is included.
similarly, generate the number between 0 to 99.
rand() % 100.
so, if we add the generated number by one then it ranges become 1 to 100 both included.
When you create an array variable, memory space is automatically reserved.
True
False
Answer:
The answer is true.
Explanation:
An array is a collection of data of the same type. It is used to handle a number ''n'' of elements in common, either of types defined by the language ( int, float, string, etc) as well as those defined by the programmer.
A one dimensional array is a structured data type that is made up of a finite, ordered collection of data of the same type.
A vector, also called a one dimensional array, is a data structure that allows you to group elements of the same type and store them in a single block of memory together, one after the other. This group of elements is identified by the same name and the position in which they are found. Ther first position of the array is position zero.
We could group in an array a series of elements of integer type, floating, etc. For example:
int a [5]; (vector of 5 integers)
float b[5]; (vector of 5 floating)
int a [] = {5,6,7,8,9};
float b [] = {5.1,5.2,5.3,5.4,5.5};
Since there are 5 elements in each array, automatically 5 memory spaces will be assigned to each vector, but if I try to create the vector of the form int a [], the compiler will show an error, because I did not indicate the size of the vector and I did not initialize its elements.
When designing a database, what should your first step be?
A. Clearly define the purpose of the database.
B. Divide data into tables that don't duplicate data.
C. Specify table relationships.
D. Choose the primary key for each table.
Answer:
Option A is the right answer. When designing a database the first step is to clearly define the purpose of database. What are the primary goals you want to achieve by building a database for a specific purpose. There are various methods of defining core purpose of database design.
Explanation:
As we understand defining purpose of database is the first step in database development, followed by series of steps to accomplish a database for required purpose.Requirement analysis/ elicitation defines the purpose of a database.Requirement analysis help us finding and organizing the information required i.e. purpose-the foremost step, to build a database.Gather the required information and group/ divide that information into tables.Select the unique identifier in each table to make it primary key.Set up and specify table relationships i.e one-to-one, one-to-many etc.Answer details
Grade: College
Subject: Computers and Technology
Chapter: Database Design
Keywords: designing database, relations in database, primary key etc
Final answer:
The correct answer is "clearly define the purpose of the database". The first step in designing a database is to clearly define its purpose, which guides all other design decisions such as table organization, relationships, and primary keys.
Explanation:
When designing a database, the first step should always be to clearly define the purpose of the database. This involves understanding its main functions, the kind of data it will contain, and how that data will be used. It's essential to document the purpose of the database, its anticipated users, and the ways in which it is expected to be utilized. This foundational step is critical for guiding subsequent design decisions, such as data modeling, establishing table relationships, and choosing primary keys.
After the purpose is defined, the next steps involve organizing the data efficiently. This includes dividing data into tables to minimize redundancy and establishing table relationships to link related data effectively. Defining primary keys for each table is another crucial step to ensure that each record can be uniquely identified, thus maintaining data integrity and facilitating data retrieval.
Every dimensional model is composed of one ---------tableo Centralo Parallelo Verticalo Horizontal
Answer: Central
Explanation: Dimensional model is the model that is created for the requirement of analysis of a particular business such as data warehouse. It is usually referred as the fact table as well. Dimensional model has one major table known as central table and multi-part tables connected with it.The combination of the smaller tables are known as the dimension tables also.
What are the key technological trends that heighten ethicalconcerns?
Answer:
Key technological trends that heighten ethical concerns are as following :-
1. Declining Storage Costs.
2. Data Analysis Techniques.
3. Doubling of computer power.
4. Networking advances and the internet.
Explanation:
Declining Storage costs-It means that data storage capacity has increased over the years and costs is reduced accordingly.Massive data storage systems are cheap and easily available so local retailers also can have the customers details stored in their systems.
Data Analysis Techniques:-Due to advances in data analysis the companies are able to find much detailed personal information of a person.
Doubling of computer power:-Computer power is doubled every 18 months.We are much more dependent upon the systems and are vulnerable to system errors.
Networking advances and the internet:-People are addicted to internet now a days and there are that they can provide their personal information to any phishing website or mails.
Define the primary IT roles along with their associated responsibilities.
Answer:
some of the IT roles are network maintenance, network administration, researchers, scientist, technical supports, application development.
Their roles are maintaining IT infrastructure, develop applications recruit staffs, management.
Explanation:
They should be proficient in establishing IT services and security policies, should be able to recruit staff members, know the project management rules and budget management and customer relationships and establishing establishing.
Assume that x is an integer variable. Which of the following represents the memory address where x is stored? E) None of the Above A) x B) &x C) *x D) 2**
Answer: (B) &x
Explanation:
Here whenever any variable is stored let it be integer, char, float it is always stored in a memory location assigned as '&'. Here the location where x is stored is denoted as '&x' which means memory address of x. *x means the pointer which is pointing to the memory address of x.
Write a 'C' program that contains two arrays: one that containsthe name of the months, another that contains the number of days ineach month.You should hard -code the month names and number ofdays in each month when you initialize the arrays(don't need toprompt the user for input). Then, use loop to iterate through thearrays and printout each month and the number of days in themonth.
Answer:
#include<stdio.h>
//main function
int main(){
//initialization of variable
char arr1[12][12] = {"January","February","March","April","May","June","July","August","September","October","November","December"};
int arr2[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int i,j;
//for loop for print the arrays
for(i=0;i<12;i++){
for(j=0;arr1[i][j]!='\0';j++){
printf("%c",arr1[i][j]); //for print the months
}
printf(" %d",arr2[i]); //print the days
printf("\n"); //for newline
}
return 0;
}
Explanation:
Create the main function and then define the two array with hard-code the month names and number of days in each month.
For defining the string array, you have to take the 2-D array of type 'char'.
then, take nested for loop for print the element in the array.
nested for loop means, loop inside a loop. It is used for the 2-D array. The outer loop is for row and the inner loop is for the column.
For every row, the inside loop print the string character by character with the help of printf() function which is used to display the value on the screen.
after the inner loop terminates, then another prinf() function is used for print the days after the name of the month. Then. the outer loop runs again.
This is process continues until the outer loop not terminate and finally, we get the desired output.
Which definitionmatches the term "induction"?
a- Reasoning from specific evidence to a general conclusion
b- Reasoningfrom a generalization to a specific conclusion
c- Reasoning from a vivid personal narrative
d- Reasoningfrom a variety of evidence
Answer:
a- Reasoning from specific evidence to a general conclusion
Explanation:
Induction is reasoning from specific evidence to a general conclusion.
Why transport layer is usingconnectionless services if network layer is providing connection oriented services?
Answer:
Transmission Control Protocol
Explanation:
Transmission Control Protocol is using connectionless services if network layer is providing connection oriented services.
What does the /etc/shadow file contain?
Answer:
This file contains encrypted password and other information also such as password expiration values,account and other confidential stuff etc.
Explanation:
In linux this file contains passwords and confidential stuff.
This file is only readable that to by the root account and hence it is secured.
Why procedures are used and what must be the lastexecutable instruction in a
procedure?
Answer:
Procedure are used to create and modifying the programs. Basically, it is grouping of instruction that can be used give direction of the flow of program. Control are given to the next term once the execution of the instruction get over. The steps of procedure are:
procedure are first executed the declaration instruction and then coding the procedure, then it will return to the directories and the last executable instruction is the termination of procedure.
Draw a full binary tree of height 2. How many nodes does it have?
Answer:
The number of nodes in a full binary tree of height 2 = 7
Explanation:
At each level k, of the full binary tree there are usually [tex]2^{k} \\[/tex] nodes.
So the full binary tree of height 2 has nodes= [tex]2^{0} \\[/tex] + [tex]2^{1} \\[/tex] + [tex]2^{2} \\[/tex].
which is 7.
A full binary tree of height 2 consists of 7 nodes, including the root and two additional levels of nodes, with each level doubling the number of nodes from the previous level.
Explanation:A full binary tree of height 2 has a total of 7 nodes. The definition of a full binary tree means that every node has 0 or 2 children. Given that the height (the longest path from the root to a leaf) is 2, this means there are 2 levels below the root. On level 1 (just below the root), there would be 2 nodes (since a full tree must have either 2 or 0 children). On level 2, each of those two nodes from level 1 would themselves have two children, adding 4 more nodes for a total of 6 nodes beneath the root. Including the root itself, which is level 0, brings the total number of nodes to 7.A full binary tree of height 2 has a root node connected to two child nodes, and each child node is connected to two more child nodes. So, the tree has a total of 7 nodes.
Use the SAS dataset insure to create a dataset, work.insure10, that (a) only reads in the variables Name, Policy, Company, PctInsured, and BalanceDue (b) only outputs records where PctInsured is less than 100 (c) only outputs the variables Name and BalanceDue Print the resulting dataset
how to make secure emailcompatabil with other email system??
Answer:
To make secure email compatible with other email system as, as we know that secured email is compatible in all ways and also it provides good flexibility. So, emails should prioritize the maximum security and a strong encryption and convenience to use like user friendly apps on all their device.
There are some factors which provides a secure email as:
EncryptionPrivacyServer locationJurisdictionAuthentication
Write the definition of a function printLarger , whichhas two int parameters and returns nothing. The functionprints the larger value of the two parameters to standard output ona single line by itself.
Answer:
void printLarger (int num_1, int num_2){
//if else statement for checking the condition
if(num_1 > num_2){
cout<<num_1<<endl; //display the output
}else if(num_1 < num_2){
cout<<num_2<<endl; //display the output
}
}
Explanation:
Create the function with return type void, it means the function returns nothing.
The number will be large if it less than the second number.
The possible condition are:
1. number_1 > number_2: the number_1 will be large.
2. number_1 > number_2: the number_2 will be large.
In the programming, if-else is the conditional statement which is used for checking the condition and gives the output accordingly.
Syntax:
if(condition){
statement;
} else if(condition){
statement;
}
when the program executes the if statement checks if condition number_1 > number_2 is true or not if true then print the output.
if the condition false, then the program control move to the else if part and then checks the condition if the condition true then print the output.
Which object waits for and responds toan event from a GUI component?
buttonlistener
GUIlistener
action eventlistener
windowlistener
Answer:
The answer is action eventlistener
Explanation:
It is an event handler and it is easy to implement.In java we call them even listeners it is function or a sub routine or a procedure that waits for an event to occur and respond to an event from a GUI component.
How Extreme Programming addresses Software Testing andevolution ?
Answer:
Extreme programming is a software development technique which is used to enhance software quality and it's response to ever changing customer requirements.
Testing
Testing is main focus in extreme programming.Extreme programming addresses testing in a way that if a minute testing can eliminate a bit of flaws, extensive testing can terminate a lot of flaws.
Evolution in Extreme programming is like this:-
Coding:-First programmers will code the problem.
Testing :- Testing is done to remove flaws.
Listening:- Programmers must listen to the customers to what they need.
Designing:-Then design according to the customer needs.
The instruction set is of _____________ importance ingoverning the structure and function of the pipeline.
a Least
b Primary
c Secondary
d No
Answer: a) Least
Explanation: Pipelining is the process where multiple instruction are to be processed in a parallel way . The most important steps in this process include step like fetching the instruction, decoding it, executing ,reading the instruction and writing it to the memory. So,instruction set is not a very important in the structure of the pipeline.
What Is the measurement value?
Answer:
The measurement value is the value given by a measuring instrument and the true value is the actual value of the property being measured.
Explanation:
Where there is a collision we try to find some otherplace in our array. This approach is calld.
a) open addressing
b) closed hashing
c) open addressing and closed hasing
d) none of the aboe.
Answer:
a) open addressing
Explanation:
Where there is a collision we try to find some other place in our array. This approach is called, open addressing.
Open addressing is where you talk about a problem or situation freely.
Where there is a collision we try to find some otherplace in our array. This approach is calld.
a) open addressing
b) closed hashing
c) open addressing and closed hasing
d) none of the aboe.
The ____ operation is used to add an element onto the stack.
A.
push
B.
pop
C.
add
The class at the top of exception class hierarchy is ..........................
A) ArithmeticException
B) Throwable
C) Class
D) Exception
Answer:
B) Throwable
Explanation:
Great question, it is always good to ask away and get rid of any doubts that you may be having.
There are a wide range of classes on the exception class hierarchy. All the way on the top is the Objects Class but since that is not an available answer we will move on to the next one. The next one is the Throwable class. therefore that is the answer.
**Exception is after Throwable , and Arithmetic Exception is at the bottom.... everything is a class so that is not a part of the hierarchy **
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
Write assignment statements that perform thefollowing operations with the variables a, b, and c.
a) Adds 2 to a and stores theresult in b.
b) Multiples b times 4 andstores the result in a.
c) Divides a by 3.14 and storesthe result in b.
d) Subtracts 8 from b andstores the result in a.
Answer:
An assignment statement's overall syntax is-
variable = expression ;
Where the variable must be declared; the variable may be a simple name, or an indexed location in an array, or an object's field (instance variable) or a class static field; and the expression must result in a value that is compatible with the variable type. In other words, it must be feasible to cast the expression to the variable type.
Examples: int i =4;
a) b=(a+2);
(a+2) is the expression for adding 2 to a, whereas b equal to the result of (a+2).
b) a=b*4;
(b*4) is the expression for multiples b times 4,whereas a equal to the result of (b*4)
c) b=(a/3.14)
(a/3.14) is the expression for divides a by 3.14,whereas b equal to the result of (a/3.14)
d )a=(b-8)
(b-8) is the expression for Subtracts 8 from b,whereas a equal to the result of (b-8)
Create a function names minElement() that takes an array of numbers as a paaramter and returns the min value of the array. The array may not be modified by the function. The array method .sort() may not be used. The function must loop through the array
Answer:
#include<iostream>
using namespace std;
//create the function
int minElement(int arr[],int n){
int minimum = arr[0]; //store the first value of array
//for loop for iterate the each element
for(int i=0;i<n;i++){
if(arr[i]<minimum){ //compare
minimum=arr[i];
}
}
return minimum;
}
int main(){
int arr[]={4,1,7,9,2,6};
int array_size = 6;
int result = minElement(arr,array_size); //calling
cout<<"The min value is: "<<result<<endl;
}
Explanation:
First include the library iostream in the c++ programming for input/output.
then, create the function minElement() for find the minimum value in the array.
it required the one loop for iterate the each element in the array and then compare with first element in the array which is store in the variable minimum.
if array element is less than the minimum then, update the value in the minimum variable.
after complete the loop, return the result.
for capture the result create the main function and call the function with parameter array.
and finally display the result.