Archive for C Basics

You are browsing the archives of C Basics.

C File Handling

A file is a collection of bytes stored on a secondary storage device, which is generally a disk of some kind. The collection of bytes may be interpreted, for example, as characetrs, words, lines, paragraphs and pages from a textual document; fields and records belonging to a database; or pixels from a graphical image. [...]

C Arrays

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
An array is a data structure of multiple elements with the same data type. Array elements are accessed using subscript. The valid range of subscript is 0 [...]

C Pointers

A pointer is a variable suitable for keeping memory addresses of other variables; the values you assign to a pointer are memory addresses of other variables or other pointers.
C pointers are characterized by their value and data-type. The value is the address of the memory location the pointer points to, the type determines how the [...]

C Loops

Loops are used to repeat one statement or set statements more than one time. Most real programs contain some construct that loops within the program, performing repetitive actions on a stream of data or a region of memory. There are several ways to loop in C.
For Loop
For loop is a counter loop. The for loop [...]

C Control Structure

C language possesses such decision making capabilities and supports the following
statements known as control or decision-making statements.
if statement
switch statement
Conditional operator statement
goto statement
if Statement
The if statement is a powerful decision making statement and is used to control
the flow of execution of statements. It is basically a two-way decision statement
and is used in conjunction with an [...]

C Operators

Arithmetic Operators
As well as the standard arithmetic operators (+ – * /) found in most languages, C provides some more operators. There are some notable differences with other languages, such as Pascal.
Assignment is = i.e. i = 4; ch = `y’;
Increment ++, Decrement — which are more efficient than their long hand [...]

C Keywords

Keywords:
A keyword is a word that is part of C Language itself. These words have predefined meanings and these words cannot be used as variable names.

C Keywords

char
signed
break [...]