PROGRAMMING LANGUAGE CONCEPTS TRB CSI › Programming with C++ › programming language concepts

PROGRAMMING LANGUAGE CONCEPTS

Programming Language என்பது computer-க்கு ஒரு task எப்படி செய்ய வேண்டும் என்பதை instructions மூலம் தெரிவிக்கப் பயன்படும் ஒரு formal language. Simple-a சொன்னால்: Programmer-ன் idea-வை computer புரிந்துகொள்ளக்கூடிய instructions-ஆக எழுத உதவும…

Free Beginner 24 min 240 cards 28 programs 10 MCQs v2

PROGRAMMING LANGUAGE CONCEPTS

Definition
Meaning

Programming Language என்பது computer-க்கு ஒரு task எப்படி செய்ய வேண்டும் என்பதை instructions மூலம் தெரிவிக்கப் பயன்படும் ஒரு formal language.

Programmer-ன் idea-வை computer புரிந்துகொள்ளக்கூடிய instructions-ஆக எழுத உதவும் language தான் Programming Language.

  • C
  • C++
  • Java
  • Python
  • C#
  • JavaScript
Definition
Meaning

1. WHY DO WE NEED A PROGRAMMING LANGUAGE?

Definition
Meaning

Computer அடிப்படையில் binary instructions-ஐ மட்டுமே execute செய்கிறது.

Key term0 and 1

ஆனால் மனிதர்கள் நேரடியாக binary-ல் பெரிய programs எழுதுவது மிகவும் கடினம்.

  1. Human Problem
  2. Programming Language
  3. Translator
  4. Machine Language
  5. Computer Execution
int a = 10;
int b = 20;
cout << a + b;
Output
30

Programmer simple code எழுதுகிறார்.

Computer அந்த code-ஐ நேரடியாக புரிந்து கொள்ளாது.

Compiler போன்ற translator அதனை machine instructions-ஆக மாற்றுகிறது.

BASIC ELEMENTS OF A PROGRAMMING LANGUAGE

  1. Programming Language
  2. +-- Syntax
  3. +-- Semantics
  4. +-- Variables
  5. +-- Constants
  6. +-- Data Types
  7. +-- Operators
  8. +-- Expressions
  9. +-- Statements
  10. +-- Control Structures
  11. +-- Functions
  12. +-- Scope
  13. +-- Data Structures
  14. +-- Memory Managementஇவற்றை ஒவ்வொன்றாக பார்க்கலாம்.

SYNTAX

Definition
Meaning

Syntax என்பது ஒரு programming language-ல் code எழுத வேண்டிய grammatical rules.

ஒரு program எப்படி எழுதப்பட வேண்டும் என்பதற்கான விதிகள் தான் Syntax.

int x = 10;

Correct.

int x = 10

இங்கு semicolon ; இல்லை.

அதனால் syntax error ஏற்படலாம்.

Simple Explanation
Core idea

English language-க்கு grammar இருப்பது போல programming language-க்கு syntax இருக்கும்.

Detail 01

English → Grammar

Detail 02

Programming Language → Syntax

Real Life Example
Example
  • if (x > 10)
  • {
  • cout << x;
  • }
  • if x > 10
  • {
  • cout << x;
  • }
  • C++-ல் condition parentheses-ல் எழுதப்பட வேண்டும்.
Memory Trick

Syntax = Structure

அதாவது:

எப்படி எழுதுவது?

SEMANTICS

Definition
Meaning

Semantics என்பது program statement-ன் meaning.

Syntax code-ன் structure பற்றி பேசும்.

Semantics code என்ன செய்கிறது என்பதைப் பற்றி பேசும்.

Program
Example
C++ 1 lines
1x = x + 1;
Explanation
Core idea

If:

இதன் semantic meaning
  1. Current x value
  2. Add 1
  3. Store result again in x
Program
C++ 1 lines
1x = 5
Program
then
C++ 1 lines
1x = x + 1
Program
C++ 1 lines
1x = 5 + 1
Program
C++ 1 lines
1x = 6

SYNTAX VS SEMANTICS

Table
SyntaxSemantics
Code structureCode meaning
Grammar rulesMeaning of instructions
எப்படி எழுதுவதுஎன்ன செய்கிறது
Example: ; requiredExample: x=x+1 meaning
Structural correctnessMeaning correctness
TRB Point

