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

sahil.sharad Group Title

can somebody pls tell me the method to get a string from user and then print the string entered by the user also to do any kind of manipulation or operations in it by using for loop or any other loop method and also i dont want to use gets for getting the string???

  • 2 years ago
  • 2 years ago

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

    Are you using C? Why don't you want to use gets? You can also use getc I suppose.

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

    you can use fgets (with stdin as the FILE*) as an alternative to gets. If you don't want to use anything like fgets or scanf, you can use getchar :-D

    • 2 years ago
  3. sahil.sharad Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    now i just wanna use scanf but that is not a big problem the problem is how will i manipulate that string incase i have to do any operation on it...for example let me give u a programme and u tell me the coding 1.)MAKE A PROGRAMME TO GET A STRING FROM A USER (NOT USING GETS) AND REPLACE ALL THE "A" AND "B" IN THE STRING BY "?"(QUESTIONMARK) YES U HAVE TO MAKE IT IN C

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

    http://ideone.com/87Wdm

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

    you can use an array for that purpose and a for loop

    • 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.