Defining Structure Types and Structure Variables - C Structure

C examples for Structure:Structure Definition

Description

Defining Structure Types and Structure Variables

Demo Code

#include <stdio.h>

struct Dog/* w  ww  .  j a va2  s  .  c  o  m*/
{
  int age;
  int height;
  char name[20];
  char father[20];
  char mother[20];
} James = {
    4, 7, "James", "Tim", "Jane"
};

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

Result


Related Tutorials