Unnamed Structures - C Structure

C examples for Structure:Structure Definition

Introduction

You don't have to give a structure a tag name.

Demo Code

#include <stdio.h>

struct {               // Structure declaration and...
  int age;/*from   w ww. j  ava  2 s  .  co  m*/
  int height;
  char name[20];
  char father[20];
  char mother[20];
} my_horse;            // ...structure variable declaration combined

int main(void){
   printf("struct created");
   return 0;
}

Result


Related Tutorials