Frequently asked:

Syntax specifies the form of a program, while semantics specifies its meaning.

TOKENS

Definition
Meaning

Programming language-ல் உள்ள smallest meaningful units-ஐ Tokens என்று அழைக்கிறோம்.

Explanation
Example
Core idea

int total = 100;

இதில்
  • int → keyword
  • total → identifier
  • = → operator
  • 100 → constant
  • ; → punctuation/special symbol
Detail 02

இவை அனைத்தும் tokens.

KEYWORDS

Definition
Meaning

Language-ல் predefined meaning கொண்ட reserved words-ஐ Keywords என்று அழைக்கிறோம்.

  • int
  • float
  • if
  • else
  • while
  • for
  • return
  • class
  • public
  • private
  • virtual
  • Keyword-ஐ variable name ஆக பயன்படுத்த முடியாது.

int while = 10;

while already keyword.

IDENTIFIERS

Definition
Meaning

Programmer variables, functions, classes போன்றவற்றிற்கு கொடுக்கும் names-ஐ Identifiers என்று அழைக்கிறோம்.

Explanation
Example
Core idea

int studentAge;

Detail 01

Here:

Program
C++ 1 lines
1studentAge = identifier
Explanation
Core idea

add function identifier.

Another example

int add(int a, int b)

VARIABLE

Definition
Meaning

Variable என்பது program execution போது value store செய்ய பயன்படும் named memory location.

Explanation
Example
Core idea

int age = 25;

Conceptually
  • Variable name : age
  • Data type : int
  • Value : 25
Memory
  • +---------+
  • | 25 |
  • +---------+
  • age
Detail 03

Later:

Program
C++ 1 lines
1age = 30;
Explanation
Core idea

Value change செய்யலாம்.

Detail 01

அதனால் இது variable.

CONSTANT

Definition
Meaning

Program execution போது value change செய்யக்கூடாத fixed value-ஐ Constant என்று அழைக்கிறோம்.

Explanation
Example
Core idea

const int MAX = 100;

Detail 01

Now:

Program
C++ 1 lines
1MAX = 200;
Explanation
Core idea

செய்ய முடியாது.

Detail 01

VARIABLE VS CONSTANT

Table
VariableConstant
Value change செய்யலாம்Value normally change செய்ய முடியாது
Mutable storageFixed value
int x=10;const int x=10;

DATA TYPE

Definition
Meaning

Variable எந்த வகையான value store செய்யும் என்பதை குறிப்பிடுவது Data Type.

Explanation
Example
Core idea

int age = 25;

Detail 01

age integer value store செய்கிறது.

Detail 02

float salary = 25000.50;

Detail 03

Decimal value.

Detail 04

char grade = 'A';

Detail 05

Single character.

Detail 06
  1. BASIC DATA TYPESData Types
  2. +-- int+-- char+-- float+-- double+-- bool
Detail 07

int age = 25;

Detail 08

char grade = 'A';

Detail 09

float mark = 89.5;

Detail 10

double amount = 12345.6789;

Detail 11

bool pass = true;

DATA OBJECT

Definition
Meaning

ஒரு data type-க்கு உட்பட்ட value store செய்யும் memory entity-ஐ Data Object என்று கூறலாம்.

Explanation
Example
Core idea

int x = 10;

Detail 01

x என்பது integer type object.

அதாவது

Type → int

Detail 03

Object → x

Detail 04

Value → 10

OPERATOR

Definition
Meaning

Values அல்லது variables மீது operations செய்ய பயன்படும் symbol = Operator.

Program
Example
C++ 1 lines
1c = a + b;
List
இங்கு
  • = arithmetic operator
Explanation
Core idea
  1. = = assignment operatorOPERATOR TYPESOperators
  2. +-- Arithmetic+-- Relational+-- Logical+-- Assignment+-- Increment / Decrement+-- Bitwise+-- Conditional

ARITHMETIC OPERATORS

List
  • Addition
  • Subtraction
  • Multiplication
Explanation
Core idea

/ Division
% Modulus

