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
9966 [12]
3 years ago
8

2. Write a program that initializes an array of characters with the phrase, "Take me to Clearwater Beach!". Using pointers, scan

the array to make each character upper case. The catch: you may NOT use the isupper(), islower(), toupper(), or tolower() functions. You must calculate whether a character is upper or lower case, and use the same logic to convert to upper case where applicable
Computers and Technology
1 answer:
navik [9.2K]3 years ago
6 0

Answer:

Written in C++

#include<iostream>

using namespace std;

int main() {

char myword[] = {'T','a','k','e',' ','m','e',' ','t','o',' ','C','l','e','a','r','w','a','t','e','r',' ','B','e','a','c','h','!', '\0'};

for (char *i = myword; *i != '\0'; ++i){

if( *i >= 'a' && *i <= 'z'){

           *i -= 'a' - 'A';    

       }

   }

   cout<<myword;

   return 0;

}

Explanation:

This line initializes the string to a char array

char myword[] = {'T','a','k','e',' ','m','e',' ','t','o',' ','C','l','e','a','r','w','a','t','e','r',' ','B','e','a','c','h','!', '\0'};

This iterates through the char array

for (char *i = myword; *i != '\0'; ++i){

This checks for uppercase or lowercase

if( *i >= 'a' && *i <= 'z'){

This converts to lowercase

           *i -= 'a' - 'A';

       }

   }

This prints the new string in all uppercase

   cout<<myword;

You might be interested in
Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
topjm [15]

Answer:

Explanation:

The following is written in Python. It creates the dictionary as requested and prints it out to the output file as requested using the correct format for various shows with the same number of seasons.The output can be seen in the attached picture below.

mydict = {}

with open("file1.txt", "r") as showFile:

 for line in showFile:

   cleanString = line.strip()

   seasons = 0

   try:

       seasons = int(cleanString)

       print(type(seasons))

   except:

       pass

   if seasons != 0:

       showName = showFile.readline()

       if seasons in mydict:

           mydict[seasons].append(showName.strip())

       else:

           mydict[seasons] = [showName.strip()]

f = open("output.txt", "a")

finalString = ''

for seasons in mydict:

   finalString += str(seasons) + ": "

   for show in mydict[seasons]:

       finalString += show + '; '

   f.write(finalString[:-2] + '\n')

   finalString = ''

f.close()

6 0
3 years ago
Which statement is true of Web-based electronic data interchange (Open EDI)? a. It consists of international agreements on priva
ale4655 [162]

Answer: (B) It reduces the cost of transmitting documents

Explanation:

 The web based EDI (Electronic data interchange) is one of the simplest technique for transmitting the various types of documents by using the EDI system.

In the web based electronic data exchange, we exchange the file or document by using the web forms in the internet browser.

The main advantage of the web based EDI system is that it reduces the overall cost during the transmission of documents. The EDI system is basically bases on the SAAS (Software as a service) principle and it is widely used in the business.

Therefore, Option (B) is correct.

6 0
3 years ago
A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line u
yawa3891 [41]
<span>A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line up with socket pins on the motherboard, is known as LGA.  </span>The Land Grid Array (LGA<span>) is a type of surface-mount packaging for ICs (</span> integrated circuits)<span> that is notable for having the pins on the </span>socket<span> (when a </span>socket is used) rather than the integrated circuit.
3 0
4 years ago
Read 2 more answers
Need answer ASAP. No links
DIA [1.3K]

Answer:

A <b>

Normally AD and BC are written in bold letters.

for example : The terms anno Domini (AD) and before Christ (BC).

Within available option the best option to choose is <b> hope it helped

5 0
3 years ago
All resources are limited. Which of the following is NOT a resource?
gladu [14]
The appropriate answer is C ! all other are very limited but labour can be increased or decreased according to our will and it doesn't exhaust !
3 0
4 years ago
Other questions:
  • Do you believe that OOP should be phased out and we should start working on some alternative
    6·1 answer
  • Monetary Policy can be either Expansionary or Contractionary. Which of the following actions classify as Expansionary Monetary P
    7·2 answers
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • How do optical discs store data? select one:
    15·1 answer
  • Which of the following languages does not provide built-in-pattern matching operations (the language, although, has pattern matc
    14·1 answer
  • If you are running a server , which of the follow operating system would be best suited ?window 10 or macOS
    8·1 answer
  • Viruses which activate themselves after a specific time is called
    10·2 answers
  • A student will not be allowed to sit in exam if his/her attendance is less than 75% .
    8·1 answer
  • Working with text in presentation programs is very ____ using text in other applications.
    10·1 answer
  • What command will prevent all unencrypted passwords from displaying in plain text in a configuration file?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!