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
Lilit [14]
1 year ago
14

write a program that prompts the user to input the length of a string as an integer, followed by the string and outputs the stri

ng in uppercase letters using dynamic arrays.
Computers and Technology
2 answers:
dlinn [17]1 year ago
8 0

OUTPUT of program :

Enter a string length: 5

Enter a string : hello

String in upper case letters is: HELLO

Enter a string length: 5

WRITE a Program that prompts the length of a string and the string in uppercase letters using dynamic arrays ?

#include <iostream>

#include <cstring>

#include <cctype>

using namespace std;

int main(){

char *str = new char[80];

int *num= new int[80];

char *str1=new char[80];

int len,i;

cout << "Enter a string: "

cin.get(str, 80);

cout << "Enter string length: "

cin.get(num, 80);

cout << "String in upper case letters is:"<< endl;

len = strlen(str);

for (i = 0; i <len; i++)

{

 *(str1+i)=toupper(*(str+i));

}

for(i=0;i<len;i++)

{

 cout<<*(str1+i);  

}

return 0;

}

C++ :

     

           Performance, effectiveness, and flexibility of usage were the design pillars of C++, which was created with systems programming, embedded, resource-constrained software, and big systems in mind. The software infrastructure and resource-constrained applications, such as desktop programmes, video games, servers, and performance-critical programmes, are two areas where C++ has been proven to be very useful.

                      Generic programming is made possible via C++ templates. Function, class, alias, and variable templates are supported in C++. Types, compile-time constants, and other templates can all be used to parameterize templates. At compile time, templates are implemented by instantiation. Compilers use particular inputs in place of a template's parameters to create a concrete instance of a class or function. Some substitutes are not possible, and an overload resolution policy with the motto "Substitution failure is not an error" eliminates these cases (SFINAE).                  

        C++ gives C features for object-oriented programming (OOP). It provides classes that offer the four features frequently found in OOP languages: polymorphism, inheritance, encapsulation, and abstraction. Support for deterministic destructors, which in turn provides support for the Resource Acquisition is Initialization (RAII) idea, sets C++ classes apart from classes in other programming languages.

       

To learn more about C++ refer :

brainly.com/question/13168905

#SPJ1

ycow [4]1 year ago
8 0

A random access, variable-size list data structure called a dynamic array, growable array, resizable array, dynamic table, or array list allows elements to be added or removed.

<h3>What is dynamic array?</h3>
  • A random access, variable-size list data structure called a dynamic array, growable array, resizable array, dynamic table, or array list allows elements to be added or removed. It comes with standard libraries for many current, widely used programming languages.
  • Similar to a standard array, a dynamic array can have its size changed while the program is running. Each element of a DynamArray takes up a single block of memory. The size of an array cannot be altered once it has been constructed.

#include <iostream>

#include <cstring>

#include <cctype>

using namespace std;

int main(){

char *str = new char[80];

int *num= new int[80];

char *str1=new char[80];

int len,i;

cout << "Enter a string: "

cin.get(str, 80);

cout << "Enter string length: "

cin.get(num, 80);

cout << "String in upper case letters is:"<< endl;

len = strlen(str);

for (i = 0; i <len; i++)

{

*(str1+i)=toupper(*(str+i));

}

for(i=0;i<len;i++)

{

cout<<*(str1+i);  

}

return 0;

}

To learn more about C++ refer :

brainly.com/question/13168905

#SPJ1

You might be interested in
Hey, wanna pair our account on Brainly so we can share the perks? https://brainly.com/invite/8db681239ab5027e03b097bcded13755?ut
sashaice [31]

Answer:

Explanation:

NO Thx

8 0
3 years ago
Read 2 more answers
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
Aleksandr-060686 [28]

Answer:

PING

Explanation:

To check if there's still connectivity between the computer and server, I would use the ping command.

The ping command is primarily a TCP/IP command. What this command does is to troubleshoot shoot. It troubleshoots connection and reachability. This command also does the work of testing the name of the computer and also its IP address.

4 0
2 years ago
What is the technological singularity and what are the dangers it brings to man
professor190 [17]
The definition according to google and the dictionary of technological singularity is the following : The technological singularity (also, simply, the singularity) is the hypothesis that the invention of artificial superintelligence will abruptly trigger runaway technological growth, resulting in unfathomable changes to human civilization.

The dangers this brings to man kind is the fact that people will turn out to not be people or there may be a different species considered as humans or human kind .Also we were made as humans from something else artificial super intelligence will basically be forming from us which means it will be forming from something that was already mean basically meaning there will be something changed within the species or artificial super intelligence itself.
3 0
3 years ago
I am trying to code a lifting simulator game on ro-blox. These problems listed in the third picture tells you the problems. If y
Andru [333]
I have no idea but keep grinding
7 0
3 years ago
Citations that are ______________________________ can be used to build a bibliography when needed. [Create and Modify Citation S
VMariaS [17]

Answer:

I think the best option would be C. Marked

Explanation:

hope this helps and sorry if it is incorrect.

8 0
3 years ago
Other questions:
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • "the file that specifies how netbeans builds and deploys the application when you run the application is called the ____________
    8·1 answer
  • Which website allows you to host your podcast for at a cost that includes your domain name?
    9·2 answers
  • The city government of Los Angeles recently upgraded its information technology infrastructure​ and, for the first​ time, implem
    14·1 answer
  • Google Glass, glasses that allow you to take pictures and search online by speaking commands, are introduced at a technology tra
    8·1 answer
  • You are reviewing the output of the show interfaces command for the Gi0/1 interface on a switch. You notice a significant number
    12·1 answer
  • Imagine that a team of scientists test a certain hypothesis, and the experimental results show that it is false.
    6·1 answer
  • Insertion point shows where the typed text will appear.
    5·1 answer
  • Which option is typically only used when utilizing self joins?
    8·1 answer
  • Blockchain is often associated with Bitcoin and the financial services industry. However, it is applicable to almost every indus
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!