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
bija089 [108]
3 years ago
8

I'm new to programming and I'm starting with c++, so the first program I want to write should take a string of characters and ou

tput it to the console afterwards, but the execution isn't working, I can't find the issue.
'#include
#include
#include
using namespace std;

int main()
{
short T;
cin >> T;

char *str;
//cin.clear();
cin.sync();
cin.ignore(1000, '\n');

while(cin >> *str++)
;

cin.sync();
cin.ignore(1000, '\n');
while(*str++ != '\0')
cout << *str;

return 0;
}
'
Computers and Technology
2 answers:
olganol [36]3 years ago
7 0
Just reading and writing a string should be as easy as:

string msg;
getline(cin, msg);
cout << "Hello " << msg;
return 0;
Amanda [17]3 years ago
5 0
#include <iostream>
#include <string>

using namespace std;

int main() {

string userInput;
cout << "Enter word" << endl;

cin >> userInput;

cout << "you entered" << endl;
cout << userInput;

return 0;

}
You might be interested in
_____ assures the interface will act as the users expect, while _____ assures it will look pleasing. Select one:
Agata [3.3K]

Answer:

C. consistency, aesthetics

Explanation:

Based on the descriptions given to us in the question we can deduce that the answer is C. consistency, aesthetics. This is because "consistency" is defined as something that always delivers the same results, which is what users need from the interface in order to understand it and continue using it. While "aesthetics" is defined as the visual representation of something (how something will look).

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Stay at least _____ behind the vehicle ahead of you at all times.
fenix001 [56]

Answer:

B 4 seconds

Explanation:

You should stay 4 seconds away from a vehicle at all times at the same speed as the other vehicle or vehicles.

6 0
3 years ago
Read 2 more answers
The understanding of computer function?
Licemer1 [7]
A specific skill or work done and carried out by a computer in order to gain information
8 0
3 years ago
For this step, submit your work in the programming environment by running your code, checking your code for a score. The score y
34kurt

A sample HTML code that contains headers, paragraph tags, hyperlinks is

  • <h1> This is a header </h1>
  • <h2> This is a subtitle heading </h2>
  • <p> This is a paragraph </p>
  • <a href=”www.brainly.com”> Brainly Website </a>

<h3>What is HTML?</h3>

This is the building block of a website and is an acronym that means Hypertext Markup Language.

The HTML code that can be used to add a sample image is: "<img src="pic_Brainly.jpeg" alt="Brainly" width="500" height="333">

The src code means the specific location of the external resource

The width and height show how tall and wide the image would be.

The alt shows the alternative information for the image that can be seen when a person hovers over the image on the website.

Read more about HTML and CSS here:

brainly.com/question/24051672

#SPJ1

3 0
2 years ago
What aviation first is janice brown credited with
Alla [95]

Janice Brown is a former teacher who flew the first long-distance solar-powered flight. She flew a small experimental solar-powered aircraft six miles.

Let me know if you have any questions.

7 0
3 years ago
Other questions:
  • Hot five was the famous band of which musician?
    14·1 answer
  • All objects in an object-oriented program are instantiated (created) from a ____.
    12·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • Which of the following statements is true?
    13·1 answer
  • What are at least three tips to taking photographs of insects? Why would following the tips help create better photographs?
    10·1 answer
  • Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint:
    5·1 answer
  • What software application is most appropriate to use to create multimedia presentations?
    6·2 answers
  • What is the name of the option in most presentation applications with which you can modify slide elements?
    7·2 answers
  • 1. Which of the following is not true about high-level programming language s? (a) Easy to read and write (b) Popular among prog
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!