Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

ajprincess Group Title

Can someone plzzz check this code?

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    #include<iostream> using namespace std; int main() { string word[5]; int i; for(i=0; i<5; i++) { cout<<"Enter the word"<<i<<endl; cin>>word[i]; } for(i=1; i<6; i++) { cout<<i<<"."<<word[i]<<endl; } system("PAUSE"); return 0; }

    • 2 years ago
  2. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    did you #include <string> ?

    • 2 years ago
  3. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    The question is Write a C++ program to enter "Object Oriented Programming Using C++" using keyboard and display it in the console as the following style 1.Object 2.Oriented 3.Programming 4.Using 5.C++

    • 2 years ago
  4. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    No. I didn't include it.

    • 2 years ago
  5. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Also, since you loop from i=1 to 6 in the second loop, you will be referencing memory outside the array. If you make it from i=0 to 4 (i.e. i=0; i<5) it will work

    • 2 years ago
  6. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    http://ideone.com/6b8mp

    • 2 years ago
  7. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Perfect nw. Thanxxxxxxxxxxxx a lt.

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.