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
Gwar [14]
3 years ago
5

Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-referenc

e parameter passing scheme.
Select one:

a. FALSE

b. TRUE
Computers and Technology
1 answer:
morpeh [17]3 years ago
7 0

Answer:

b. TRUE

Explanation:

Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.

This is because , assuming a pass by value semantics would require us to copy the value of the istream or ostream object which would be meaningless. In fact these objects don't even have a copy constructor at all. So such objects are always passed by reference.

You might be interested in
What command in cisco IOS allows the user to see the routing table
maksim [4K]

Answer:

Show IP route command

Explanation:

7 0
3 years ago
Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The s
zimovet [89]

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

6 0
3 years ago
The operating system is not responsible for allowing one computer to share information with other computers.
kompoz [17]

The network layer is responsible for logical connection setup, data forwarding, routing & delivery. This therefore means that the network (third) layer of the OSI model is responsible for allowing one computer to share information with other computers.

3 0
3 years ago
Read 2 more answers
Write a program to input a number and check whether it is even or odd number
Mashutka [201]

Answer:#include <stdio.h>

int main() {

   int num;

   printf("Enter an integer: ");

   scanf("%d", &num);

   // true if num is perfectly divisible by 2

   if(num % 2 == 0)

       printf("%d is even.", num);

   else

       printf("%d is odd.", num);

   

   return 0;

}

3 0
3 years ago
Alison is entering text in a Word document. As she is entering data, where will the cursor move in relation to the text she is t
Vinil7 [7]

The cursor should move right but if not give me more information to correct my statement

6 0
4 years ago
Other questions:
  • What does using indirect quotations allow a writer to do?
    7·2 answers
  • You use a(n) ____ variation when a use case is less specific than others, and you want to be able to substitute the more specifi
    8·1 answer
  • You are creating a budget for your new business.What should you include
    15·1 answer
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    5·1 answer
  • Which scientific law states that if a light source radiates isotropically, the light intensity falls off the further you get fro
    5·1 answer
  • 2. From the listing code, please give the block of line numbers for code which are concerned with the following: A) Main functio
    5·1 answer
  • Complete the following Programming Assignment using Recursion. Use good programming style and all the concepts previously covere
    7·1 answer
  • Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to conv
    13·1 answer
  • Please help!<br><br> What is a non-iterative programming structure?
    11·1 answer
  • Why is it important to isolate evidence-containing devices from the internet?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!