C Reference Space, formfeed, newline, etc test: isspace()

The isspace() function returns a non-zero if its argument is a single space, newline, tab, form feed, vertical tab, or carriage return.

If the argument is not a single space, newline, tab, form feed, vertical tab, or carriage return , then zero is returned.

isspace() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Space, formfeed, newline, etc test: isspace()


C Reference Punctuation Character: ispunct()

The ispunct() function returns a non-zero if its argument is a punctuation character. (All characters except alphanumeric or white-space). If the argument is not a punctuation character, then zero is returned.

ispunct() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Punctuation Character: ispunct()


C Reference Printing Character: isprint()

The function isprint() returns a non-zero if its argument is a printable character (including a white-space). If the argument is not a printable character (like the newline character ‘\n’ ) , then zero is returned.

isprint() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Printing Character: isprint()


C Reference Lower Case Letter Test: islower()

The islower() function returns a non-zero if its argument is a lowercase letter. If the argument is not a lowercase letter, then zero is returned.

islower() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Lower Case Letter Test: islower()


C Reference Printing Character Test (not space): isgraph()

The function isgraph() checks if parameter is a character with graphical representation that can be printed. Whitespace characters like space are skipped. If the argument is not, then zero is returned.

isgraph() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Printing Character Test (not space): isgraph()


C Reference Decimal Digit Test: isdigit()

The function isdigit() returns a non-zero if its argument is a digit between 0 and 9. If its argument is not a digit between 0 and 9, then zero is returned.

isdigit() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Decimal Digit Test: isdigit()


C Reference Control Character Test: iscntrl()

The iscntrl() function returns a non-zero if its argument is a control character. If there is no control character encountered, then zero is returned.

iscntrl() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Control Character Test: iscntrl()


C Reference Alphabetic Test: isalpha()

The function isalpha() returns a non-zero if its argument is a letter of the alphabet. If it is not a letter of the alphabet, then zero is returned.

isalpha() source code example:

More »


Posted in C Reference ctype.h Functions | 1 Comment


C Reference Alphanumeric Test: isalnum()

The function isalnum() returns a non-zero if its argument is a letter of the alphabet or a numeric digit. If it is not letter of the alphabet or a numeric digit, then zero is returned.

isalnum() source code example:

More »


Posted in C Reference ctype.h Functions | Comments Off on C Reference Alphanumeric Test: isalnum()


Writing Memory to a File and Reading Memory from a File in C

In this C programming language tutorial we will look at how to save content from an allocated piece of memory to a (binary) file. We also read it back from a (binary) file into memory and display the content.

Because the program example is longer than the usual examples that we use in our tutorials, we’ve split it into parts. Further down you’ll find an explanation for each part of the source. More »


Posted in C Tutorials | 3 Comments