title: Does C have variant data types?
body: <p>How to fix the c compiler error of below program?</p>
  
  <pre><code>struct a{
        int a;
  };
  struct b{
      int b;
  };
  int main(){
  
  int toggle =1;
  int y = (toggle==1) &amp;&amp; (struct a x);
  y =     (toggle==0) &amp;&amp; (struct b x);
  
  if(toggle==1){
      x.a = 10;
      printf("%d ",x.a);
  }else {
      x.b = 20;
      printf("%d ",x.b);
  }
  printf("hi");
  return 0;
  }
  </code></pre>
  
  <p>When i compile this program am getting error "expected ')' before 'x'"</p>
  
  <p>I need create static objects. Is there other way to achieve this? </p>