How2Lab Logo
tech guide & how tos..


C Tutorial

You may be wondering why we have introduced a section on C. A question that I am often asked by budding programmers is after the advent of object oriented programming languages such as JAVA, PHP and C++, do we really need to learn C anymore?

The answer is YES.

Before you begin learning object oriented programming (OOP), you must understand fundamentally how programs are structured. The most structured programming language till date is C and hence, C is a natural choice to begin taking your initial steps towards programming. If you aim to become a master programmer, you must first master C and then move to learning an object oriented language. It will become easier to understand the concepts of OOP once you have mastered C.




Why you should learn C in 2023?

A lot of youngsters who come to me for career advice ask me if learning C is still relevant today and whether it can help fetch a job in the IT Industry. My answer to them is an obvious YES. Read this article to understand why.

Low Level Programming In C

In this article you will understand what is meant by low level programming in C; learn how to declare and use register variables; learn to identify bitwise operations supported in C and use them in a program.

File Handling in C - Part 7 of 7

Project work on C file handling

File Handling in C - Part 6 of 7

Sample programs on file handling

File Handling in C - Part 5 of 7

Structure based I/O functions - fread, fwrite

File Handling in C - Part 4 of 7

String I/O functions - fscanf, fprintf

File Handling in C - Part 3 of 7

String I/O functions - fgets, fputs

File Handling in C - Part 2 of 7

Various Read-Write functions available in C for reading and writing on to files. Understanding character I/O functions - fgetc, fputc

File Handling in C - Part 1 of 7

This is the first article of the series of articles on file handling in C. In this article you will get an overview of how files are handled in C and understand the basic concept involved.

Self Referential Data Structure in C - create an ordered singly linked list

In this article we will learn how to build a singly linked list while maintaining the data in a sorted order.

Self Referential Data Structure in C - create a singly linked list

In this article you will learn how to define self referential data structure. You will learn how to create and manipulate a linear linked list using the concept of self-referential data structure.

How to pass Structure as a parameter to a function in C?

In this article on C structures, you will learn how to pass structure as parameter to a function.

Working with Unions in C

In this article you will learn how to define union data types and use unions in a C program.

Defining Pointers to Structures in C

In this article on structures, you will learn how to define pointer to a structure and access structure elements using pointer.

Introduction to Structures in C

In this article you will learn how to represent composite data using structures; how to declare a structure variable and access its members; how to read, display, and manipulate structure data; and how to deal with array of structures.

Pointers in C - Part 9 of 9

Usage of pointers to pass a function as parameter to another function.

Pointers in C - Part 8 of 9

Using command line arguments in C. Learn how to pass parameters to function main().

Pointers in C - Part 7 of 9

Passing pointers to a function.

Pointers in C - Part 6 of 9

Pointer to a function. Learn how to implement call by reference scheme of parameter transfer using pointers.

Pointers in C - Part 5 of 9

Array of Pointers.

Pointers in C - Part 4 of 9

Pointer to two dimensional Arrays. Learn to create and manipulate two dimensional arrays using pointers.

Pointers in C - Part 3 of 9

Pointer to a one dimensional character string. Learn how to handle character strings using pointers.

Pointers in C - Part 2 of 9

Dynamic memory allocation and de-allocation using malloc & free functions. Usage of pointers to create and manipulate arrays.

Pointers in C - Part 1 of 9

Basic introduction to pointers in C. Understand how to declare and use a pointer variable and what are the basic arithmetic operations you can perform with pointers.

Arrays in C Part 2 of 2 - Multidimensional arrays

Learn how to define and work with multi-dimensional arrays in C. Learn how to represent a list of strings as a 2-dimensional character array. Also understand how multi-dimensional arrays are passed to a function.

Arrays in C Part 1 of 2 - Basic array declaration and manipulation

In this series of 2 articles on arrays we will learn how to declare arrays and define their storage representation. Topics covered include - how to read data into an array, how to manipulate & print array elements, how to implement array representation of character strings, how to sort data stored in one dimensional arrays, how to handle multidimensional arrays, and how to pass array as parameter to function.

Miscellaneous data types in C

In this article we will understand how to create your own data types in C. We will also learn about enumerated and boolean data types.

Functions in C - Part 5 of 5

In this last article in the 5 article series on functions, we will learn how to pass parameters from the calling to the called function. We will learn how to establish the correspondence among formal and actual parameters, and also understand classification of call by value and call by reference schemes for parameter transfer.

Functions in C - Part 4 of 5

This fourth article on functions explains the concept of scope of variables in C. Learn how and where to declare local and global variables. Learn about C storage class.

Functions in C - Part 3 of 5

This third series of five articles, covers - what are recursive functions and how to implement recurrence relations in C. It also takes a look at the merits and demerits of a recursive function call.

Functions in C - Part 2 of 5

In this article we will understand the concept of sequencing of function calls in C, by demonstrating a simple implementation scheme for sub-program sequence control.

Functions in C - Part 1 of 5

Topics covered � Introduction to functions in C, understand how functions are defined in C, their broad constructs and invocation of a function from another function. Also understand function parameters and how to differentiate between formal and actual parameters of a function.

Control Statements in C

In this post you will understand how C handles repetitive statements and what are the various constructs available for loop control. We will deal with while, do-while and for loops. We will also take a look at how to implement nested loops.

Logical constructs in C - if..else & switch..case statements

A program cannot always be a sequential set of statements consisting of only assignment and input-output statements. While developing programs to solve any problem, it is often necessary to carry out a logical test and depending upon the outcome, a separate course of action is taken. Like most programming languages, C supports such conditional execution with the help of if..else and switch..case statements.

Data Input and Output functions in C

How a C program handles input-output of data? Learn how to read user inputs provided at the standard input device, and how to send data output to the standard output device.

Preprocessor Directive in C

In this article we will understand the necessity of preprocessor directives in C. We will discuss how to use #define and #include directives.

Elements of the C language - Operators and Expressions

Learn about the various operators used in the C programming language and how to use them in your C programs. Topics covered arithmetic operators, assignment operator, increment/decrement operators, conditional operators, relational & logical operators, type conversion and operator precedence.

Structure of a C Program

Get an overview of the structure of a C program.

Elements of the C Language - Identifiers, Keywords, Data types and Data objects

In this article you will learn about - the character set used in C language, keywords/reserved words in C, and the rules for naming identifiers. We will also look at the basic data types and how data objects are declared. We will also be looking at constants in C, and how they are specified.

ANSI C Compiler

Download the ANSI C Compiler from here to test all the codes which are provided in this section.

The C Language - An Introduction

An introduction to the C programming language and its history.


Refer a friendSitemapDisclaimerPrivacy
Copyright © How2Lab.com. All rights reserved.