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

Write a program that inputs a line of text tokenizing the line with function strtok and outputs the tokens in reverse order i.e.

last token in the sentence is printed first and first token is printed last. The user must be able to specify at most 80 characters in the sentence.
Computers and Technology
1 answer:
olga2289 [7]3 years ago
6 0

Answer and Explanation:

var gettext= prompt("please enter text");

function strtok(gettext){

var splitString = gettext.split("");

if(splitString.length<=80){

var reverseArray = splitString.reverse();

var joinArray = reverseArray.join("");

return joinArray;}

else{

Alert("too many characters");

}

}

/* we first ask for user input using the prompt function. We save this in a variable gettext which we pass to the strtok function. This function first splits the text and makes it an array so we are able to count how many characters the user enters and set an if..else condition to handle characters that may be more than 80. The reverse and join functions are then used respectively to reverse and return the string.*/

You might be interested in
TCP connections are established through sequence numbers. Someone can guess a client's next sequence number and then impersonate
solong [7]

Options: True or false

Answer: True

Explanation:TCP(TRANSMISSION CONTROL PROTOCOL) is is an internet control protocol that allows Communication between internet users or computers by collecting and compiling packets of data and then sending such collected packets of data to the desired user.

Before using a TCP one must first create a connection which will enable it to effectively communicate with the other user.

TCP are established using sequence numbers which can be predicted by another party for their own personal gain.

6 0
3 years ago
(15) You are a Pascal teacher (a very good programmer using assembly language(i.e., machine language) of your local machine). Yo
ASHA 777 [7]
If you Could out A B C D separate that would help
7 0
3 years ago
What are some elements commonly included in forms in Word? Check all that apply.
MArishka [77]

Answer:

dates

text

drop-down lists

8 0
4 years ago
PLEASE HELP ME!!! I NEED THIS ASAP!!!
Brums [2.3K]

Answer:

This rule helps you take eye-catching pictures by using one of the most effective ... If you want to take pictures that have a “wow” factor built in them, the Rule of Thirds is ... Camera shake or blur is something that can plague any photographer and here ... There's no reason why you can't leave it on for all of your photography.

6 0
4 years ago
Two categories of payroll deductions are required deductions and ___ deductions.
alukav5142 [94]

Answer:

1.)

- C.) Optional

2.)

- D.) Short-term Notes Payable

3.)

- A.) Payroll Sinking Funds

4.)

- A.) A Formal Timekeeping System Is Used

(I'm possibly wrong on the last question, if so then my apologies and I wish you the best of luck.)

3 0
3 years ago
Read 2 more answers
Other questions:
  • Danny is editing the text content of a single page on a website he created a year ago. What part of the tag would he have to upd
    11·1 answer
  • What the difference between a battery and power supply?
    15·1 answer
  • Which processor is better for madvr
    13·1 answer
  • Which firewall has a network interface located in a unique network segment that allows for true isolation of the segments and fo
    9·1 answer
  • Files containing ____ are available from a variety of sources.
    10·1 answer
  • Network in which every computer is capable of playing the role of the client, server or both at the same time is called *
    6·1 answer
  • You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
    6·1 answer
  • Style of music that originated in New Orleans in the early 1900s
    11·2 answers
  • Hey i need some help with code.org practice. I was doing a code for finding the mean median and range. the code is supposed to b
    14·1 answer
  • 19. WHICH KEY ALLOWS YOU TO DELETE AND TYPE OVER TEXTS? *
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!