Programming C Language Introduction

C programming language is said to be a middle level language because it combines the best elements of high-level languages with the control and flexibility of assembly language .

As a middle-level language, C allows the manipulation of bits, bytes, and addresses the basic elements with which the computer functions and C code is also very portable.Portability means that it is easy to adapt software written for one type of computer or operating system to another type.

All high level programming languages support the concept of data types. A data type defines a set of values that a variable can store along with a set of operations that can be performed on that variable. Common data types are integer, character, and floating-point. Although C has several built in data types, it is not a strongly typed language, as are Pascal and Ada. C permits almost all type conversions.

C specifies almost no run time error checking. For example, no check is performed to ensure that array boundaries are not overrun. and these types of checks are the responsibility of the programmer.

C does not demand strict type compatibility between a parameter and an argument.C allows an argument to be of any type so long as it can be reasonably converted into the type of the parameter and C provides all of the automatic conversions to accomplish this.

C allows the direct manipulation of bits, bytes, words, and pointers. This makes it well suited for system-level programming, where these operations are common.

C has only a small number of keywords, which are the commands that make up the C language. For example, C89 defined 32 keywords, and C99 adds only 5 more. High-level languages typically have many more keywords.

C is a structured language. The distinguishing feature of a structured language is compartmentalization of code and data. This is the ability of a language to section off and hide from the rest of the program all information and instructions necessary to perform a specific task. One way that you achieve compartmentalization is by using subroutines that employ local (temporary) variables.

By using local variables, you can write subroutines so that the events that occur within them cause no side effects in other parts of the program. This capability makes it very easy for your C programs to share sections of code. If you develop compartmentalized functions, you need to know only what a function does, not how it does it.

Structured languages typically support several loop constructs, such as while, do-while, and for. In a structured language, the use of goto is either prohibited or discouraged and is not the common form of program control . A structured language allows you to place statements anywhere on a line and does not require a strict field concept.

In C, functions are the building blocks in which all program activity occurs. They allow you to define and code individually the separate tasks in a program, thus allowing your programs to be modular.

After you have created a function, you can rely on it to work properly in various situations without creating side effects in other parts of the program. Being able to create stand alone functions is extremely important in larger projects where one programmer's code must not accidentally affect another's.

Related posts

Software testing prospective
INTRODUCTION TO C PROGRAMMING

Programming with C an introduction part two

Data types for C programming


C PROGRAMMING CHARACTER SET

CONSTANTS IN C PROGRAMMING

PROGRAMMING C VARIABLES

C PROGRAM INSTRUCTIONS

COMPILATION AND EXECUTION OF C PROGRAM

C PROGRAMMING RULES PART ONE

C PROGRAMMING RULES PART TWO

COMPILATION AND EXECUTION OF C PROGRAM

INSTRUCTIONS TO WRITE C PROGRAM

ARITHMETIC INSTRUCTIONS TO WRITE C PROGRAM

CONVERSION OF CONSTANTS IN C PROGRAM

PRIORITY OF AR THEMATIC OPERATIONS IN C

OPERATORS ASSOCIATIVITY IN C

IF STATEMENT

MULTIPLE STATEMENTS IN IF

IF AND ELSE

NESTED IF AND ELSE


BREAK

CONTINUE AND DO WHILE IN C LANGUAGE

SWITCH IN C PROGRAMMING

FUNCTIONS IN C PROGRAMMING


Functions and usage in C part two

Coding in C functions

1 comment: