title: Why {} in array not working?
body: <p>The proper syntax for error is : </p>
  
  <pre><code>arr[n] = {10,20,50,40,80,70,30};
  </code></pre>
  
  <p>But its show an error: "Expression error"</p>
  
  <p>But it is allowing:</p>
  
  <pre><code>arr[n] = (10,20,50,40,80,70,30);
  </code></pre>
  
  <p>And also I am not getting the expected output! whats the matter? </p>
  
  <pre><code>void main()
  {
  node *head,*P;
  int n,i,arr[];
  clrscr();
  
  n=6;
  arr[6] = {10,20,50,40,80,70,30};
  head=(node*)malloc(sizeof(node));
  head-&gt;data=arr[0];
  head-&gt;next = NULL;
  P=head;
  for(i=1;i&lt;n;i++)
  {
  P-&gt;next=(node*)malloc(sizeof(node));
  P=P-&gt;next;
  P-&gt;next=NULL;
  P-&gt;data=arr[i];
  }
  P=head;
  while(P!=NULL)
  {
  printf("%d",P-&gt;data);
  P=P-&gt;next;
  printf("-----&gt;");
  }  
  getch();
  }
  </code></pre>
  
  <p>My C program code! </p>