Thread: quick question function prototypes new to this

  1. #1
    Registered User
    Join Date
    Oct 2006

    quick question function prototypes new to this

    If the function prototype
    evaluates to a letter,

    what is the funtion prototype that evaluates to a whole sentence?

    I have tried:
    but they only count the letters and the space, is there one that counts words, or sentences?

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Out of scope
    You want a function that returns if it's a sentence or not? There is no such standard function to do such a thing. It really depends on how you're defining a sentence. Should the function check to see if it has a subject and an object? Should it just check to see if it ends in a period? Should it check to see if it isn't a run-on? Depending on it's exactness it can be anywhere from extremely easy to slightly complex (and I use complex loosely here) to make. There is no standard function, though.
    Sent from my iPadŽ

  3. #3
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Maybe you want to see if a string (i.e. char array) consists of only (say) alpha characters? In which case you'd need to run a for loop for the length of the string and call isalpha() (and isspace()) on each character in the string. It's up to you whether you bail out at the first non-alpha, or check the whole string (depends on what information you want).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Question about function prototypes
    By Mikecore in forum C Programming
    Replies: 2
    Last Post: 11-20-2005, 05:39 PM
  4. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  5. Another quick question
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 12-03-2001, 03:30 PM