Keywords and Identifiers in C programming

In previous post, we executed our first C program. That was interesting and a stepping-stone towards complex C programs.

A C program consists of various programming elements. These programming elements are the building blocks of any simple or complex application. Programming elements such as keyword, identifier, operator, expression, constant etc.

In this section and subsections, I am will cover all fundamental programming elements of a C program.

Read more

The C compilation process

In the series of C tutorial we learned some basic of C programming language, configured C compiler and learned to compile and execute C program.

Since the compilation and execution of first C program, I must answer few questions before moving ahead. Questions such as – what is meant by compilation, what happens during compilation, how a simple plain text file gets converted to executable binary file.

In this post I will take a deep dive into the C compilation process. So let’s begin.

Read more

Various declarations of main() function in C

main() is a special function in C programming language. Reasons that make it special are –

  • It defines starting point of the program.
  • main is the first executed function.
  • It controls all other child functions.
  • Behaves as both user-defined and pre-defined function.
  • Every software written in C must have a main function.

C is a popular programming language. There exist many compilers and standards for C. So exists many variants of main function declaration. In this post we will learn various declarations of main one by one. Later we will see the standard definition of the main function in C.

Read more

How to create and run C program using CodeBlocks

Compiling and executing C programs using command prompt has always been a nightmare to programmers. It is time taking process.

Once you got strong hold to compile and execute C programs using command line, it’s time to switch to IDE. However, I always recommend a beginner to use command prompt for sometime for compiling and executing C programs.

CodeBlocks is a powerful IDE for creating, compiling, executing and debugging C/C++ programs. In previous post, I explained installation and configuration of CodeBlocks. In this post we will move further and see how to create, compile and run a C program in CodeBlocks.

Read more

How to compile and run C program using command line in Windows

This is one of the most frequently asked question to me. Creating and compiling a C program using an IDE is like waving some magic wand. However, a beginner must know how to compile and run C programs using command line in Windows based operating system.

To create a C program using command line you need two basic software’s.

  1. A text editor (such as Notepad or Notepad++ ).
  2. A C compiler.

Read more

Install and configure CodeBlocks with C compiler

Programming in C is fun and interesting. In this entire series of C programming tutorial. You will create, edit, compile and execute many C programs. Before we begin to learn about C programs, you must configure your computer with C compiler.

To create and execute a C program you require minimum two software’s.

  1. A text editor (such as Notepad, Notepad++, Gedit, TextEdit, Sublime etc.)
  2. A C compiler (Optionally CodeBlocks IDE).

In this post, I will discuss about C compiler and steps to setup C compiler along with CodeBlocks in your machine.

Read more

Queue implementation using linked list, enqueue and dequeue in C

Write a C program to implement queue data structure using linked list. In this post I will explain queue implementation using linked list in C language.

In previous post, I explained about queue implementation using array. Here, I will explain how to implement a basic queue using linked list in C programming. Along with I will explain how to perform enqueue and dequeue operations on Queue in C language.

Read more