Detail 01
int a = 10;
int b = 3;
Program
C++ 1 lines
1cout << a + b;
Verified output
13
Learning Run Mode — this is the output the author verified, not a live execution.
Output
13

RELATIONAL OPERATORS

Two values compare செய்ய பயன்படும்.

Quote

Greater than

< Less than

Quote

= Greater than or equal

<= Less than or equal

== Equal

!= Not equal

Explanation
Example
Core idea

10 > 5

Output
Result
true

LOGICAL OPERATORS

Multiple conditions combine செய்ய பயன்படும்.

&&
AND
||
OR
!
NOT
Program
Example
C++ 1 lines
1if (age >= 18 && citizen == true)
Explanation
Core idea

இரண்டு conditions-மும் true ஆக இருந்தால் block execute ஆகும்.

EXPRESSION

Definition
Meaning

Variables, constants மற்றும் operators சேர்ந்து ஒரு value produce செய்யும் combination-ஐ Expression என்று அழைக்கிறோம்.

Explanation
Example
Core idea

a + b

Detail 01

இது expression.

Another

a + b * c

Detail 03

இதுவும் expression.

STATEMENT

Definition
Meaning

Program-ல் ஒரு complete instruction-ஐ Statement என்று அழைக்கிறோம்.

Program
Example
C++ 1 lines
1x = 10;
Explanation
Core idea

ஒரு statement.

Program
C++ 1 lines
1cout << x;
Explanation
Core idea

ஒரு statement.

Detail 01

EXPRESSION VS STATEMENT

Program
Example
C++ 1 lines
1x = a + b;
Explanation
Core idea

Expression.

இதில்

a + b

Detail 02

முழுவதும்:

Program
C++ 1 lines
1x = a + b;
Explanation
Core idea

Statement.

DECLARATION

Definition
Meaning

ஒரு variable அல்லது function-ன் name மற்றும் type-ஐ compiler-க்கு அறிமுகப்படுத்துவது declaration.

Explanation
Example
Core idea

int x;

Compiler-க்கு

x என்ற integer variable இருக்கிறது.

Detail 02

என்று தெரிவிக்கப்படுகிறது.

INITIALIZATION

Definition
Meaning

Variable create செய்யும் நேரத்திலேயே initial value கொடுப்பது Initialization.

Key termint x = 10;

Declaration + Initialization

ASSIGNMENT

Definition
Meaning

Variable already இருக்கும்போது value கொடுப்பது assignment.

Key termint x;

Declaration.

Key termx = 10;
Practice
Assignment.

DECLARATION VS INITIALIZATION VS ASSIGNMENT
int x;

Declaration.

int y = 20;

Declaration + Initialization.

x = 30;

Practice
Assignment.

MCQ IMPORTANT

= means:

Assignment Operator

== means:

Equality Comparison

CONTROL STRUCTURES

Definition
Meaning

Program execution எந்த order-ல் நடைபெற வேண்டும் என்பதை control செய்வது Control Structure.

Sequence

Selection

Definition
Meaning
  • 1. Iteration
  • 2. SEQUENCE
Definition
Meaning

Statements one after another execute ஆகும்.

Program
Example
C++ 4 lines
1int a = 10;
2int b = 20;
3int c = a + b;
4cout << c;
Explanation
Flow
  1. Statement 1
  2. Statement 2
  3. Statement 3
  4. Statement 4

SELECTION

Explanation
Core idea

Condition அடிப்படையில் ஒரு path select செய்வது.

Examples

if

Detail 02

if-else

Detail 03

switch

Program
Example
C++ 8 lines
1if (mark >= 50)
2{
3    cout << "Pass";
4}
5else
6{
7    cout << "Fail";
8}
Explanation
Flow
  • Condition
  • / \
  • True False
  • | |
  • Pass Fail

ITERATION

Explanation
Core idea

Same statements repeated execute செய்யப்படுவது Iteration.

Examples

for

Detail 02

while

Detail 03

do-while

Program
Example
C++ 4 lines
1for (int i = 1; i <= 5; i++)
2{
3    cout << i;
4}
Verified output
12345
Learning Run Mode — this is the output the author verified, not a live execution.
Output
12345

FUNCTION

Definition
Meaning

ஒரு specific task perform செய்யும் reusable block of code = Function.

