title: Can a data structure contain multiple type of elements?
body: <p><a href="https://github.com/iamsubhranil/MiscLinkedLIst/blob/master/misc_list.c" rel="nofollow noreferrer">This program</a> is a different approach over the same old singly linked list. Instead of creating a single structure and keeping the pointer of the next node of the same type as a member of the structure, I here used three different structures, and a plain <code>long nextaddress</code> member in each to point the address of the next node, because pointers also do the same.</p>
  
  <p>Each node also has a <code>int flag</code> member as the first item of the structure, and the <code>data</code> part resides at the end of the structure because of its variable length.</p>
  
  <p>The three structures are basic extension of the built-in types, <code>long</code>, <code>double</code> and <code>char</code>. While accessing the structures, I first casted the address of the node as an <code>int *</code>, which gives me access to the <code>flag</code> without fully typecasting the address to a definite structure from the three. </p>
  
  <p>Then analyzing the <code>flag</code>, various operations are done.</p>
  
  <p>So here's my question. Can it be called a valid linked list? And moreover, is it even a valid data structure?</p>