Question about structs

This is a discussion on Question about structs within the C Programming forums, part of the General Programming Boards category; Hello. I was wondering why, in C, the sizeof of a struct is larger than the the sum of all ...

  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    8

    Question about structs

    Hello. I was wondering why, in C, the sizeof of a struct is larger than the the sum of all the sizeofs of it's members. It only seems to be by a few bytes, but as a bit of a perfectionist I fine this a bit annoying.

  2. #2
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,649

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [ noob question ] Help with structs within structs
    By Riverfoot in forum C Programming
    Replies: 3
    Last Post: 04-26-2011, 07:24 PM
  2. Question about Structs
    By mcmillhj in forum C Programming
    Replies: 12
    Last Post: 01-17-2011, 04:25 PM
  3. Structs question
    By BigFish21 in forum C Programming
    Replies: 25
    Last Post: 04-23-2008, 09:57 PM
  4. Question about structs
    By Imperito in forum C Programming
    Replies: 6
    Last Post: 08-30-2002, 03:18 PM
  5. Question on structs
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:45 AM

Tags for this Thread


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