Thread: Structs

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    Apr 2015
    Posts
    596

    Structs

    Hey, I have studied the subject of structs.
    when I make a struct it's a general abstract concept until I make a variable of concrete type of that struct then it will allocated in the memory.
    To be more explicit for me, can someone please give me an analogous of real life which is visualizing the concept of "structs" and its allocations in the memory once declaring its variables?!



    Moreover, what happened when I write the same name in two concrete structs, meaning lets assume I have defined struct called "struct BOOK" , and write like this :
    struct BOOK b1 = {something};
    struct BOOK b1= {something different} ; so the computer will allocate for me b1 and put it's value as {something} and after being called once again struct BOOK b1={something different} ; he will go to the name b1 that's already defined previously, and put the updated value or .. ? or totally he's not allowing similarity in names(same names)?!

    thanks in advance !
    Last edited by RyanC; 12-10-2018 at 06:14 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 01-08-2013, 07:55 AM
  2. Typedef Structs inside Typdef structs
    By gremory in forum C Programming
    Replies: 21
    Last Post: 12-30-2011, 07:48 PM
  3. [ noob question ] Help with structs within structs
    By Riverfoot in forum C Programming
    Replies: 3
    Last Post: 04-26-2011, 07:24 PM
  4. Passing Structs Into An Array Of Structs.
    By TheTaoOfBill in forum C Programming
    Replies: 3
    Last Post: 10-07-2010, 09:38 AM
  5. passing structs & pointers to structs as arguments
    By Markallen85 in forum C Programming
    Replies: 6
    Last Post: 03-16-2004, 07:14 PM

Tags for this Thread