Features of C Programming Language
Features of C Programming Language
Features of C Programming Language
It allows direct manipulation of bits, bytes, words, and pointers. Thus, it is ideal for system level-
programming.
b) Structured Language : The term block structured language does not apply strickly to C.
Technically, a block-structured language permits procedures and function to be declared inside
other procedures or functions. C does not allow creation of functions, within functions, and
therefore cannot formally be called a block-structured language. However, it is referred to as a
structured language because it is similar in many ways to other structured languages like ALGOL,
Pascal and the likes.
C allows compartmentalisation of code and data. This is a distinguishing feature of any structured
language. It refers to the ability of a language to section off and hide all information and
instructions necessary to perform a specific task from the rest of the program. Code can be
compartmentalised in C using functions or code blocks. Functions are used to define and code
separately, special tasks required in a program. This allows programs to be modular. Code block
is a logically connected group of program statements that is treated like a unit. A code block is
created by placing a sequence of statements between opening and closing curly braces.
Eg. Program written in DOS Operating System can be easily compiled on UNIX operating system
by copying the source code on to the UNIX operating system and compiling it over there.
d) Fast Speed ( Better Performance ) : The execution speed of programs written in C is very
fast since the statements are converted to few machine instructions which directly go into the
processor for implementing the task.
e) Keywords with Libraries : The Original ‘C’ ( developed by Dennis Ritche ) is having only 32
keywords to perform all tasks which sometimes makes programming very tedious. But now we
have ready made libraries of functions which can be used to perform simple tasks very easily
without much of the coding. Library functions like printf() and scanf() can be used for Input and
Output, they belong to stdio (Standard Input Output ) library.
f. Compiler Language : C Language uses COMPILER to translate your instruction code to
machine code. Compiler takes the text source code and coverts to object code and then Linker
( part of compiler only ) converts it to executable code by taking reference of Library.
o Turbo C
o Borland C
o Microsoft C
Note : Though there is only small difference in all these compilers, Let’s make it
clear that this tutorial will deal with Turbo C 2.0
/* my first c program */
main()
{
printf("hello world");
Keys Operation
F9 Compile Only
F3 Load File
; as statement terminator : In C ‘;’ is used as statement terminator. That means we can write as
many statements as we want on a single line since statement is not terminated with new line
character.
Case sensitive : C is very sensitive as far as Case is concerned. var & VAR are two different
entities in c. One should remember in what case the variable were declared. For convenience
everything is declared in lower case only.
Starts with main() function
Block of statements ( ‘{‘ for beginning of block & ‘}’ for end of block )
main()
printf("\nDennis Ritchie");
Escape Sequences
World