Like Tree3Likes

FAQ-Draft: Why scanf("%c", &c) doesn't work as expected

This is a discussion on FAQ-Draft: Why scanf("%c", &c) doesn't work as expected within the C Programming forums, part of the General Programming Boards category; I would never have guessed you are not a native speaker! Seriously, you write better than many native speakers I ...

  1. #16
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,577
    I would never have guessed you are not a native speaker! Seriously, you write better than many native speakers I know.

    I think your version in post #11 is pretty good, assuming you change the newline "string" to just a char, and I agree with you, keep the hyperlinks. The added line in post #15 is good too.

    When you're ready, let Alex (webmaster) know you have a proposal for a new FAQ article. He will do his own technical and stylistic review and suggest more changes for you. He does a pretty darn good job at it too. He will also take care of formatting it to be consistent with the other FAQ articles and all that. You could probably mention you want a particular colored highlighting scheme in the sample output. Once he posts it, he'll let you review and make updates if you want.

    This reminds me, I have a FAQ article (the C version of "working with multiple source files") that I was working on months and months ago and never finished. Oops...

  2. #17
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,744
    I'm not a native speaker so I'm always open for stylistic improvements :-)
    How about changing the first sentence to:
    "Whenever you need to get a single character from the user you may think about using either scanf() with the format specifier %c or getchar()."
    My advice is to avoid people trying to give grammar advice and look up whatever they tell you. Many people who complain do not have training in writing. I do not think your writing actually uses passive voice, but it would be a good idea to cut out words that don't add information. Why would anyone want to read a 500 word essay with filler, you know? Another way to think about it is not what they will probably think of, but what they were taught.
    Grammar Girl : Active Voice Versus Passive Voice :: Quick and Dirty Tips
    stahta01 likes this.

  3. #18
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Instead of:
    "Whenever you need to get a single character from the user you may think about using either scanf() with the format specifier %c or getchar()."
    Try something like this:
    "To get a single character from the user, use scanf() with the %c format specifier, or getchar().
    Less formal, more active and friendly, and more concise.

  4. #19
    Registered User
    Join Date
    Jun 2011
    Posts
    2,589
    Quote Originally Posted by anduril462 View Post
    This reminds me, I have a FAQ article (the C version of "working with multiple source files") that I was working on months and months ago and never finished. Oops...
    I was looking for something like this a while back! And was never able to find the information laid out on a single page to my satisfaction. I've since learned how to work with multiple files (things like include guards threw me off), but it would still be nice to have a single reference for this.

  5. #20
    Registered User
    Join Date
    May 2012
    Posts
    1,066
    Many thanks for all your inputs.
    To bring it to an end, I've just mailed Alex my final version (from post #11 + minor suggestions from later posts).

    Bye, Andreas

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "strcpy(string,char[int])" doesn't work?
    By JonathanS in forum C Programming
    Replies: 4
    Last Post: 10-17-2011, 10:32 AM
  2. nbin=fopen("input.txt","a"); doesn't work?
    By Adam Rinkleff in forum C Programming
    Replies: 2
    Last Post: 06-23-2011, 02:57 PM
  3. Replies: 9
    Last Post: 03-31-2009, 04:23 PM
  4. Replies: 10
    Last Post: 12-08-2008, 07:12 AM
  5. "return function" doesn't work
    By Cris987 in forum C++ Programming
    Replies: 10
    Last Post: 03-04-2004, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21