Introduction to Programming

Introduction to Programming

A program is a set of instructions given to the computer to do some tasks and produce the output. A set of rules that tells a computer what operations to perform is called a programming language. There are many programming languages. C# language is one of the programming languages.

Program Structure

Data:

    • Concept of type
    • Storage class
    • Definition & use
    • Scope & visibility

Executable Statements:

    • Sequence
    • Iteration
    • Flow Chart
    • Conditional

Program Development: steps

  • Run the editor, type the program, and save it
  • Compile the program
  • Link the program (.exe)

Program Environment

Program Environment

Running the program

  • Double click the .exe file
  • Type the name of .exe file on command prompt

Interpreted programs

  • Type the name of the source program as a parameter to the interpreter
    Execution Environment:

Steps carried out by the OS

  • Allocate the memory for the program
  • Loads the program from secondary storage

Programming Language Paradigms

The alternative approaches to the programming process are called programming language paradigms.

Types of programming language paradigms are:

  • Procedural Programming (Fortran, C)
  • Scripting Programming (VBScript, JavaScript)
  • Functional Programming (LISP)
  • Object Oriented Programming (C++)
  • Object Based Programming (VB)

For large programs and applications the complexity was increasing while using procedural languages. So, the developers found out structured programming language like C which later on also became complex in developing large projects. So developers came up with the Object Oriented programming (OOPs) language which worked around both data and function.

Data Structures

Types of data structures are:

  • Tree - A tree is made up of nodes. A node has exactly 1 parent(root) . Each binary node may have 0,1 or 2 children. A balanced binary tree has two children for all nodes.

  • Stack - A stack follows Last In First Out structure. It can be implemented using Array and Linked List. Items are deleted and inserted from the same end.

  • Queue - It follows First In First Out structure. It can be implemented using Array and Linked List. Items are deleted & inserted from different ends Items are removed form front & added from rear.

  • Linked List - Linked list contains data as well as pointer. Data node contains information and pointer stores the address.

  • Graph - It is made up of nodes. While the tree could be parsed, graph cannot be parsed.

I hope this tutorial has helped you. Please send feedbacks and comments.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now