C language was developed in the year 1972 by Dennis Ritchie at AT&T's Bell Laboratories, USA.
C is a procedural language (executes the program step-by-step)
Basic features of C language
- simple and efficient
- portable (it can be used in any operating system)
- extensible (can add user defined functions to it)
- modularity (not written as a paragraph but in shorter modules)
- speed (it compiles and gives output quicker)
- case sensitive ( small 'a' and capital 'A' are taken as two different variables and not as one and the same)
Structure of a C program
- Documentation section - any comments are added after "//" and is not compiled by the compiler "/* */" is used if the comment is written in more than one line.
- Linking section - Header file that links library files should be included - #include<stdio.h>
- Definition section - Assigning a value to a variable - #define pi=3.14. It is difficult to change the value of a number everywhere in the program so this is used to conserve time.
- Global declaration section - variables are classified into local and global variables. global variables can be declared and used everywhere throughout the program whereas local variable can only be declared and used in a function.
- Main section - Program execution starts only from main section.
- Sub Program Section - Usually written under main program.
Basic Functions of a Computer
- Accepts data
- Processes data
- Produces output
- Stores result
Features of a Computer
- Speed - A computer can process data very fast at the rate of millions of instructions per second.
- High degree of accuracy - A computer can produce the accurate result even if there are lots of information to process.
- Diligence - Even after long hours of usage, a computer does not get tired or fatigued. It can perform long and complex tasks at the same rate and accuracy from the start till the end.
- Storage - Large volumes of data and information can be stored and can also be retrieved whenever required.
- Versatility - It can perform different types of tasks with the same ease.
"I really enjoyed reading this post, I always appreciate topics like this being discussed to us. Private tutor Winter Park Thanks for sharing."
ReplyDelete