Answer:
Number of parameters.
Explanation:
The function is a block of the statement which performs the special task.
Syntax:
type name(parameter_1,parameter_2,...){
statement
}
we can define any number of function in the code and also with the name as well.
But when we define the function with same name the number of parameter define in both function must be different.
for example:
1. int print(int a){
statement;
}
2. int print(int a, int b){
statement;
}
first has one parameter and second has two parameters.
Both are valid in the code.
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.
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.
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.
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)
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.
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.
What is a trap instruction? Explain its use in operating systems.
Answer:In operating system,trap instruction is synchronous interrupt which arises due to occurrence of exceptional conditions.
Explanation:Trap instructions are the synchronous interrupt or exception . It may arise due to reasons like invalid memory access ,term division by zero etc. Trap instruction is a software invoked interrupt and it is type of a call which transfers the control synchronously. It is also a way of switching into the Kernel mode in which the operating system take some steps before returning the control to the main process .
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.
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.
Whatis meant by Translation Lookaside Buffer?
Answer:
A translation lookaside buffer (TLB) is a memory stash that decreases the time it takes to access a user memory location. TLB includes the most lately used page table entries.
TLB is used to overcome the issue of sizes at the time of paging. PTE is used for framing the memory ,but it uses two references one for finding the frame number and the other for the address specified by frame number.
PTE-page table entry
You can use______ in order to allow the user to browse and find a file at run time.
a. the OpenFileDialog common dialog control
b. the StreamReader object
c. the OpenDialog control
d. a hard-coded path name
Answer: the OpenFileDialog common dialog control
Explanation:
To browse and select a file on a computer during run time we use OpenFileDialog control. For this we have an OpenFileDialog class and we can create an instance of this class.
The OpenFileDialog common dialog control is used to browse and find a file at run time
A database is a collection of ________ data.
A. reported
B. queried
C. object
D. related
Answer:
D. related
Explanation:
A database is a collection of related data.
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.
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:
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.
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.
How canwe measure the refresh rate of the CRT, Stereo Devices and LCD? Ifrefresh rate measurement of anyone is not possible then explainwhy?
Answer:
Refresh rate means how many times the image on the screen is redrawn in a second.It is measured in hertz.
We can measure refresh rate of all of the devices listed in the question.
CRT Refresh rate measurement:-
The refresh rate can be measured by dividing the scanning rate by count of horizontal lines multiplied by 1.05.
Stereo Devices Refresh Rate measurement:-
When LCD's are used for stereo 3 D displays, the refresh rate is divided by 2, because we have two eyes and each one needs a distinct picture. For this reason,it is suggested to use a display of at least 120 Hz refresh rate, because on divided by 2 this rate is 60 Hz.For example 70 Hz non-stereo is 140 Hz stereo, and 80 Hz non-stereo is 160 Hz stereo.
LCD Refresh rate measurement:-
Refresh rate of a LCD is the number of times per second in which the data it is being redrawn by the display.
Which of the following are valid calls to Math.max? 1. Math.max(1,4) 2. Math.max(2.3, 5) 3. Math.max(1, 3, 5, 7) 4. Math.max(-1.5, -2.8f) A. 1, 2 and 4 B. 2, 3 and 4 C. 1, 2 and 3 D. 3 and 4
Answer:
1, 2 and 4
Explanation:
the Math.max() is the function in java which is used to compare the two values and it gives the maximum of two values.
it take only two argument and the data type can be int, float etc.
Math.max(1,4): it takes two int values and give the output 4. it is valid call.
Math.max(2.3, 5): it takes two values and give the output 5.0. it is valid call.
Math.max(1, 3, 5, 7): it takes 4 values which is wrong because function takes only two variables. it is not valid call.
Math.max(-1.5, -2.8f): it takes two values and give the output -1.5. it is valid call.
Final answer:
All provided calls to the Math.max function in Java are valid. The function can handle two or more numbers of various types by implicitly converting them to the appropriate type for comparison.
Explanation:
The Math.max function in Java is used to find the highest value among its arguments. The method accepts either two int, long, float, or double arguments or a variable number of arguments of one of those types. Therefore, all the calls to Math.max provided in the question are valid:
Math.max(1,4) - Compares two integers.Math.max(2.3, 5) - Compares a double and an implicitly converted integer to double.Math.max(1, 3, 5, 7) - Uses varargs to compare multiple integers.Math.max(-1.5, -2.8f) - Compares a double and a float (the float is converted to double).Based on this information, the correct answer is C. 1, 2, and 3 are valid calls to Math.max.
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 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.
The ____ operation is used to add an element onto the stack.
A.
push
B.
pop
C.
add
if (quotaAmt > 100 || sales > 100 && productCode == "C")
bonusAmt = 50;
When the above code is executed, which operator is evaluated first?
a.
||
b.
==
c.
=
d.
&&
Answer:
==
Explanation:
Operator precedence, it tells about the flow of operator execution o which operator execute first and which execute last.
'==' > '&&' > '||' > '='
According to precedence table,
the equal equal operator '==' comes first. so, it execute first and then NOT operator, then OR operator and finally equal operator.
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.
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.
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
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.
Write a recursive function that returns true if the digits of a positive integer are in increasing order; otherwise, the function returns false. Also, write a program to test your function.
Answer:
C code implementing the function:
#include<stdio.h>
int isIncreasing(int m);
void main()
{
int y, t;
printf("Enter any positive integer: ");
scanf("%d", &y);
t= isIncreasing(y); //call the functoion isIncreasing(int m)
if(t==1) //if isIncreasing(int m) returns 1, then the digits are in //increasing order
printf("True: The digits are in increasing order");
else
printf("False: The digits are not in increasing order");
}
int isIncreasing(int m)
{
int d1,d2;
if(m/10==0) //if we reach till the left of left most digit, then all before //digits were in order. else it won't go upto that.
{
return 1;
}
d1 = m%10; //d1 holds the right most digit of current m.
if(m%10 !=0)
{
m = m/10; //m is updated to find the rest digits and compare //them.
d2 = m%10;//d2 holds the digit just left of the right most digit of //m.
if(d2 <= d1) // if the right most and it's left digits are in order then //we proceed to left.
{
isIncreasing(m);
}
else //else we stop there itself, no need to move further.
return 0;
}
}
output is given as image.
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.
An analog signal maintains a constant signal level for a period of time, then abruptly changes to a different constant level.
a) True b) False
Answer:
b) False
Explanation:
An analog signal does not maintain a constant signal level for a period of time, then abruptly changes to a different constant level.