Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

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???

OpenStudy (shadowfiend):

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

OpenStudy (anonymous):

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

OpenStudy (anonymous):

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

OpenStudy (anonymous):

http://ideone.com/87Wdm

OpenStudy (anonymous):

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

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!