C development on Linux – Types, variables, operators – III.

Introduction

As promised, starting with this part of our C development article, we will get started with learning, without further introduction. I couldn’t find no better way to start other than this, because types, operators and variables are an essential part of C and you will use them all the time when writing your own programs. For example, you can write a simple C program without defining your own functions, but it’s harder to do that without some variables, unless you wanna stick to “Hello, world!”. A variable is nothing more than a location in memory holding a value that can be altered (hence the name). But before you declare a variable you must know what kind of value you want it to hold, and here you will use types. And in order to operate on those variables, you’ll need…operators, of course. I intend to make this course as concise as possible, so I recommend attention and as usual, practice.

Read more

C program compilation process

C development on Linux – Introduction – I.

Introduction

What you’re just reading is the beginning of series of articles dedicated to development on Linux systems. However, with minor modifications (if any), you will be able to use this knowledge you will get by reading our series on any other system that uses the same tools (OpenIndiana, BSD…). This first article will deal gradually with the intricacies of writing C code on Linux. You are expected to have basic programming knowledge, either on Linux/Unix systems or on other platforms. The idea is that you should know the basics of programming, like what a variable is or how to define a structure. Even though, you will get this information from this article, we won’t insist very much on beginner-level concepts. A word of warning: we won’t include everything there is to tell about C, because that would take lots of space and of course, we don’t actually know everything about C.

Why C?

Some of you might argue that C is not the best beginner-level language ever. Agreed, but again, you’re expected to have some basic programming knowledge, for one. Second, C and Unix, and Linux afterwards, are intimately tied together that it only seemed natural to start our development series with C. From the kernel, of which a substantial part of it is written in C, to lots of everyday user-land applications, C is used massively on your Linux system. For example, GTK is based on C, so if you’re using Gnome or XFCE applications, you’re using C-based applications. C is an old, well-established programming language, vital tool in many parts in the IT world, from embedded systems to mainframes. Therefore, it is only fair to assume that C skills will not only enrich your CV, but they will also help you to solve many issues on your Linux system, that is only if you take this seriously and practice a lot by reading and writing C code.

Read more

C programming tutorial

This series of articles is dedicated to development on Linux systems.

This tutorial focuses on C programming and covers such concepts as types, operators and variables, flow control, functions, pointers and arrays, structures, basic I/O, coding style and building a program as well as packaging for Debian and Fedora or getting a package in the official Debian repository.

Read more