Explanation
Example
Core idea

int add(int a, int b)
{
return a + b;
}

Detail 01

Calling:

Program
C++ 1 lines
1cout << add(10,20);
Verified output
30
WHY FUNCTIONS?
Learning Run Mode — this is the output the author verified, not a live execution.
Output
30
WHY FUNCTIONS?

Same code repeatedly எழுத வேண்டிய நிலை ஏற்படலாம்.

  • Code Reuse
  • Modularity
  • Easy Testing
  • Easy Debugging
  • Easy Maintenance

PARAMETER AND ARGUMENT

int add(int a, int b)

a and b = parameters.

add(10,20);
10 and 20 = arguments.
Memory Trick
Definition
Parameters
Calling
Arguments

SCOPE

Definition
Meaning

ஒரு variable program-ல் எந்த பகுதிகளில் accessible ஆகும் என்பதை Scope தீர்மானிக்கிறது.

  • Local Scope
  • Global Scope

LOCAL VARIABLE

Definition
Meaning

Function/block உள்ளே declare செய்யப்படும் variable.

void test()
{
int x = 10;
}

x local variable.

test() வெளியே அதை access செய்ய முடியாது.

GLOBAL VARIABLE

Definition
Meaning

Functions வெளியே declare செய்யப்படும் variable.

Key termint x = 10;
  • void test()
  • {
  • cout << x;
  • }

x global variable.

Program-ன் multiple functions access செய்ய முடியும்.

Table
LocalGlobal
Function/block உள்ளேFunctions வெளியே
Limited scopeWider scope
Block முடிந்ததும் normally lifetime முடியும்Program execution முழுவதும் இருக்கலாம்

TYPE SYSTEM

Definition
Meaning

Programming language values-ஐ different types-ஆக classify செய்து அவற்றின் operations-ஐ control செய்யும் mechanism = Type System.

Explanation
Example
Core idea

int x = 10;

Detail 01

x integer.

Detail 02

string name = "Raja";

Detail 03

name string.

Detail 04

Type system தவறான operations-ஐ detect செய்ய உதவும்.

STATIC TYPING

Explanation
Core idea

Variable-ன் type compile time-ல் தெரியும்.

Examples
  • C
  • C++
  • Java
C++

int x = 10;

Detail 03

x type explicitly integer.

DYNAMIC TYPING

Explanation
Core idea

Variable type runtime-ல் determine செய்யப்படும் languages.

Detail 01

Python:

Program
C++ 1 lines
1x = 10
Explanation
Core idea

Python இதை allow செய்கிறது.

Later

x = "Hello"

Detail 02

STATIC VS DYNAMIC TYPING

Table
Static TypingDynamic Typing
Type compile time-ல் determinedRuntime-ல் determined
C++, JavaPython, JavaScript
More compile-time checkingMore runtime flexibility

ABSTRACTION

Definition
Meaning

Unnecessary implementation details-ஐ hide செய்து essential information மட்டும் காட்டுவது Abstraction.

Real Life Example
Real-life example

Accelerator
Brake
Steering

பயன்படுத்த தெரிந்தால் போதும்.

Engine உள்ளே combustion எப்படி நடக்கிறது என்பது driver-க்கு அவசியமில்லை.

Programming-லும் அதே concept.

Explanation
Example
Core idea

sort(data);

Detail 01

User sort algorithm implementation முழுவதையும் அறிய வேண்டியதில்லை.

MODULARITY

Explanation
Core idea

ஒரு பெரிய program-ஐ small independent modules-ஆக divide செய்வது.

Detail 01

Student Management System

Detail 02
  1. +-- Login Module
  2. +-- Student Module
  3. +-- Marks Module
  4. +-- Report Module
Advantages

Easy development

Detail 04

Easy testing

Detail 05

Easy maintenance

Detail 06

Code reuse

DATA ABSTRACTION

Explanation
Core idea

Data எப்படி internally represented ஆகிறது என்பதை hide செய்து operations மட்டும் provide செய்வது.

Program
Example
C++ 4 lines
1class BankAccount
2{
3private:
4    double balance;
Verified output
5
Learning Run Mode — this is the output the author verified, not a live execution.
Explanation
Core idea
public:
    void deposit(double amount);
};
Detail 01

