Find the second largest and second smallest element in a given array. You can hardcode/declare the array in your program.

Answers

Answer 1

Answer:

Program for Second largest in an array:-

#include <bits/stdc++.h>

using namespace std;

int main()

{

    int f,s,n; //declaring 3 variables f for first largest s for second largest n is size.

    cin>>n;//taking input size of the array.

    if(n<2)//n should be greater than 2..

    cout<<"n should be greater than 2"<<endl;

    int a[n];// array of size n.

    for(int i=0;i<n;i++)

    {

        cin>>a[i];

    }

   f = s = INT_MIN;//initialising f and  s with minimum value possible.

   for (int i =0; i <n;i ++)  

   {  

       if (a[i] > f)  

       {  

           s = f;  

           f = a[i];  

       }  

       else if (a[i] > s && a[i] != f)  

           s = a[i];  

   }  

   if (s == INT_MIN)  

       cout<<"No second largest exists"<<endl;

   else

       cout<<"Second largest element is :"<<s;

       return 0;

}

Program for second smallest element is:-

#include <bits/stdc++.h>  

using namespace std;  

int main()  

{  

int f,s,n; //declaring 3 variables f for first smallest s for second smallest n is size.  

cin>>n;//taking input size of the array.  

if(n<2)//n should be greater than 2..  

cout<<"n should be greater than 2"<<endl;  

int a[n];// array of size n.  

for(int i=0;i<n;i++)  

{  

cin>>a[i];  

}  

f = s = INT_MAX;//initializing f and s with maximum value possible.  

for (int i =0; i <n;i ++)  

{  

if (a[i]<f)  

{  

s = f;  

f = a[i];  

}  

else if (a[i] < s && a[i] != f)  

s = a[i];  

}  

if (s == INT_MAX)  

cout<<"No second smallest exists"<<endl;  

else  

cout<<s;//it is the second smallest element...  

return 0;  

}

Explanation:

For Second largest:-

1. Declare 3 variables f, s and n. where n is size the array f is first largest and s is second largest.

2. Initialize f and s with minimum value possible.

3. Iterate over the array a and do the following steps:-

   1.If element at ith position is greater than f. Then update f and s.

   s=f and f=a[i].

   2.If the element is between s and f then update s as.

   s=a[i].

4. Print s because it is the second largest in the array.

For Second smallest:-

1. Declare 3 variables f, s and n. where n is size the array f is first smallest and s is second smallest.

2. Initialize f and s with minimum value possible.

3. Iterate over the array a and do the following steps:-

   1.If element at ith position is smaller than f. Then update f and s.

   s=f and f=a[i].

   2.If the element is between s and f then update s as.  

   s=a[i].  

4. Print s because it is the second smallest in the array.


Related Questions

