Thread: Exam question

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    2

    Unhappy Exam question

    Write a program which will ask the user to enter a word.The word cannot exceed 10 characters. Create a function which will print the same word backwards using pointe notation not array notation. Create another function which will determine whether the word spelt backwards is the same word. eg 'racecar' spelt backward is same word.

    Breakdown
    Validate the length of the word and continoue asking until correct.
    approprite function prototyples .
    print word backwards with pointer notation.
    compare to check if the word is the same in reverse.

    Any sort of help will work.

    Thanks every body.

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Okay.

    I'll start:

    Code:
    int main()
    {
    }

    Tag: anduril462

    Soma

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    2

    Smile

    Quote Originally Posted by phantomotap View Post
    Okay.

    I'll start:

    Code:
    int main()
    {
    }

    Tag: anduril462

    Soma
    It wont get me enough marks.
    But thanks

  4. #4
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    You've got to ask questions for us to be able to help. What are you stuck on? Post the code you've written so far.
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Quote Originally Posted by Fahad Ch View Post
    It wont get me enough marks.
    You know what will get you "enough marks"? LEARNING HOW TO PROGRAM. You can't cheat your way through life.

    On your way out, you should probably read the homework announcement.

  6. #6
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Quote Originally Posted by phantomotap View Post
    Code:
    int main()
    {
    }
    Tut. I will fix that for you:

    Code:
    int main()
    {
        return 0;
    }

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Disgraced!?

    Noooooo!

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help with question from exam in c...
    By engti in forum C Programming
    Replies: 9
    Last Post: 02-11-2012, 07:42 AM
  2. Exam question help: Take 2
    By ÉireKarl in forum C Programming
    Replies: 11
    Last Post: 05-02-2010, 02:12 PM
  3. Exam question help
    By ÉireKarl in forum C Programming
    Replies: 116
    Last Post: 05-02-2010, 12:03 PM
  4. another exam question
    By rjeff1804 in forum C Programming
    Replies: 4
    Last Post: 02-12-2003, 10:29 PM
  5. exam question
    By teja22 in forum C Programming
    Replies: 2
    Last Post: 10-08-2001, 08:03 PM