Thread: Classifying characters (was struct:)

  1. #1
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13

    Classifying characters (was struct:)

    do you have a program which counts the number of uppercase and lowercase letters(the main function is comprised with function calls only)

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Yes.
    But I rather suspect the point of the exercise is for you to try it yourself first, see what happens and then post your attempt and more detailed question if you get stuck.

    It's not an exercise to see who's got the best google and / or blagging skills to get someone else to do your HOMEWORK
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13

    struct2

    i need help..no nags...plzzz.......im gonna be passing it on monday..you know..im not good at programming after all but i have to pass the subject...so plz....

  4. #4
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13
    ahm..owkie....i have just read the HOMEWORK....sorry..i thought i cud ask here...owkie.....

  5. #5
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13
    ahmm..owkie ill change my question....how do pointer works?....

  6. #6
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Why the hell was this thread called struct: ?
    Anyway there are tutorials on this site and a million others explaining how pointers work.
    Google.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    owkie... owk... ook, ook.

    We are always just one step away from our ancestors. But some are closer.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quote Originally Posted by Mario F.
    owkie... owk... ook, ook.

    We are always just one step away from our ancestors. But some are closer.
    :rofl:
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well how about starting with a program which inputs a word, then examines each character

    Eg.
    Input is
    Hello

    Output is
    H is upper case
    e is lower case
    l is lower case

    etc.

    Counting them is one small step on from there

    You may find the isupper() and islower() functions in ctype.h useful.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13
    Quote Originally Posted by ahluka
    Why the hell was this thread called struct: ?
    Anyway there are tutorials on this site and a million others explaining how pointers work.
    Google.

    it's not your problem...nweiz....do you have that program?...hekhek.....

  11. #11
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Banzor him? I just pray he learns to read and stops asking for a free answer to his homework.

  12. #12
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13
    Quote Originally Posted by Wraithan
    Banzor him? I just pray he learns to read and stops asking for a free answer to his homework.


    are ye alright?...

  13. #13
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Quote Originally Posted by asteroidv2
    are ye alright?...
    I am fine, I just don't care for people who expect people to do their homework for them. Also I don't care for how you blatantly disregard the posts that were aimed at helping you get a start into this project, even though you don't really deserve it.

  14. #14
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Dude, this is your answer (from Salem):

    >> You may find the isupper() and islower() functions in ctype.h useful.

    check out what he says! Use a loop with these functions and have variables which change depending on the result of them. If you are stuck, don't ask us how to use these functions, cause I know for a fact that there are lots of examples on these forums on how to use them. Use the search feature on the site!

    EDIT:

    Please please can you learn to type properly.

    xorry = sorry.
    nweiz = (I think) anyway.
    owkie = ok, or okay.
    and plzzz = please
    Last edited by twomers; 07-16-2006 at 03:09 AM.

  15. #15
    Registered User asteroidv2's Avatar
    Join Date
    Jul 2006
    Posts
    13
    Quote Originally Posted by Wraithan
    I am fine, I just don't care for people who expect people to do their homework for them. Also I don't care for how you blatantly disregard the posts that were aimed at helping you get a start into this project, even though you don't really deserve it.
    xorry..it was just that i didnt read the homework policy..so i had asked....xorry...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linked list question
    By brb9412 in forum C Programming
    Replies: 16
    Last Post: 01-04-2009, 04:05 PM
  2. Replies: 1
    Last Post: 12-03-2008, 03:10 AM
  3. Replies: 10
    Last Post: 05-18-2006, 11:23 PM
  4. Binary Search Tree
    By penance in forum C Programming
    Replies: 4
    Last Post: 08-05-2005, 05:35 PM
  5. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM