Logical Structure of Computer
»
. ALU: It is arithmetic & logical Unit. It
handles all arithmetic & logical
operations
2. CU: It is control unit. It controls flow of
execution of programs.
ALU & CU are components of Processor
3. Memory (RAM): It is used to store
binary codes and data of program.
Processor reads instructions/data from
RAM and performs the operation.
4. Input: It is data on which operation is performed. <*
Input is generally supplied through keyboard.
5. Output: It is result of an operation. Output is
generally displayed on monitor.
a
. Program: It is set of instructions given to computer
for performing specific task.Analogical block diagram
Human Languages
Programming Languages
1. Token: Smallest individual entity of ores,
programming language is called as token. e
Keywords, operators, constants, identifiers
(variables) are tokens of C
2. Keyword: Keyword is a special reserved
word whose meaning is already known to
compiler.
It represents particular instruction.
3. Operator: It is a special symbol which
represents particular operation.
4. Constant: It is an entity whose value is
known and fixed. In computer programs,
we can directly write constant values.
5. Variable: It is an entity whose value is
not known or not fixed. In programming,
variables are handled through memory.History of C programming
C programming language is developed by
Mr. Dennis Ritchie in 1972 at AT & T bell
laboratories, USA.
* 1967
* Martin Richards
* 1970
fe + Ken Thompson
(o “972:
* Dennis Ritchie
General Structure of C Program
+ Optional
o/s
* #include
+ #define
* Global variables
* Function declarations
void main(){ }
* Body of user defined
functionStructure of Simple C Program
#include
void main()
{
variable declaration
input
processing
output