0% found this document useful (0 votes)
99 views

Programming Language

There are three main types of programming languages: scripting languages, normal languages, and hybrid languages like Java. Scripting languages are interpreted line-by-line while normal languages are compiled into executable files. To learn a new programming language, one should start with basic programs like "Hello World" to learn syntax, then practice variable declaration, conditional statements, loops, functions, operators, and data structures to become familiar with the language's concepts and libraries. The process of learning a new language is eased by comparing it to previously learned languages.

Uploaded by

Sushmit Karar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Programming Language

There are three main types of programming languages: scripting languages, normal languages, and hybrid languages like Java. Scripting languages are interpreted line-by-line while normal languages are compiled into executable files. To learn a new programming language, one should start with basic programs like "Hello World" to learn syntax, then practice variable declaration, conditional statements, loops, functions, operators, and data structures to become familiar with the language's concepts and libraries. The process of learning a new language is eased by comparing it to previously learned languages.

Uploaded by

Sushmit Karar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 4

INTRODUCTION TO PROGRAMMING LANGUAGE TYPES: Scripting Language: Scripting language codes are interpreted by interpreter line by line.

. Interpreter creates a executable file from the source file. Example : TCL(Tickle),TK etc. Normal Language:
Codes are compiled by the compiler if and only if whole program are error free. Source files are compiled to binary executable file. Example: C, C++ etc. Special Note: Java is one kind of language which has both the features of scripting language as well as normal language. Java compiler/interpreter produces a intermediate byte-code which is machine(platform) independent.

Another way we can classify the programming language: Procedure(Imperative or Declarative) Type: There is various procedure such as if,else, switch-case, variable declaration, various commands in this type of language. Example: C,JAVA , TCL etc. Functional Type: Example: LISP, Haskell etc. Logic Type

APPROACH TO LEARN NEW PROGRAMMING LANGUAGE We can approach in three stages to learn a new programming language. 1. Try to learn the syntax of the language. 2. We should able to apply new programming concept 3. We should try to familiar with the language library in sometimes 4. If we already familiar with some programming language we can easily learn any new programming language by comparing with the known language and learning the new things & concepts. Syntax Learning: There are few steps through which we can familiar with the syntax of new language. Hello World Program: At first we can try to write a program which prints Hello World. By doing this we can familiar with editor, compiler, debugger. Some basic functions, like- printf in case of C. Variable Declaration: Next we can learn how to declare a variable. Is it necessary to initialize a variable at the declaration time? We can find the answer by doing some basic programming. We should familiar with variable types, such as- numeric or string variable. In case of C there is int, float, char types of variable exist. Assigning Value: Next we will learn how to assign a value to a variable. Variable should contain some value. There are different commands in different languages. Example: In C, int a = 19; float b = 5.6; In Tcl, set a 19;

Conditional Statement: Next we can learn to use conditional statement in programming, likeif-else, switch-case etc. 1. if( some condition) { block of statements } else(some condition) { block of statements } 2. switch( some variable) { case 1: statements break; case 2: statements break; default: statements break; } Loops: Next we will learn about looping concept when we use loops. Whenever we have to repeat a task for few times we can do this by simply using loops, such as- for, while, do-while, foreach etc. Function or Procedure: In programming sometimes we may need to perform the same task. In such case we can define a function first then we can call the function whenever we need. Generally there are two types of function calling method- call by value (arguments passed by their value) & call by reference (arguments passed by their address). Expressions & Operators: Next we will familiar with various expressions and operators. Such as-

a+b; ++a; There are various types of operators: Arithmetic Operators: +, -,*,/ ,% etc. 2. Logical Operators: &&, !,|| etc. 3. Bitwise Operators: bitwise &,^,| etc. Data Structures:
1.

Next thing we can try to create data structures, like- in C stack, queue, linked list, structure, union; in C++ class etc. We can easily learn how to create structures, how to insert or delete elements etc.

You might also like