Keyword, whitespace in C, and data types of C language

Keyword, whitespace in C, and data types of C language


Keywords is a predefined or reserved word in the C library with a fixed meaning and used to perform an internal operation. C language support 32 keywords. These reserved words may not be used as a constant or variables or any other identifier names. 

 The following list shows the reserved words in C

caseenum registertypedef
const float shortunsigned
default gotosizeof volatile

Witespace in C

A line containing only whitespace, possibly with a comment, is known as a blank line and a C compiler totally ignores it. Whitespace is the term used in C to describe blanks, tabs, newline characters, and comments. Whitespace separates one part of a statement from another and enables the compiler to identify where one element in a statement, such as an int, ends and the next element begins. Therefore, in the following statement in age; there must be at least one whitespace character (usually space) between int and age for the compiler to be able to di statement distinguish them. On the other hand, in the following statement-

fruit = apples + oranges; //get the total fruit

No whitespace c although you are free to include an apple e some if you wish to increase readability.

Data Types 

Data types in C refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.

C data types are used to

  • Identify the type of a variable when it declared.
  • Identify the type of return value of a function. 
  • identify the type of a parameter expected by a function. 

Data types available in C language are

  • Built-in Data Types...
  • fundamental data types (word, in, hae, double, fat, and pointer)
  • Derived data types (array, string, and structure) 
  • Programmer - defined Data types (structure, union, and enumeration) 

Fundamental Data Types

void Used to denote the type with no values.
int Used to denote an integer type
char Used to denote a charcter type
float, double Used to denote a floating point type
int*,float *, char * Used to denote a pointer type

Derived Data types

array A finite sequence (or table) of variables of the same data type.
string An array of character variables.
structure A collection of related variables of the same and/ or different data types.

You may like these posts