User balance memory-ல் எப்படி handled ஆகிறது என்பதை directly பார்க்க வேண்டியதில்லை.

PROCEDURAL ABSTRACTION

Explanation
Core idea

ஒரு task எப்படி internally செய்யப்படுகிறது என்பதை hide செய்து function interface மட்டும் பயன்படுத்துவது.

Detail 01

sqrt(25);

Output
Result
5

sqrt() internally எப்படி calculate செய்கிறது என்பதை programmer அறிய வேண்டிய அவசியமில்லை.

PROGRAM STATE

ஒரு குறிப்பிட்ட நேரத்தில் program-ல் உள்ள variables மற்றும் memory values அனைத்தும் சேர்ந்து program-ன் state எனப்படும்.

Explanation
Example
Core idea
int x = 10;
int y = 20;
Detail 01

Current state:

Program
C++ 1 lines
1x = 10
Program
C++ 1 lines
1y = 20
Explanation
Core idea

New state:

Then

x++;

Program
C++ 1 lines
1x = 11
Program
C++ 1 lines
1y = 20
Explanation
Core idea

Statement execution program state-ஐ மாற்றலாம்.

BINDING

Explanation
Core idea

இது Programming Language Concepts-ல் மிகவும் முக்கியமான term.

Definition
Meaning

ஒரு program entity மற்றும் அதன் property இடையே association உருவாவதை Binding என்று அழைக்கிறோம்.

Explanation
Example

int x;

இங்கு

x → int

என்ற association உருவாகிறது.

இதனை

Name-to-type binding

என்று பார்க்கலாம்.

Later memory location assign செய்யப்பட்டால்

x → Memory Location

இதுவும் binding.

DIFFERENT BINDINGS

Explanation
Core idea

Variable ↔ Memory location

Examples

Variable name ↔ Data type

Detail 02

Function call ↔ Function definition

Detail 03

Operator ↔ Operation

Detail 04

Object ↔ Class

BINDING TIME

Explanation
Core idea

Binding எப்போது நிகழ்கிறது என்பதை Binding Time என்று அழைக்கிறோம்.

Examples

Language Design Time

Detail 02

Language Implementation Time

Detail 03

Compile Time

Detail 04

Link Time

Detail 05

Load Time

Detail 06

Runtime

Detail 07

இந்த topic உங்கள் Unit VI-ல் தனியாகவும் முக்கியமானது.

PROGRAMMING LANGUAGE IMPLEMENTATION

Explanation
Core idea

Programmer எழுதும் source code-ஐ computer execute செய்ய மூன்று common implementation approaches உள்ளன:

Detail 01

Compilation

Detail 02

Interpretation

Detail 03

Hybrid Implementation

COMPILATION

Explanation
Core idea

Entire source program-ஐ machine/object code-ஆக translate செய்வது compiler.

Detail 01
  1. Source Program
  2. Compiler
  3. Machine/Object Code
  4. Execution
Examples

C

Detail 03

C++

INTERPRETATION

Explanation
Core idea

Interpreter source code-ஐ statement-by-statement translate செய்து execute செய்கிறது.

Detail 01
  1. Source Code
  2. Interpreter
  3. Immediate Execution
Traditional examples

Python implementations

Detail 03

JavaScript engines

Detail 04

Actual modern implementations compiler + interpreter/JIT combinations பயன்படுத்தலாம்; exam concept-ல் interpreter model இவ்வாறு கற்பிக்கப்படுகிறது.

COMPILER VS INTERPRETER

Table
CompilerInterpreter
Whole program translationUsually instruction-by-instruction execution model
Object/executable may be generatedDirect execution model
Compiled program execution generally fastTranslation may happen during execution
C/C++ classic examplesPython classic example

SOURCE PROGRAM

Explanation
Core idea

Programmer high-level programming language-ல் எழுதும் original program = Source Program.

Program
Example
C++ 2 lines
1#include <iostream>
2using namespace std;
Program
C++ 4 lines
1int main()
2{
3    cout << "Hello";
4}
Explanation
Core idea

இது source code.

OBJECT PROGRAM

Explanation
Core idea

Compiler source code-ஐ translate செய்த பிறகு கிடைக்கும் lower-level representation = object code/object program.

