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
vlabodo [156]
3 years ago
14

Define a pointer variable named daco that can be used for objects of the class Banana.

Computers and Technology
2 answers:
ozzi3 years ago
4 0

Answer:

c)Banana * daco;

Explanation:

To declare an variable pointer we use * symbol after writing it's type.For example int *.Then we write the name of the variable since the name of the variable is daco.The class is a user defined data type so instead of writing any data type we will write class name then the * then name of the variable.

Banana * daco; which matches the option c Banana* daco;

shusha [124]3 years ago
3 0

Answer:

A

Explanation:

it's new int daco;

You might be interested in
Write an algorithm (pseudo-code) that takes an unsorted list of n integers and outputs a sorted list of all duplicate integers.
nexus9112 [7]

Answer:

brainliest if it did help you

Explanation:

Given array : A[0...n-1]Now, create a count array Cnt[0...n-1]then, initialize Cnt to zero

for(i=0...n-1)

Cnt[i]=0 ---------O(n) time

Linearly traverse the list and increment the count of respected number in count array.

for(i=0...n-1)

Cnt[A[i]]++; ---------O(n) time

Check in the count array if duplicates exist.

for(i=0...n-1){

if(C[i]>1)

output (i); -----------O(n) time

}

analysis of the above algorithm:

Algorithm takes = O(1 + n + n + n)

                           = O(n)          

//java code

public class SortIntegers {

  public static void sort(int[] arr) {

    int min = arr[0];

    int max = arr[0];

    for (int i = 0; i < arr.length; ++i) {

      if (arr[i] > max) {

        max = arr[i];

      }

      if (arr[i] < min) {

        min = arr[i];

      }

    }

    int counts[] = new int[max - min + 1];

    for (int i = 0; i < arr.length; ++i) {

      counts[arr[i] - min]++;

    }

    for (int i = 0; i < counts.length; ++i) {

      if (counts[i] > 1) {

        System.out.print((i + min) + " ");

      }

    }

    

    System.out.println();

  }

  public static void main(String[] args) {

    sort(new int[] { 5, 4, 10, 2, 4, 10, 5, 3, 1 });

  }

}

7 0
2 years ago
When reading data across the network (i.e. from a URL) in Python 3, what string method must be used to convert it to the interna
EastWind [94]

Answer:

decode( )

Explanation:

We can use the method decode( ) to decode the string using the codec registered for encoding.

There are two parameters

encoding: We can encode with this parameter.

errors: If used to manage the errors.

For example:

String = "this is string example....wow!!!";

String = Str.encode('base64','strict');

If we print these variables we have:

String = b'dGhpcyBpcyBzdHJpbmcgZXhhbXBsZS4uLi53b3chISE='

String = this is string example....wow!!!

7 0
2 years ago
Write function d2x() that takes as input a nonnegative integer n (in the standard decimal representation) and an integer x betwe
Rufina [12.5K]

Answer:

The function in Python is as follows:

def d2x(d, x):

   if d > 1 and x>1 and x<=9:

       output = ""

       while (d > 0):

           output+= str(d % x)

           d = int(d / x)

       output = output[::-1]

       return output

   else:

       return "Number/Base is out of range"

Explanation:

This defines the function

def d2x(d, x):

This checks if base and range are within range i.e. d must be positive and x between 2 and 9 (inclusive)

   if d >= 1 and x>1 and x<=9:

This initializes the output string

       output = ""

This loop is repeated until d is 0

       while (d > 0):

This gets the remainder of d/x and saves the result in output

           output+= str(d % x)

This gets the quotient of d/x

           d = int(d / x) ----- The loop ends here

This reverses the output string

       output = output[::-1]

This returns the output string

       return output

The else statement if d or x is out of range

<em>    else:</em>

<em>        return "Number/Base is out of range"</em>

<em />

4 0
3 years ago
What are the most common types of cables in a network?
Maru [420]

the most common are twisted pair, coaxial, Ethernet cross over, and fiber optic.

4 0
3 years ago
25 points
Mnenie [13.5K]

A code of ethics and professional conduct outlines the ethical principles that govern decisions and behavior at a company or organization. They give general outlines of how employees should behave, as well as specific guidance for handling issues like harassment, safety, and conflicts of interest.

5 0
2 years ago
Read 2 more answers
Other questions:
  • Data cannot be sorted of filtered accurately if there are ________.
    10·2 answers
  • Jason is working on a project that requires him to manage a huge amount of data. The spreadsheet he is working on has data relat
    12·1 answer
  • When did the digital revolution begin
    10·1 answer
  • Which of these describes the functionality of a database? Check all of the boxes that apply.
    10·2 answers
  • How should you handle possible suicides:
    10·1 answer
  • if you were determining what was expected of you simply by looking at media, what messages would you take away?
    8·2 answers
  • Explaio mode of Operation of x-ray​
    15·2 answers
  • DERECTIONS: Identify all the computer software that you need for the following entrepreneurial activities. Refer your answer fro
    5·1 answer
  • Internal exception java.net.socketexception connection reset 1.18
    8·2 answers
  • a(n) is an object that defines a screen element used to display information or allow the user to interact with a program in a ce
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!