Differentiate Between register and Memory location (

Answers

Answer:

Register-it contains all the instructions that are present in the processor.

Memory location- it is the particular memory address where the data is stored.

Explanation: Difference between register and memory location are as follows :-

Register are the found in the CPU internal storage and memory location is present on the RAM.Registers are faster in movement as compared to the memory location.Register has the capacity of holding of less data as compared to the memory location which can store data in large amount .

_____ means retrieve the element at the top of a stackwithout removing it.

a. Peek
b. Top
c. Push
d. Pop
e. none of the above

Answers

Answer:

A - Peek

Explanation:

The peek method retrieves the element at the top of a stack without deleting/removing it, the only exception that can occur is when the stack used is empty. It would look as follows when you use the method >> STACK.peek().

What is the output frequency for a counter circuit that contains 12 flip-flops with an input clock frequency of 20.48 MHz?

Answers

Answer:

5KHz

Explanation:

The formula for calculating the output frequency when the input frequency and the number of flip-flops are given.

[tex]out put Frequency = \frac{in put frequency}{2^{N}}[/tex]

here, N is the number of filp-flops.

Note: The input frequency must be in Hz.

first convert given input frequency (MHz) into HZ.

[tex]in put frequency = 20.48 *10^{6}Hz[/tex]

apply the formula:

[tex]out put Frequency = \frac{20.48*10^{6}}{2^{12}}[/tex]

which comes out to be 5000Hz or 5KHz.

a. Is there any functional difference between the class being instantiated in the following two ways? Balanced bal = new Balanced ("abc", "xyz"); Balanced bal = new Balanced ("cab", "zxy"); b. Is there any functional difference between the class being instantiated in the following two ways? Balanced bal = new Balanced ("abc", "xyz"); Balanced bal = new Balanced ("abc", "zxy"); c. Is there any functional difference between the class being instantiated in the following two ways? Balanced bal = new Balanced ("abc", "xyz"); Balanced bal = new Balanced ("xyz", "abc"); d. What type is pushed onto the stack? A char? An int? An integer? explain. e. Under which circumstances is the first opeation performed on the stack (not counting the new operation) the top operation? f. What happens if the string expression, that is passed to the test method, is an empty string?

Answers

Answer:

A,B,C -NO

D-Value type like int,char..

E.pop

D. it throws null exception

Explanation:

(A,B,C)There is no functional difference but  as the values passed to the parameterized constructor is different so you will get different outputs but functionality of the class didn't change  

(D) stack is a data structure which stores value types where as heap stores object types.In.stack actual value of the variable stored and heap address of the object stored

(E)the top operation on stack is always pop once we inserted the elements in a stack.if there are no elements in stack pop results null

(D) if the string we passed is null or empty to the test method it returns exception we need to handle that

Assuming vecList is a vector container, the expression ____ deletes all elements from the container.

A.
vecList.erase(position)

B.
vecList.erase(beg, end)

C.
vecList.clear()

Answers

Answer:

A. vecList.erase(position)

Explanation:

Assuming vecList is a vector container, the expression vecList.erase(position) deletes all elements from the container.

Assuming vecList is a vector container, the expression vecList.erase(position) deletes all elements from the container. Thus, the correct option for this question is A.

What is a Vector container?

A vector container may be defined as a type of sequence that significantly represents arrays that can change in size. They significantly utilize contiguous storage locations for their elements. This means that their elements can also be accessed using offsets on regular pointers to their elements, and just as efficiently as in arrays.

According to the context of this question, vecList.erase(position) is the tool of the vector container in order to delete all sorts of elements that have been expressed by the vector container.

Therefore, the expression vecList.erase(position) deletes all elements from the container. Thus, the correct option for this question is A.

To learn more about vector containers, refer to the link:

https://brainly.com/question/12949818

#SPJ5

A B-tree can be ____ in three ways: inorder, preorder, and postorder.

A.
copied

B.
reversed

C.
traversed

Answers

Answer:

traversed

Explanation:

B-tree is a self balancing tree and it is a data structure which allows insertion, deletion operations.

inorder, preorder and post order, they all are traversing algorithms in the tree data structure.

inorder: first print left, then root and then right.

preorder: first print root, then left and then right.

postorder: first print left, then right and then root.

Therefore, the answer is traversed.

Write a program that sorts an array of 10 integers using bubble sort. In the bubble sort algorithm, smaller values gradually “bubble” their way upward to the top of the array like air bubbles rising in water, while the larger values sink to the bottom. The bubble sort makes several passes through the array (of 10 items). On each pass, successive pairs of elements are compared. If a pair is in increasing order (or the values are identical), we leave the values as they are. If a pair is in decreasing order, their values are swapped in the array. The comparisons on each pass proceed as follows—the 0th element value is compared to the 1st, the 1st is compared to the 2nd, the 2nd is compared to the third, ..., the second-to-last element is compared to the last element.

Answers

Answer:

#include<iostream>

using namespace std;

int main(){

   //initialization

  int arr1[10] = {2,4,6,1,7,9,0,3,5,8};

  int temp;

   int size_arr;

   //nested for loop

  for(int i=0;i<size_arr-1;i++){

   for(int j=0;j<size_arr-i-1;j++){

       if(arr1[j]>arr1[j+1]){ //compare

               //swapping

           temp = arr1[j];

           arr1[j]=arr1[j+1];

           arr1[j+1]=temp;

       }

   }

  }

  //display the each element

  for(int i=0;i<10;i++){

   cout<<arr1[i]<<" ";

  }

    return 0;

}

Explanation:

Create the main function and declare the variable and defining the array with 10 values.

take the nested for loop, nested loop means loop inside another loop.

the outer loop traverse in the array from 0 to size-1.

and inside loop traverse from 0 to size -i-1, because for every cycle of the outer loop the one element is sorted at the end. so, we do not consider the element from the last for every cycle of the outer loop. That's why (size-i-1)

In the bubble sort, the first element compares with the second element and if the first id greater than the second then swap the value. so, for the above algorithm, we take the if statement and it checks the condition if the condition becomes true then the swap algorithm executes.

we take a third variable for swapping. after that, if the outer loop condition false it means all elements will traverse and then the loop will terminate.

and finally, take another for loop and display the output.

Final answer:

The answer provides a Python program example that uses the bubble sort algorithm to sort an array of 10 integers. The program defines a function, bubble_sort, which sorts the array in ascending order and then prints the sorted array.

Explanation:

To sort an array of 10 integers using the bubble sort algorithm, you can use the following program as a reference. Bubble sort compares adjacent elements and swaps them if they are in the wrong order. Here's a basic example in Python:

def bubble_sort(arr):
   n = len(arr)
   for i in range(n):
       swapped = False
       for j in range(0, n-i-1):
           if arr[j] > arr[j+1]:
               arr[j], arr[j+1] = arr[j+1], arr[j]
               swapped = True
       if not swapped:
           break
   return arr

# Example array:
numbers = [64, 34, 25, 12, 22, 11, 90, 88, 66, 23]
sorted_numbers = bubble_sort(numbers)
print("Sorted array is:", sorted_numbers)

This program will sort the given array of integers in ascending order. The function bubble_sort takes an array as input, performs the bubble sort algorithm, and returns the sorted array.

What field would you use to store a value from another table?

A. Lookup
B. Hyperlink
C. Memo
D. AutoNumber

Answers

Answer:

A. Lookup

Explanation:

You would use the Lookup field to store a value from another table.

How do you write a computer program to convert a decimal number into binary, octal, and hexadecimal?

Answers

Answer:

#include <iostream>

using namespace std;

void hexadecimal(int dec)

{    

   char hexa[100];// character array to store hexadecimal number.

   int i = 0;

   while(dec!=0)

   {  

       int digit  = 0;

       digit = dec % 16;// storing remainder.

       if(digit < 10)//condition

       {

           hexa[i] = digit + 48;//storing digit according to ascii values.

           i++;

       }

       else

       {

           hexa[i] = digit + 55; //storing respective character according to ascii values..

           i++;

       }

       dec = dec/16;

   }

     cout<<"The corresponding Hexadecimal number is :- ";

   for(int j=i-1; j>=0; j--)// printing in reverse order .

       cout << hexa[j];

       cout<<endl;

}

void Binary(int dec)

{

   int bin[32];// integer array to store binary values.

   int i = 0;

   while (dec > 0) {

 

       bin[i] = dec % 2;// storing remainder

       dec = dec / 2;

       i++;

   }

 cout<<"The corresponding Binary number is :- ";

   for (int j = i - 1; j >= 0; j--) // printing in reverse order

       cout << bin[j];

       cout<<endl;

}

void Octal(int dec)

{

   int oct[100];// integer array to store octal values.

   int i = 0;

   while (dec != 0) {

       oct[i] = dec % 8;// storing remainder

       dec = dec / 8;

       i++;

   }

 cout<<"The corresponding Octal number is :- ";

   for (int j = i - 1; j >= 0; j--) // printing in reverse order

       cout << oct[j];

       cout<<endl;

}

int main() {

   int d,bin,oct,hex;

   cout<<"Enter decimal number"<<endl;

   cin>>d;//taking input.

   Binary(d);

   Octal(d);

   hexadecimal(d);

   return 0;

}

OUTPUT:-

Enter decimal number

10

The corresponding Binary number is :- 1010

The corresponding Octal number is :- 12

The corresponding Hexadecimal number is :- A

Enter decimal number

256

The corresponding Binary number is :- 100000000

The corresponding Octal number is :- 400

The corresponding Hexadecimal number is :- 100

Explanation:

I have built 3 function of type void Hexadecimal,Binary,Octal all the functions take decimal integer as argument.They print their respective number after conversion.

So main approach is that :-

1.Take an array to store the digit on dividing.

2.Find the remainder on dividing it by corresponding number (for ex:- if binary divide by 2).

3.Store each remainder in the array.

4.Divide the number until it becomes 0.

5.Print the array in reverse.

Which of the following is categorized as an indirect payment
portion of employee compensation?
a. Wages
b. Salaries
c. Employer-paid insurance
d. Commissions

Answers

Answer:    C. Employer-paid insurance

Explanation:  Employees can receive benefits i.e. financial payments in two ways, direct and indirect payments. Direct financial payments are all those paid directly by the employer to the employee, which means the employee can use those payments immediately after payment, such as wages, salaries, various bonuses, commissions, etc. Indirect benefits are all those paid by the employer to an employee from which the employee will benefit during or after a fixed period of time. These are, for example, life, health, so all kinds of insurance, paid holidays, pension funds, etc.

Draw directed graphs representing relations of the following types.
(a) Reflexive, transitive, and antisymmetric.
(b) Reflexive, transitive, and neither symmetric nor antisymmetric.

Answers

Answer:

The first graph in the picture describes a relation that is (a) Reflexive, transitive, and anti-symmetric.

Because a, b, c, d all are related to itself, so reflexive.

where (a, b) and (b, d) are in the relation, (a,d) is in the relation,    

for (c,a) and (a,b) there is (c,b).

so it's transitive.

for all a,b in the relation, (a,b) there is no (b,a) with a ≠b.

The second graph in the picture describes a relation that is (b) Reflexive, transitive, and neither symmetric nor anti-symmetric.

Because a, b, c, d all are related to itself, so reflexive.

where (a, b) and (b, a) are in the relation, (a,a) is in the relation,                                                    

where (c, d) and (d, d) are in the relation, (c,d) is in the relation,                                                    

so it's transitive.

Because, (a,b) and (b.a) are there, but for (c,d) there is no (d,c) in relation.

So, the relation is not symmetric.

(a,b) and (b,a) is in relation but, a≠b, so not anti symmetric.

Explanation:

For all a in a set,  if (a,a) in a relation then the relation is reflexive.

For all (a,b) in relation R, if (b,a) is also in R, then R is symmetric.

For all (a,b), (b,c) in relation R, if (a,c) is also in R, then R is transitive.

For all (a,b), (b,a) in R, a = b,  then R is an anti- symmetric relation.

difference between global and local variables

Answers

Answer:

Global variables:

1. It is declare outside of all functions.

2. Cannot be declare the two global variable with same name.

3. It can be used in any where in the program, the is no problem with scope.

Local variables:

1. It is declare inside the functions.

2. Can be declare the two or more local variable with same name in the different functions.

3. It is available until that functions are executed.

Explanation:

Global variables are declare outside of all function,, we can access that variable anywhere in the program

for example:

int num = 10;

int main(){

statement;

fun(){

statement;

}

}

The variable is outside of all functions. So, it is a global variable.

It is not declare in the function or block, this is reason it has no problem with availability. it is available until the program is executed.

Other side, local variable is declare in the function.

for example:

int main(){

int num = 10;

statement;

fun(){

int num = 10;

statement;

}

}

Here, the  variable num is local variable and it can be more than one time with same name but in the different function.

it is available untill that function executed.

What is output when the CarTest application is run? Why?
public class Car {



private String color;

private int numWheels;



public Car(String color, int numWheels) {

this.color = color;

this.numWheels = numWheels;

}



public String getColor() {

return color;

}



public void setColor(String color) {

this.color = color;

}



public int getNumWheels() {

return numWheels;

}



public void setNumWheels(int numWheels) {

this.numWheels = numWheels;

}

}

public class CarTest {

public static void main(String[] argvs) {



CarTest carTest = new CarTest();

carTest.runDemo();

}



public void runDemo() {

Car c = new Car("blue", 4);

changeColor(c, "red");

System.out.println(c.getColor());

}



public void changeColor(Car car, String newColor) {

car.setColor(newColor);

}

}

What is output when the CarTest application is run? Why?

Answers

Answer:

red

Explanation:

public class CarTest {

public static void main(String[] argvs) {

//below line will create an object of CarTest class Object

CarTest carTest = new CarTest();

//This will call runDemo method

carTest.runDemo();

}

public void runDemo() {

//Below line will create an object of Car class  with color blue and 4 wheel

Car c = new Car("blue", 4);

//Bellow Line will change the color from blue to red, see the logic writteen in chnageColor method definition

changeColor(c, "red");

//Below line will print the color as red

System.out.println(c.getColor());

}

public void changeColor(Car car, String newColor) {

//This line will set the color as passed color in the car object

car.setColor(newColor);

}

}

What is ment by WCF services in asp.net?How does it help in creating web pages?

Answers

Answer:

WCF -  Windows Communication   Foundation

Explanation:

WCF stands for Windows Communication   Foundation.

The first version of WCF is released as   a part of .NET 3.0.The later versions are 4.0 and   4.5.

WCF is used to build distributed applications.   Distributed application is an application that where   parts of it run on two or more systems.  

For example,  

We have a web application running on one server. If   this web application is consuming a web server   which is running on another server, then this  

application is called distributed application.

The programmers can also build 3-tier web   application. The 3-tiers are,

          1. Presentation tier

          2. Business tier

          3. Data Access tier

If all 3 tiers are deployed on same machine,   scalability can be an issue, if more number of users   try to access the application.  

If we deploy each tier on different machines, then it   can handle multiple requests without degrading   performance of an application.

WCF is also used to build interoperable applications.  An interoperable application is an application where   one application can communicate with any other   application that is built on any platform.

So, the two advantages of using WCF are:

An enterprise application can use the services  

provided by other.  

we can have better scalability.  

Earlier, we used to have web services and .NET   Remoting to build distributed applications.  

Web service was used to exchange messages in   XML format using HTTP protocol. A .NET remoting was used to exchange messages   in binary format using TCP protocol.

Microsoft unified these communicating technologies   and named it as WCF.

The condition that is tested by a while loop must be enclosed in parentheses and terminated with a semicolon



True False

Answers

Answer:

False

Explanation:

while loop is used to execute the statement again and again until the condition is TRUE.

Syntax:

initialization;

while(condition)

{

   statement;

}

we write condition within the parentheses but without terminate with the  semicolon.

Therefore., the answer is False

A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. How many bits are needed for the opcode?

Answers

Answer:

8 bit

Explanation:

we have given that the instruction consist 150 different operation

we know that [tex]2^{8}[/tex] = 256

but we have only 150 operation

so now we check [tex]2^{7}[/tex]=128

which is less than 150 so we need 8 bit for the opcode

so the 8 bit are needed for the opcode because when we take 7 bit then [tex]2^{7}[/tex]=128 which is less than 150 and not useful so we need 8 bit

The Windows 8 file management interface is called _____.

A. Windows Manager

B. File Browser

C. File Manager

D. File Explorer

Answers

Answer:

D. File Explorer

Hope that helps!

Indirect recursion requires the same careful analysis as direct recursion.

True

False

Answers

Answer: True

Explanation: Direct recursion is the process when a function call for itself and indirect recursion is the recursion process where a function calls another function and the result driven is the actual function . The aim of both the recursion process to provide with appropriate result by calling function so this declares that both the process indirect and direct recursion requite same careful analysis .

The following JavaScript program is supposed to print: 1 by 4 by 9
on a single line by itself. Unfortunately the program contains at least eight mistakes. Write the corrected line beside the line in error.

var N; // Text
N := 1;
document.writeln( N );
document.writeln( “ by “);
document.writeln( “N + 3”);
document.writeln( “ by “ );
document.writeln( N + 5);

Answers

Answer:

var N; // Text

N = 1;

document.write( N );

document.write(" by ");

document.write(N + 3);

document.write(" by ");

document.write(N + 8);

Explanation:

var N; // Text

N = 1;

document.write( N );

document.write(" by ");

document.write(N + 3);

document.write(" by ");

document.write(N + 8);

__________ involves determining what qualities are to beused to perform project activities.

Resource planning
Cost estimating
Cost budgeting
Cost control

Answers

Answer:

Cost Budgeting

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

The answer to this question is Cost Budgeting the keyword in the sentence that verifies this is "qualities". Cost Budgeting is the process of determining were to spend less money or more money, based on importance. In other words determining the which quality of product is better for the overall project activity.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

An expression tag contains a scripting language expression thatis evaluated.TrueFalse

Answers

Answer: True

Explanation:

Yes, an expression tag contains a scripting language expression that is evaluated. As, expression tag is used to display the output of the data in the generated page. If data is placed in expression tag then, it prints on the output stream and then it automatically convert data into the string and the output are displayed.

The general case in a recursive function is the case for which the solution is obtained directly.

True

False

Answers

Answer: False.

Explanation:

The general case of recursive function is when the solution is obtained recursively by simplification at each step.

However, it is the base case in a recursive function when the solution is obtained directly.

The general case must be reducible to base to arrive at a solution else the recursion would be a infinite recursion.

What is the difference between a sequential access tile and a random access file?

Answers

Answer: Sequential access file enables the computer system to read or write file in sequential manner whereas random access file enables to read or write randomly in a data file.

Explanation:

Sequential file access is faster than random file access, however random access uses index searches. In random access higher number of seek operations are involved whereas in sequential access the number of seek operation is less.

what are the elements of a Software Process Improvement (SPI) modle?

Answers

Answer: Current Situation Evaluation, Improvement Planning, Improvement Implementation, Improvement Evaluation are the elements of SPI

Explanation:

SPI modle plans to achieve a desired task of software development in terms of Current Situation Evaluation, Improvement Planning, Improvement Implementation, Improvement Evaluation, with each having a specified and detailed role to play in the software development.

What is the minimum valid subscript value for array a?
#define MAX 50
int a[MAX], i, j, temp;
A. 0
B. 1
C. Any negative number
D. There is no minimum
E. None of the above

Answers

Answer:

The answer to this question is A. 0.

Explanation:

In this segment of code #define MAX 50 is used.It is a pre-processor directive and in pre processor directive it is a MACRO means whenever the compiler encounters the word MAX in the execution it replaces MAX with 50.

So the size of the array becomes 50 and the indexing starts from 0 and upto 49.

What would display if the following pseudocode was coded and executed? Declare String user = "Martha and George" Declare Integer number Set number = length(user) Display number

Answers

Answer:

 17

Explanation:

length() is the function which is used to find the number of character the string.

character include space as well.

initially declare the string user with input  "Martha and George".

then call length function which count the character within the double quotes""

total number is 17 (15 letters and 2 spaces).

and it then store in the integer.

finally print the value.

Therefore, the output is 17.

What will be the value of input_value if the value 5 is input at run time?
cin >> input_value;
if (input_value > 5)
input_value = input_value + 5;
else if (input_value > 2)
input_value = input_value + 10;
else
input_value = input_value + 15;

Answers

Answer:

15

Explanation:

The if else state is used for checking the condition and if the condition is TRUE and program can execute the statement  within the if else.

Initially input_value is 5

then the if statement check the condition 5>5, condition FALSE because 5==5

it not less than 5.

then program move to else if and check condition 5>2, condition TRUE.

then, input_value = 5 + 10=15 execute and update the value to 15.

After that, program terminate the if else statement.

Therefore, the answer is 15.

The update expression of a for loop can contain more than one statement, e.g. counter++, total+= sales



True False

Answers

True.

Update expression conditions the iterations of a for loop. Counter++ is the most basic form of use, but others like total += sales are also valid.

Hope this helps.

r3t40

Imagine you want to clean up your database and decide to delete all records from the Review table that have an Id of 100 or less. What does your SQL statement look like?

Answers

Answer: The query to delete rows for the given scenario is  

DELETE

FROM Review

WHERE Id < 100 OR Id = 100;

Explanation:

In SQL, the table can be removed using either DROP, TRUNCATE or DELETE commands.

DROP command is used to delete the whole structure of the table. The general syntax is given below.

DROP TABLE table_name;

After this command, the whole structure of the specified table will be deleted. This table will have to be created again in order to use it and put data in this table.

SELECT *

FROM table_name;

This command when executed after the DROP command, will show an error.

This command can be used to drop database objects like constraints, index and the others.

The TRUNCATE command removes all the rows from a table. The structure of the table remains intact and data can be put again in this table.

This command only removes the data currently present in the table.

The general syntax is given below.

TRUNCATE TABLE table_name;

The command below will compile but it will not return any rows.

SELECT *

FROM table_name;

Alternatively, DELETE keyword is used to drop only the rows from a given table.

The general syntax for deleting rows from a table is given below.

DELETE

FROM table_name

WHERE [condition];

The WHERE clause is optional in a DELETE query.

SELECT *

FROM table_name;

The above command will compile and return rows if rows are present in the table other than the deleted rows.

The table used in the given query is Review table. We assume that Id is the primary key for the Review table. The query becomes

DELETE

FROM Review;

The condition for this deletion is that Id should be less than or equal to 100. The final query is written as

DELETE

FROM Review

WHERE Id < 100 OR Id = 100;

In the following method call, which argument is an array?

myObject.some_method(x, y, 3);

a) x is an array
b) y is an array
c) both x and y are arrays
d) neither x nor y is an array
e) can't say without seeing more code

