Monthly Archives: October 2020

Programming with ‘C’

Unit 1– Introduction to ‘C’ – Programming                         C – Introduction C – Basic Structures C – Basic Syntax C – Data Types C – Constants Integer Constants Floating-point Constants Character Constants (Escape Sequence Characters) String Constants C – Variables Local variables Global variables Static variables  External variables Automatic variables  Unit 2 – Operators and… Read More »

01. C – Introduction

C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system. The main features of C language include low-level access to memory, a simple set of keywords, and clean style, these features make C language suitable… Read More »

02. C – Basic Structure

In this article, we are going to learn about the basic structure of a C program. A C program is divided into different sections. There are six main sections to a basic c program. The six sections are, Documentation Link Definition Global Declarations Main functions Subprograms So now that the introduction is out of the way, let… Read More »

03. C – Basic Syntax

You have seen the basic structure of a C program, so it will be easy to understand other basic building blocks of the C programming language. Tokens in C Tokens are the smallest elements of a program, which are meaningful to the compiler. The following are the types of tokens: Keywords, Identifiers, Constant, Strings, Operators, etc. printf(“Hello,… Read More »

04. C – Data Types

Data types in c refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted. The types in C can be classified as follows − Sr.No. Types & Description 1 Basic… Read More »

05. C – Constants (Literals)

Constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are enumeration constants as well. Constants are treated just like regular… Read More »

06. C – Variables

The naming of an address is known as a variable. Variable is the name of a memory location. Unlike constant, variables are changeable, we can change the value of a variable during the execution of a program. A programmer can choose a meaningful variable name. Example: average, height, age, total, etc. Variable Declaration: A typical variable… Read More »

07. C – Operators

An operator is a symbol that tells the compiler to perform specific mathematical or logical functions. C language is rich in built-in operators and provides the following types of operators – Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators Misc Operators We will, in this chapter, look into the way each operator works.… Read More »

08. C – Operators Precedence

The precedence of operators determines which operator is executed first if there is more than one operator in an expression. Let us consider an example: In C, the precedence of * is higher than – and =. Hence, 17 * 6 is evaluated first. Then the expression involving – is evaluated as the precedence of – is higher than that of =. Here’s a table of operators precedence from higher… Read More »

09. C – Standard Library Functions

C Standard library functions or simply C Library functions are inbuilt functions in C programming. The prototype and data definitions of these functions are present in their respective header files. To use these functions we need to include the header file in our program. For example, If you want to use the printf() function, the header file <stdio.h> should… Read More »