Using struct to create Data Structures - C Structure

C examples for Structure:Structure Definition

Introduction

The struct keyword groups a collection of variables called a structure that you can treat as a single unit.

Demo Code

#include <stdio.h>

struct Dog{/*from  w  w  w  .j  a v a 2  s . c o m*/
  int age;
  int height;
} silver;

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

Result


Related Tutorials