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
alexira [117]
3 years ago
9

Consider the following incomplete code segment, which is intended to increase the value of each digit in a String by one. For ex

ample, if num is 12345, then the resulting String would be 23456.
String num = "12345";
int counter = 0;
String result = "";
while(/* Missing Loop Header */)
{
int newNum = Integer.valueOf(num.substring(counter,counter+1));
result+= (newNum + 1);
counter++;
}
System.out.println(result);

Which of the following should replace /* Missing Loop Header */ so that the code segment works as intended?

counter < num.length() - 1


counter <= num.length()


counter < num.length()


counter > num.length()


counter < num.indexOf(counter)
Computers and Technology
1 answer:
arlik [135]3 years ago
7 0

The instruction that should replace /* Missing Loop Header */ so that the code segment works as intended is (c)  counter < num.length()

<h3>Loops</h3>

The program is an illustration of loops (the while loop)

While loops are program statements that are used to perform repeated operations

For the string to return 23456, the while loop body must be repeated as long the counter is less than the length of the string num

Hence, the missing loop header is counter < num.length()

Read more about loops at:

brainly.com/question/15683939

You might be interested in
Print 1 to 100 in visual basic .6
FrozenT [24]

Answer:

make ( next i ) after ( debug. print ) ​

Explanation:

Its definitely, the above answer. DIM is used for defining a variable which is an integer here. Then the for loop has been used and this will run for 1 to 100 thus as we move under debug,print I. But Next I should come after. Hence first it will be Debug,print I and then the next I .

And hence, the above answer.

The full program will be:

SUB MAIN()

DIM I AS INTEGER

FOR I = 1 TO 100 STEP 1

DEBUG.PRINT I

NEXT I

END SUB

6 0
3 years ago
If you need to add more data between column C and column D, you should _____.
lina2011 [118]
Right click on the line separating the two columns, and you should be able to select "add column"
4 0
4 years ago
you are a new lenovo service provider and need to use the recovery utility information on the lenovo support website. this infor
yawa3891 [41]

Based on the above, the person that  you  should contact to request a service provider user id and password is Regional leads

<h3>Who is a Regional leads?</h3>

The stores, merchandise, and general presence of the company in a given region are managed by region leaders. They make sure the objectives are achieved. If not, they come up with plans to achieve the goals. Leaders in a region are expected to comprehend both the local economy and its historical context.

A regional lead is a manager, educator, or administrator who is in charge of finding and supporting workforce champions within organizations within their assigned region. Hence, he or she is the best person for you to contact.

Learn more about Region from

brainly.com/question/2001834
#SPJ1

8 0
2 years ago
Write an abstract data type for a queue in Java whose elements are generic elements of type T that have an associated integer pr
Nimfa-mama [501]

Answer:

See explaination

Explanation:

#include<iostream>

const int MAX=20;

class dque

{

private:

int arr[MAX];

int front,rear;

public:

dque();

void addqatbeg(char item);

void addqatend(char item);

int delqatbeg();

int delqatend();

void display();

int count();

};

dque::dque()

{

front=rear=-1;

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

arr[i]=0;

}

void dque::addqatbeg(int item)

{

if(front==0&&rear==MAX-1){cout<<"\nDeque is full"<<endl;return;}

if(front==-1){front=rear=0;arr[front]=item;return;}

if(rear!=MAX-1)

{int c=count();int k=rear+1;

for(int i=1;i<=c;i++){arr[k]==arr[k-1];k--;}

arr[k]=item;front=k;rear++;

}

else{front--;arr[front]=item;}

}

void dque::addqatend(int item)

{

if(front==0&&rear==MAX-1){cout<<"\nDeque is full"<<endl;return;}

if(front==-1){front=rear=0;arr[rear]=item;return;}

if(rear==MAX-1){

int k=front-1;

for(int i=front-1;i<rear;i++){k=i;

if(k==MAX-1)arr[k]=0;

else arr[k]=arr[i+1];

}rear++;

arr[rear]=item;

}

int dque::delqatbeg()

{

if(front==-1){cout<<"\nDeque is empty"<<endl;return0;}

int item=arr[front];

arr[front]=0;

if(front==rear)front=rear=-1;

else

front++;

return item;

}

int dque::delqatend()

{

if(front==-1){cout<<"\nDeque is empty"<<endl;return 0;}

int item=arr[rear];

arr[rear]=0;

rear--;

if(rear==-1)front=-1;return item;

}

void dque::display()

{

cout<<endl<<"front->";

for(int i=0;i<MAX;i++)cout<<""<<arr[i];cout<<"<-rear";

}

int dque::count()

{

int c=0;

for (int i=0;i<MAX;i++){if(arr[i]!=0)c++;}

return c;}

}

7 0
3 years ago
Read 2 more answers
A(n) ____ is a list of authorization rights attached to an object - in other words, who can access that device or application an
xz_007 [3.2K]

Answer:

access control list (ACL)

Explanation:

An access control list (ACL) is a list of authorization rights attached to an object - in other words, who can access that device or application and what can they do with it.

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication and authorization is used in access control, to ensure a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification

Hence, an access control list primarily is composed of a set of permissions and operations associated with a file.

3 0
3 years ago
Other questions:
  • Which statement is true
    12·1 answer
  • You type the word "weather" when you meant to type "whether". When will Microsoft Writer or Microsoft Word flag this as a misspe
    11·2 answers
  • What factors should you consider when buying a hard drive?
    8·1 answer
  • JOIN ZOOM <br> Code- 858 1417 3090 <br> Password- XvT18Q
    11·2 answers
  • Write a python program that asks the user to enter a student's name and 8 numeric tests scores (out of 100 for each test). The n
    5·1 answer
  • __________ makes the hardware usable, while __________ commands it to perform specific tasks. a.) The operating system, RAM b.)
    10·2 answers
  • Which is the smallest form of data <br>a)bit <br>b)byte<br>c)nibble<br>d)8 binary digits<br>​
    10·1 answer
  • What is binary ????????
    5·2 answers
  • In your own words, how are sources of income and expenses related to
    12·2 answers
  • For each problem listed below, use the drop-down menu to select the field of the professional who can help solve the issue.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!