Simplified flow
  1. Source Code
  2. Compiler
  3. Object Code

EXECUTABLE PROGRAM

Explanation
Core idea

Object code + required libraries linking செய்யப்பட்ட பிறகு execute செய்யக்கூடிய program உருவாகும்.

Detail 01
  1. Source Code
  2. Compiler
  3. Object Code
  4. Linker
  5. Executable

PROGRAMMING LANGUAGE LEVELS

Explanation
Core idea

Assembly Language

Programming languages generally

Machine Language

Detail 02

High-Level Language

MACHINE LANGUAGE

Explanation

Computer processor நேரடியாக execute செய்யக்கூடிய binary instructions.

Example concept

10110000 01100001

Advantages

Direct execution

Disadvantages

Very difficult for humans

Machine dependent

Hard to debug

ASSEMBLY LANGUAGE

Explanation
Core idea

Binary-க்கு பதிலாக mnemonic instructions பயன்படுத்துகிறது.

Detail 01

MOV A, B
ADD A, C

Translator

Assembler

Flow
  1. Assembly Program
  2. Assembler
  3. Machine Code

HIGH-LEVEL LANGUAGE

Explanation
Core idea

Human-readable statements கொண்ட programming language.

Examples
  • C
  • C++
  • Java
  • Python
Program
Example
C++ 1 lines
1total = a + b;
Explanation
Core idea

Machine language-ஐ விட மிகவும் easy.

LOW-LEVEL VS HIGH-LEVEL LANGUAGE

Table
Low-LevelHigh-Level
Hardware closeHuman language close
Machine dependentMore portable
Harder to programEasier to program
Machine/AssemblyC++, Java, Python

PORTABILITY

Explanation
Core idea

ஒரு program-ஐ different machines/platforms-ல் minimal changes-உடன் பயன்படுத்த முடிந்தால் அது portable.

Detail 01

High-level languages portability improve செய்கின்றன.

READABILITY

Explanation
Core idea

Program மற்ற programmers எளிதாகப் புரிந்து கொள்ளக்கூடிய தன்மை = readability.

Detail 01

int studentCount;

இந்த identifier

int x;

Detail 03

விட meaningful.

WRITABILITY

Explanation
Core idea

Programmer ஒரு solution-ஐ language-ல் எவ்வளவு easy-ஆக express செய்ய முடிகிறது என்பதே Writability.

Detail 01

Simple language features writability improve செய்யும்.

RELIABILITY

Explanation
Core idea

ஒரு program specification படி correct output produce செய்யும் திறன் = reliability.

Reliability improve செய்யும் language features

Strong type checking

Detail 02

Exception handling

Detail 03

Restricted pointers

Detail 04

Clear syntax

MAINTAINABILITY

Explanation
Core idea

Existing program-ஐ understand, modify, debug மற்றும் extend செய்வது எவ்வளவு easy என்பதே maintainability.

Good

Functions

Detail 02

Classes

Detail 03

Modules

Detail 04

Meaningful names

Detail 05

Comments

Detail 06

maintainability improve செய்கின்றன.

PROGRAMMING LANGUAGE DESIGN CRITERIA

Explanation
Core idea

Writability

Programming language evaluate செய்யப்படும் common characteristics

Readability

Detail 02

Reliability

Detail 03

Portability

Detail 04

Efficiency

Detail 05

Maintainability

Detail 06

Simplicity

Important
  1. Exam-ல்

    Four important programming language evaluation criteria

  2. என்று கேட்டால் பொதுவாக

    Readability

  3. Writability

  4. Reliability

  5. Cost

  6. என்று language design textbooks குறிப்பிடுகின்றன.

PROGRAMMING PARADIGM - CONNECTION

Important
  1. Programming Language Concept புரிந்த பிறகு next முக்கிய concept

    Programming Paradigm.

  2. Paradigm என்பது

    Program எப்படி organize செய்து problem solve செய்ய வேண்டும் என்பதற்கான programming style/model.

  3. Major paradigms

    Imperative

  4. Procedural

  5. Object-Oriented

  6. Functional

  7. Logic / Declarative

  8. C++ ஒரு multi-paradigm language.

  9. C++ support செய்கிறது

    Procedural Programming

  10. Object-Oriented Programming

  11. Generic Programming

