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
Anastasy [175]
3 years ago
10

To print the number of elements in the array named ar, you can write :

Computers and Technology
1 answer:
Diano4ka-milaya [45]3 years ago
8 0

Answer:

Option c is correct.

Example :

public class Subject

{

public static void main(String [] args)

{

int ar[]={5,4,6,7,8};

System.out.println("the number of array elements are: ",ar.length);

}

}

Explanation:

The above program is created in java language in which Subject is a class name.Inside Subject class , there is main method.

Inside the main method, there is An array named 'ar' which data type is an integer and we have assigned the value to this array.

in the next line, we are printing the total no. of the element in the array with the length function which displays the length of an array or variable.

You might be interested in
Consider a TCP connection with a 1ms RTT in which the sender has 50,000 bytes of data to send and there are no losses and no con
Bad White [126]

Answer:

Advertised window in bytes after one second = 0 bytes.

Explanation:

Given:

Sender bytes = 50,000 bytes

Receiver's initial advertised window = 10,000 bytes

Read rate = 2,000 bytes / per 2 second

Find:

Advertised window in bytes after one second = ?

Computation:

We know that, 10,000 bytes have been buffered in receiving initial advertised window.

Receiver read 2,000 bytes in every 2 second.

So, receiver will not able to read anything in 1 second.

Therefore,

Advertised window in bytes after one second = 0 bytes.

3 0
3 years ago
Write a program to allow user to perform any of these list operation given in a menu. The menu is: a) Append an element b) Inser
Maslowich

Answer:

c

Explanation:

4 0
3 years ago
Describe the steps that transform a program written in a high-level language such as C into a representation that is directly ex
Alla [95]

Answer:

First, you would want to translate from C-language Program (in text format) into the assembly language Program (still in text format, but in the corresponding architecture of the computer where the program will be run). The software tool you will use for this step is Compiler.

Then you would translate from the assembly language program (text format) into Machine Code Program (in binary format). The software tool used for this step would be Assembler.

7 0
2 years ago
Mais
Dmitriy789 [7]
The answer to this question is B
3 0
3 years ago
Read 2 more answers
Write a Bash script that takes the name of a file or directory as an argument, 1. reports if it is a directory or a file, and if
Alla [95]

Answer:

see explaination

Explanation:

#!/bin/bash

mkdir sampleDir #I am just creating sample Directory

touch sampleFile #Creating sampleFile

echo 'Adding some information' >> sampleFile

cat sampleFile

echo "Listing the contents of the current directory:"

ls

file_size_kb=`du -k sampleFile | cut -f1` #Stores file size in KB, 1024KB = 1MB

echo $file_size_kb

if [ -d $1 ]; then

echo "It is a directory"

if [ -w $1 ]; then

echo "It has write permission"

fi

if [ -x $1 ]; then

echo "It has execute permission"

fi

if [ -r $1 ]; then

echo "It has read permission"

fi

if [ $file_size_kb -lt 1024 ]; then

echo "Small file"

elif [ $file_size_kb -gt 1024 ]; then

echo "Large file"

elif [ $file_size_kb -le 1024 && $file_size_kb -ge 1024 ]; then

echo "Medium file"

fi

elif [ -f $1 ]; then

echo "It is a file"

if [ -w $1 ]; then

echo "It has write permission"

fi

if [ -x $1 ]; then

echo "It has execute permission"

fi

if [ -r $1 ]; then

echo "It has read permission"

fi

if [ $file_size_kb -lt 1024 ]; then

echo "Small file"

elif [ $file_size_kb -gt 1024 ]; then

echo "Large file"

elif [ $file_size_kb -le 1024 && $file_size_kb -ge 1024 ]; then

echo "Medium file"

fi

fi

Check attachment for output and screenshot

4 0
3 years ago
Other questions:
  • Which javascript method should you use if you want to specify a message string to appear on your web page as it loads?
    13·1 answer
  • Finish the statement below to correctly describe the Defense Enrollment Eligibility Reporting System (DEERS). DEERS is a central
    6·1 answer
  • Does access provide email communication
    13·1 answer
  • The physical parts of the computer are known as?
    14·1 answer
  • Write an algorithm to settle the following question:
    8·1 answer
  • You develop an app, and you don’t want anyone to resell it or modify it. This is an example of: A
    5·1 answer
  • Select three advantages of cloud computing.
    10·1 answer
  • Use the drop-down menus to complete each sentence.
    8·2 answers
  • A customer wants to increase his storage capacity by 25gb
    7·1 answer
  • A network technician attempts to ping www.example.net from a customer computer, but the ping fails. access to mapped network dri
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!