1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alukav5142 [94]
3 years ago
6

Write the code to call a function named send_variable and that expects a single int parameter. Suppose a variable called x refer

s to an int. Pass this variable as an argument to send_variable.
Computers and Technology
1 answer:
NemiM [27]3 years ago
6 0

Answer:

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>//function definition</em>

<em>void send_variable(int num){</em>

<em>    cout<<"The Number is "<<num<<endl;</em>

<em>}</em>

<em>// main function begins here</em>

<em>int main()</em>

<em>{</em>

<em>    int x =15; //declares an it variable and assigns 15</em>

<em>    // Calls the function send_variable</em>

<em>    send_variable(x);</em>

<em>    return 0;</em>

<em>}</em>

Explanation:

Using C++ programming language we created the function called send_variable and in the main function we call this function which only displays the value of an int variable passed unto it.

You might be interested in
The security option in MySQL, that when enabled, limits where a file can be loaded from when using the LOAD DATA INFILE command
swat32

Answer:b) secure_file_priv

Explanation: MYSQL database is the SQL data collection where the command LOAD DATA INFILE is used for the transporting the data-file from the local server to the MYSQL server. This command helps the reading the file's data or text of the client server at rapid speed

The secure_file_priv is the option that is raised from the LOAD DATA INFILE for the limited loading of files from the directories and also makes it secure. Other options are incorrect because they are used for the location and loading.Thus the correct option is option(b).

6 0
3 years ago
Element will you include to present numerical data on the slide
Sveta_85 [38]
I believe a graph, because it shows data.
8 0
4 years ago
The ticketing system at the airport is broken, and passengers have lined up to board the plane in the incorrect order. This line
wolverine [178]

Answer:

See explaination

Explanation:

The program code

import java.util.ArrayList;

public class Main

{

public static void main(String[] args)

{

ArrayList<AirlineTicket> tickets = new ArrayList<AirlineTicket>();

//This creates a randomized list of passengers

addPassengers(tickets);

for(AirlineTicket elem: tickets)

{

System.out.println(elem);

}

//This creates a TicketOrganizer object

TicketOrganizer ticketOrganizer = new TicketOrganizer(tickets);

//These are the methods of the ticketOrganizer in action

System.out.println("\nPassengers Ordered by Boarding Group:");

ticketOrganizer.printPassengersByBoardingGroup();

System.out.println("\nPassengers in line who can board together:");

ticketOrganizer.canBoardTogether();

}

//Do not touch this method! It is adding random passengers to the AirlineTicket array

public static void addPassengers(ArrayList<AirlineTicket> tickets)

{

String[] seats = {"A","B","C","D","E","F"};

for(int index = 0; index< 15; index++)

{

int random = (int)(Math.random() * 5);

AirlineTicket ticket = new AirlineTicket("Passenger " + (index+1), seats[random], ((int)(Math.random()*5)+1), ((int)(Math.random()*8)+1));

tickets.add(ticket);

}

}

}

class TicketOrganizer

{

private ArrayList<AirlineTicket> tickets ;

//constructor with parameter as an arraylist of AirlineTicket

public TicketOrganizer(ArrayList<AirlineTicket> tickets)

{

this.tickets = tickets;

}

//methhods to return the arraylist of airlines

public ArrayList<AirlineTicket> getTickets()

{ //re-organize the ticket first

ArrayList<AirlineTicket> tickets_organized = new ArrayList<AirlineTicket>();

for(int i=1; i<=5; i++)

{

for(AirlineTicket ticket: tickets)

{

if(ticket.getBoardingGroup() == i)

{

tickets_organized.add(ticket);

}

}

}

return tickets_organized;

}

//print the tickets based on boardingGroup

public void printPassengersByBoardingGroup()

{

int count = 0;

for(int i=1; i<=5; i++)

{

System.out.println("Boarding Group " + i + ":");

for(AirlineTicket ticket : tickets)

{

if(ticket.getBoardingGroup() == i)

{

System.out.println("Passenger " + ticket.getName());

}

}

}

See attachment for sample output

4 0
4 years ago
The security manager assigned a new security administrator the task of implementing secure protocols on all wireless access poin
Marysya12 [62]

Answer:

Good choice, as its one of the most secure wireless communications encryption methods, even though WPA2 would be the best

Explanation:

8 0
4 years ago
Problem of Nigeria under primary education
Artist 52 [7]
Primary school education in Nigeria is bisected with myriads of problems including: poor funding, poor educational infrastructures, overcrowding, inadequate classrooms and poor/polluted learning environment
8 0
4 years ago
Other questions:
  • Brenda is a college student who enjoys downloading music, movies, and television shows from the Internet. She also uses the Inte
    7·1 answer
  • What is the symbol for the relational operator 'equal to'?
    8·1 answer
  • Minerals can form deep inside Earth’s crust by
    13·1 answer
  • Someone asks you for help with a computer that hangs at odd times. You turn it on and work for about 15 minutes, and then the co
    10·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    5·2 answers
  • The various protocols in use on the internet are said to operate in layers in which the protocol(s) at each layer solve one prob
    5·2 answers
  • Ram is also called __________________________________________________
    11·1 answer
  • All operations used to construct algorithms belong to one of three categories: sequential, conditional, or iterative. Below is a
    15·1 answer
  • What programming language does the LMC 'understand'?
    5·1 answer
  • The SQL SELECT built-in function COUNT ____.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!