Flow
Programming Language Concepts முழுவதையும் ஒரு flow-ல்
  1. Problem
  2. Algorithm
  3. Programming Language
  4. Tokens
  5. Syntax
  6. Statements / Expressions
  7. Variables + Data Types
  8. Operators
  9. Control Structures
  10. Functions / Classes
  11. Compiler / Interpreter
  12. Machine Instructions
  13. Execution
  14. Output
Important

TRB / NET / SET examination-க்கு இந்த definitions மிகவும் முக்கியம்:

Explanation
Syntax
Core idea

= Structure of a program.

Syntax
C++ 2 lines
1Semantics
2    = Meaning of a program.
Syntax
C++ 2 lines
1Identifier
2    = Programmer-defined name.
Syntax
C++ 2 lines
1Variable
2    = Named storage whose value may change.
Syntax
C++ 2 lines
1Constant
2    = Fixed value.
Explanation
Core idea

Data Type
= Specifies the kind of data.

Syntax
C++ 2 lines
1Expression
2    = Combination producing a value.
Syntax
C++ 2 lines
1Statement
2    = Complete executable instruction.
Syntax
C++ 2 lines
1Binding
2    = Association between an entity and an attribute.
Explanation
Core idea

Binding Time
= Time at which a binding takes place.

Syntax
C++ 2 lines
1Abstraction
2    = Hiding unnecessary implementation details.
Syntax
C++ 2 lines
1Modularity
2    = Dividing a program into manageable modules.
Common Mistake
Common error
  • Syntax ≠ Semantics
  • Variable ≠ Identifier
  • Parameter ≠ Argument
  • Expression ≠ Statement
  • Declaration ≠ Initialization
  • Compiler ≠ Interpreter
  • Data Type ≠ Data Value
TRB Point
  1. 1.

  2. Programming language syntax defines

    Answer: Form/Structure of programs

  3. 2.

  4. Programming language semantics defines

    Answer: Meaning of programs

  5. 3.

  6. Smallest meaningful unit of a program

    Answer: Token

  7. 4.

  8. Association of an attribute with an entity

    Answer: Binding

  9. 5.

  10. When an association occurs

    Answer: Binding Time

  11. 6.

  12. Breaking a large system into smaller components

    Answer: Modularity

  13. 7.

  14. Hiding implementation details

    Answer: Abstraction

  15. 8.

  16. C++ is primarily

    Answer: Multi-paradigm programming language

MCQ
229The grammatical structure of a programming language is called:
Choose one answer
MCQ
230The meaning of a programming language statement is called:
Choose one answer
MCQ
231Which is a named memory location?
Choose one answer
MCQ
232Which of the following represents assignment?
Choose one answer
MCQ
233Which is a control structure?
Choose one answer
MCQ
234Which concept hides unnecessary implementation details?
Choose one answer
MCQ
235A relationship established between a name and its type is called:
Choose one answer
MCQ
236Which translates assembly language?
Choose one answer
MCQ
237C++ supports:
Choose one answer
MCQ
238Which specifies the type of value a variable can hold?
Choose one answer
Memory Trick
SSyntaxStructure
SSemanticsSense / Meaning
VVariableValue can vary
CConstantCannot normally change
DData TypeData nature
BBindingBring together
AAbstractionAvoid unnecessary details
MModularityMake smaller modules
Summary

Programming Language Concepts என்பது C++ programming-க்கு foundation.

முக்கியமாக நினைவில் வைத்திருக்க வேண்டியது
  1. Programming Language
  2. Syntax + Semantics
  3. Tokens
  4. Identifiers
  5. Variables + Constants
  6. Data Types
  7. Operators
  8. Expressions
  9. Statements
  10. Control Structures
  11. Functions
  12. Scope
  13. Binding
  14. Abstraction
  15. Translation

இந்த foundation strong ஆக இருந்தால் அடுத்த topics ஆன Programming Paradigms and Models, Programming Environments, Virtual Computers, Binding Times, Syntax and Stages in Translation மிகவும் எளிதாக புரியும்.

Text size
17px
Theme
Contents
Print / PDF
Program