title: Uninitialized Structures c
body: <p>i'm having trouble whit this code. I get the error " uninitialized local variable "question1" used", I'm new to c and I'm really trying to learn. I'm trying to build a quiz program where i can use both Structures and textfile. i'm just staring but the error gets in the way !! </p>
  
  <p>the code is !</p>
  
  <pre><code>#pragma warning(disable:4996)
  #include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  
  #define max 70
  struct question{
      char *questions;
      char *alter1;
      char *alter2;
      char *alter3;
      char *alter4;
      char correct;
  };
  
  
  int main(){
  
  char *m;
  struct question question1;
  struct question Alt1;
  
  
  
      question1.questions[max] = "what is my name?A:Haidar?B:Ali?C:Hagob?D:Aws?";
      Alt1.alter1 = 'A';
      Alt1.alter2 = 'B';
      Alt1.alter3 = 'C';
      Alt1.alter4 = 'D';
      Alt1.correct;
      m = question1.questions[max];
      printf("%s\n", *m);
      scanf("%c", &amp;Alt1.correct);
  
      if (Alt1.correct == Alt1.alter1);
      {
          print("right you have won\n");
      }
  
      if ((Alt1.correct) != Alt1.alter1); {
  
          printf("sorry\n");
      }
  
  
  
      system("pause");
  }
  </code></pre>