(ANSI) C Reference – C Operators

A look at the ANSI C operators and their meaning. More »


Posted in C Operators | Comments Off on (ANSI) C Reference – C Operators


(ANSI) C Reference – C Constants

The constants that can be used in the C programing language. More »


Posted in C Constants | Comments Off on (ANSI) C Reference – C Constants


(ANSI) C Reference – Pointers, Arrays and Structures

A look at how to use pointers, arrays and structures in the C language. More »


Posted in Pointers Arrays and Structures | Comments Off on (ANSI) C Reference – Pointers, Arrays and Structures


(ANSI) C Reference – C Initialization

A look at C programming language initialization.


type name=value ->  Initialize variable


type name[]={value1,…} ->  Initialize array


char name[]=”string” ->  Initialize char string



Posted in C Initialization | 1 Comment


(ANSI) C Reference – Program Structure and Functions

A look at program structure and functions in C programming language. More »


Posted in Program Structure and Functions | Comments Off on (ANSI) C Reference – Program Structure and Functions


(ANSI) C Reference – Data Types – Declarations

A look at the different data types and declarations that is possible in the C programming language.
More »


Posted in Data Types - Declarations | Comments Off on (ANSI) C Reference – Data Types – Declarations


C Reference function mblen()

The function mlen() of the library stdlib.h is used to get the length of a multi-byte character.

Usage of mblen():

int mblen ( const char * pmb, size_t max );

The pmb (pointer multibyte character) pointer is pointing to the multi-byte value where you want to know the size of. It will only examine at most max bytes.

Parameters:

More »


Posted in C Reference stdlib.h Functions | Comments Off on C Reference function mblen()


C Reference function mbtowc()

The function mbtowc(), that is part of the stdlib.h library, is used to convert a multi-byte character to wide character.

Usage of mbtowc():

int mbtowc ( wchar_t * pwc, const char * pmb, size_t max );

The multibyte character pointed by pmb (pointer multibyte character) is converted to a wide character which is stored at the location that is pointed by pwc (pointer wide character). The length in bytes of the multiby character is returned. More »


Posted in C Reference stdlib.h Functions | Comments Off on C Reference function mbtowc()


C Reference function qsort()

The function qsort() of the stdlib.h is used to sort the elements of an array.

Usage of qsort():

void qsort ( void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) );

The function qsort() sorts the num element of the array pointed by base. Every element has a size of size bytes long. The qsort function will use the comparator function to determine the order of the elements.

The function will not return a value. The content is modified in the newly sorted order.

Parameters:

More »


Posted in C Reference stdlib.h Functions | Comments Off on C Reference function qsort()


C Reference function bsearch()

The function bsearch() of the stdlib.h is used to do a binary search in an array.

Usage of bsearch():

void * bsearch ( const void * key, const void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) );

It is searching for a given key in the array that is pointed to by base. Base is formed by the number of elements (num). Each element has a size of size bytes. The function will return a void* pointer to the first element that is matching the search key. The function compares each element to the key by calling the comparator. More »


Posted in C Reference stdlib.h Functions | Comments Off on C Reference function bsearch()