C - Non Primitive Data Types

C Non Primitive Data Types - Definition and Usage

  • The data types that are derived from primary data types are known as non-Primitive data types.
  • The non-primitive datatypes are used to store group of values.
  • The non-primitive data types are :
C Non Primitive Data Types

Arrays :

  • An array is a collection of data items , all of the same type , accessed using a common name.
  • C language places no limits on the number of dimensions in an array, though specific implementations.

C Syntax

type arrayName [ arraySize ];

String :

  • In C programming, Strings are represented by array of characters.
  • A string is terminated by null character /0.
  • Strings are always enclosed by double quotes (Example: “Wikitechy”) . Whereas, character is enclosed by single quotes in C (Example: ‘W’).

C Syntax

char name[size]= ”string”;
char ‘C’;

Structures :

  • Structure is the collection of variables of different types under a single name for better handling.

C Syntax

struct structure_name 
    data_type member1;
    data_type member2;
    data_type memeber;

View More Quick Examples

Related Searches to C Non Primitive Data Types