title: Trying to access menu names from array using structures ...getting error
body: <p>I have a menu and sub-menu. I have created a structure where I have store menu and submenu names in an array. Trying to print them, but I think I am wrong somewhere.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  struct calculator
  {
      int x_loc;
      int y_loc;
      char main_menu[15];
      char sub_menu[15];
      char icon_title[100];
  };
  
  char *main_menu_names[3] = {"Link_1", "Link_2", "Link_3"};
  char *sub_menu_names[3] = {"Sub_Link_1", "Sub_Link_2", "Sub_Link_3"};
  
  struct calculator info = {219, 120, main_menu_names, sub_menu_names, "Title"};
  
  int main()
  {
      printf("X location: %d\n",info.x_loc);
      printf("Y location: %d\n",info.y_loc);
  
      printf("Menu Name: %s\n",info.main_menu);
      printf("sub menu: %s\n",info.sub_menu);
      printf("icon_title: %s\n",info.icon_title);
  
      system("PAUSE");
  
      return 0;
  }
  </code></pre>