Answers

Answer:

can't say without seeing more code

Explanation:

In the function calling, we pass the name of array, variable and direct value as well.

for example:

int y=3;

int x[] = {1,2,3,4};

fun(y,x);

so, we can't tell which is variable and which is array, without seeing the rest of code.

we can tell by seeing the initializing variable and function declaration or create function.

Other Questions
What net ionic equation describes the reaction between Pb(NO3)2(aq) and Na2CO3(aq)? What was wrong with the articles of confederation Describe the three layers of meninges covering the brain. Why metals are good thermal conductors, but polymers are not? If u(x)=-2x^2+3 and (x)=1/x, what is the range of (uv)(x) A 60 room hotel is filled to capacity every night at a rate of $40 per room. The management wants to determine if a rate increase would increase their profit. They are not interested in a rate decrease. Suppose management determines that for each $2 increase in the nightly rate, five fewer rooms will be rented. If each rented room costs $8 a day to service, how much should the management charge per room to maximize profit? Henry is distressed after losing his job. Henry visits a local tavern and has seven drinks. While driving home at a high rate of speed, Henry collides with Irene's car, killing her. Henry has likely committed: Which expression is equivalent to!!!!! Select the correct answer.You are writing a literary analysis essay on Shakespeare's Macbeth. Which of the following is a reliable source of information on the topic?A. a student's college paper on the use of symbolism in the playB. a blog about the themes in Shakespeare's playsC. a website on Shakespeare maintained by the student body of an arts schoolD. a literary critic's analysis of the characters and their contrasts in the play The time spent waiting in the line is approximately normally distributed. The mean waiting time is 6 minutes and the standard deviation of the waiting time is 2 minutes. Find the probability that a person will wait for more than 4 minutes. ANSWER ASAP PLEASE!!Clayton needs to reflect the triangle below across the line y=xWhich statements about the reflection are true? Check all that apply.Clayton could use the relationship (x,y) (y,x) to find the points of the image.Clayton could negate both the x and y values in the points to find the points of the image.C will remain in the same location as C because it is on the line of reflection.C will move because all points move in a reflection.The image and the pre-image will be congruent triangles.The image and pre-image will not have the same orientation because reflections flip figures. A species of desert plant secretes a chemical into the surrounding soil that kills seeds from any other species of plant that attempts to germinate in that area. What is this an example of? Which of the following statements about the cerebellum is NOT correct? a. The cerebellum plays a role maintaining your balance. b. Damage to the cerebellum could affect posture. c. The cerebellum has a cortex and homunculus, just like the motor cortex. d. The cerebellum generates conscious motor commands. Which function in vertex form is equivalent to fx = 4+x2-2x According to a report, 51.6% of murders are committed with a firearm. (a) if 200 murders are randomly selected, how many would we expect to be committed with a firearm? (b) would it be unusual to observe 122 murders by firearm in a random sample of 200 murders? why? Chemical weathering is greatest under conditions of A card is drawn from a standard deck of 52 cards. What is the theoretical probability, as a decimal, of drawing an ace? Round the decimal to the nearest hundredth. (Hint: A standard deck of 52 cards contains 4 aces.)P(ace) = Based on your workout, what muscles do you think are the strongest and which muscles need the most work? Explainyour answer. what was the western roman Catholic main language Which of the following best describes the economic situation facing President Bush when he was elected?-America had a debt, and Bush would have to compromise with Congress to decide how to pay it off.-America had a balanced budget, and Bush would have to compromise with Congress to keep it that way.-America had a budget surplus, and Bush would have to compromise with Congress to decide how to spend it.