Thread: i dont understand the problem

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    19

    i dont understand the problem

    it says,

    Write a program to identify the number of bits allocated for a variable of data type “short int”. You are told that computing system employs 2’s complement notation for storing negative integers.

    You may use “unsigned short int” to employ the same number of bits to store only positive numbers.
    Your program MUST use only while statements (and break if necessary) for looping. Your program MUST NOT include any other library files other than stdio.h and math.h.

    and at the end its suppose to look like this

    Declaration of a short int variable: short int <variable name>;
    Declaration of an unsigned short int variable: unsigned short int <variable name>;



    but the problem is that i dont even know what its asking for. i dont know how to start cause i cant really identify my goal.

    any help will be appreciated

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    It's asking you to find the number of bits used to store a short on your system. I would brush up on your binary.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    15
    You're in my class aren't you? 1,000:1 odds says our teacher is reading this as we speak. It's like he knows all the tricks for copy/paste and purposely comes up with ideas for programming that force us to think. What does he think he is, a professor at major university?

    THE NERVE!!

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    42
    ya. if we tell you, then you won't learn. it becomes pretty simple after a while of reading. just don't expect to learn it all overnight.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    That doesn't seem all too statistically improbable, 6kaine9. I mean afterall, you two both just looked for a place to seek C help, right? This site comes up pretty high in google results...

    How about posting some code to start off with. We'd be obliged to help you once you help us help you. So please, help me help you (Yep. I am having a Jerry McGuire moment).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM