Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Basic Programming

Concepts
Outline
Data types
Variables
Operators
Control structures
Arrays
Functions
Composite Data types
Data types
Basic data types
Numeric
Integer

Floating point

Character
Logical
String
Variables
Container holding data
Data can be changed
Constant Data cant be modified
Actions to a variable,
Declaring or creating a variable
Initializing a variable
Storing data to a variable
Retrieving or fetching data from a variable
Operators
Specific symbols doing specific operations
Types,
Unary - involves only one operand
++
--

Binary - involves two operand


+, -, *, /, >, <,
Control structures
Types,
Sequence
Selection
If
If-else

switch

Iteration
While

Do-while

for
Arrays
Collection of similar data types together
Functions
Named group of programs that perform
specific task
Black box
gets input and gives output
Internal process is hidden
Signature
returntype functionname(datatype parameters){

}
Composite Data type
More than one data type into single entity
In C structures
struct student{
int rollno;
string name;
string dept;
}
In C++, Java Class
class student{
int rollno;
string name;
string dept;
}

You might also like