Professional Documents
Culture Documents
MYLAPORE, CHENNAI-600004
SUBJECT : COMPUTER SCIENCE
CLASS :VIII
TOPIC :INTRODUCTION TO
LANGUAGE- COMMUNICATION TOOL
Hello
????
PROGRAMMING LANGUAGE
❖ To communicate with computers we must know a language which it can understand.
❖ They are called are programming languages.
❖ Examples of programming languages are C, C++, JAVA, BASIC, etc.
❖ The set of instructions that tells a computer to perform some operations are called
program.
❖ A person who creates these program are called programmers.
WHAT IS C++?
It is a popular programming language
It was developed by Bjarne Stroustrup in AT
& T Bell laboratory.
It is an Object Oriented Programming (OOP)
language.
Some of the popular real time applications
which use C++ are Amazon, Windows OS,
Youtube.
WHAT IS OOP?
The main objective of OOP is to break the problem down into number of
smaller parts that are simpler and easier to understand.
There are few principles and concepts that form the foundation of OOP. They
are
Object
Class
Data Abstraction
Polymorphism
COMPILER
What is a compiler?
Compiler is a translator which converts the high level language (source code)
into binary language (object code).
What is binary language?
Binary consists of only 0s and 1s which a computer can understand.
What is high level language?
High level language is any programming language used to write programs.
Example are C, C++, JAVA, etc.
Video link on Computer Languages:
https://youtu.be/H9Nyj5PZxX4
INTRODUCTION TO DEV C++
DEV C++ is a compiler used in many places to write and execute C++
programs.
It can be downloaded from the following link
https://sourceforge.net/projects/orwelldevcpp/
Click on download button.
INTRODUCTION TO EDITOR WINDOW
After installing DEV C++, open the application it will start with the following screen.
INTRODUCTION TO EDITOR WINDOW
Main()
It is used to indicate that the execution of the program will begin from this point
followed by the program statements enclosed within braces.
Program body
It contains the program statements which cause the action to be taken. The curly
braces indicates the scope of the program.
SAMPLE PROGRAM
#include
main()
Comments
Program
body
COUT STATEMENT
One of the most widely used statement in C++ language is the cout statement.
This statement is used to display any message on the output screen.
cout stands for common output.
For example if I want to print the text COMPUTER SCIENCE, the following
statement has to be included in the program body
cout<<“ COMPUTER SCIENCE”;
<< - this is called as insertion operator.
Any text written within double quotes in a cout statement is displayed as such.
Always c++ statements end with semicolon.
SAVING THE PROGRAM
After saving the file, select Execute→ Compile & Run from the menu
bar.
Now the complier checks the program.
If there is no error in the program output will be displayed as shown
below
EXERCISE