code required...!!!

This is a discussion on code required...!!! within the C Programming forums, part of the General Programming Boards category; hello all.... i want a code in which i can save Data types(int,float,char,etc...) and their sizes in Bytes in a ...

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    Unhappy code required...!!!

    hello all....
    i want a code in which i can save Data types(int,float,char,etc...) and their sizes in Bytes in a data file.
    it should give output as

    "
    Char 4
    int 2
    .
    .
    .
    "
    plz give it to me as early as possible...

  2. #2
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Quote Originally Posted by ahmadsami View Post
    hello all....
    i want a code in which i can save Data types(int,float,char,etc...) and their sizes in Bytes in a data file.
    it should give output as

    "
    Char 4
    int 2
    .
    .
    .
    "
    plz give it to me as early as possible...
    I think you haven't gone through the board's homework policy. No one will give you the code without seeing your effort.
    By the way, char is always of 1byte not 4.
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

  3. #3
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Sizeof() is your friend here but I agree w/Ben, check the homework page....
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. code required for the problem..
    By varun_mukthi in forum C Programming
    Replies: 4
    Last Post: 01-08-2007, 12:27 PM
  2. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

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