Headlines

Advertisement

SEO

Business

SEO

International

Latest Updates

What is Input / Output Structure?

June 21, 2026

What is Input / Output Structure?


I/O Module
BSCSF15MM05
BSCSF15MM32
BSCSF15MM46

IO module



Input/Output Module

• Interface to CPU and Memory
• Interface to one or more peripherals
• Unique addresses for every device in memory if more 
than one device than more than one addresses.

External Devices
• Human readable (human interface)
• Monitor, printer, keyboard, mouse
• Machine readable
• Disk, tape, sensors
• Communication
• Modem
• Network Interface Card (NIC)

I/O Module Function
• Control & Timing
• CPU (Processor) Communication
• Device Communication
• Data Buffering
• Error Detection (e.g., extra parity bit)

I/O Steps
• CPU checks (interrogates) I/O module device status
• I/O module returns status
• If  ready, CPU requests data transfer by sending a 
command to the I/O module
• I/O module gets a unit of  data (byte, word, etc.) 
from device
• I/O module transfers data to CPU

Input/Output Problems
• Wide variety of input output devices
• Delivering different amounts of data
• At different speeds
• In different formats
• All slower than CPU and RAM
• Need I/O modules w/ some “intelligence”

Data rate diagram


What is Human-Computer Interaction?

June 21, 2026

What is Human-Computer Interaction?


Lecture  3
Goals & Evolution of Human￾Computer Interaction

In the Last Lecture
• Effect of Bad Tools
• IFE
• Bad-day Clip
• Effect of today’s computers
• human productivity
• employee loyalty
• customer loyalty
• revenue
• Success Criteria in New Economy

In the Last Lecture
Products with a bad user 
experience deserve to
DIE !

Engineers Belief
Engineers believe that since they made it, can use it, 
everyone can use it
“If WE can use it, YOU can use it. If you can’t, YOU must 
be STUPID”
“Users are stupid” – anonymous
“Users are dummies” – anonymous

In Today’s Lecture
• Goals of HCI
• Usability 
• User Experience 


HCI – A Definition

“Human-Computer Interaction is a 
discipline concerned with the design, 
evaluation and implementation of 
interactive computing systems for 
human use and with the study of 
major phenomena surrounding them”

Goals of HCI



The Shopping Analogy
• Types of experiences
• Good or Bad
• Every user is unique
• Experiences are unique

User Experience – A Definition
• The user experience is the holistic combination of 
everything that the user
• Sees
• Touches
• Feels
• Interacts with


Human-computer



Ease of use


Usability
• Ensuring that interactive products are easy to 
learn, effective to user and enjoyable from the 
user’s perspective

Perspective


User experience



Usability Goals
•Effectiveness
•Efficiency
•Safety
•Utility
•Learnability
•Memorablity


Effectiveness
•How good the system is at doing what it is supposed to do
• iDrive system being effective since it would perform all the tasks
• Porsche example the system was effective enough to detect the high intake of Air in 
Fuel system
• The Alarm clock is effective in the way that it would play music in exactly the same 
way it is supposed to
•Are these systems really effective ? Think again !!
• Main goal of HCI is to evaluate things from the User’s perspective 


Efficient
• The way system supports its users in carrying out 
their tasks
• Talk about the three systems
• 5 steps I drive
• Does the product help users sustain a high level of 
productivity?

Safety
• Protecting the user from dangerous conditions and 
undesirable situation
• Which of the Cases we discussed earlier you think was 
the most unsafe ?
• Plane
Safety of user



Utility
• System providing the right kind of functionality so 
that the user can do what they want
• How useful are computer base devices
• Information on Website has increased ur 
knowledge?

Learnability
• How easy a system is to learn to user
• Ten Minute Rule (Jacob Neilson)
• Was iDrive easy to Learn 
• Simple Device VCR
• Task 1: Learning to Play
• Task 2: Pre-Record Two Programs

Memorability
• How easy the system is to remember once learnt
• Riding a bicycle

User Experience Goals
•Satisfying
•Enjoyable
•Fun
•Entertaining
•Helpful
•Motivating
• Aesthetically Pleasing
• Supportive to Creativity
• Rewarding
• Emotionally Fullfilling

Motivation

Today’s Revelation
“Don’t Make me THINK, is the 
key to a usable product”

Usability and Quality
• What is Quality?
• You like a product
• Does not break down
• More about Quality later

Software Quality – A Definition
• The extent to which a software product exhibits 
these characteristics
• Functionality
• Reliability
• Usability
• Efficiency
• Maintainability
• Portability



FEDERAL INVESTIGATION AGENCY ACT, 1974

June 21, 2026

What is FEDERAL INVESTIGATION 

AGENCY ACT, 1974 ?


FIA building in Islamabad


(l) This Act may be called the Federal 
Investigation Agency Act, 1974. 
(2) It extends to the whole of Pakistan and also 
applies to all citizens of Pakistan and public servants, 
wherever they may be. 
(3) It shall come into force at once. 

 Definitions.
In this Act, unless there is anything 
repugnant in the subject or context"-  
(a) "Agency" means the Federal Investigation 
Agency constituted under section 3 ; 
(b) "Code" means the Code of Criminal 
Procedure, 1898 (Act V of 1898);
(c) "Director-General" means the Director￾General of the Agency; 
(d) "Provincial Police" means 'the Police' 
constituted by a Provincial Government under the 
Police Act, 1861.


(e) "public servant" means a public servant as defined in 
section 21 of the Pakistan Penal Code (Act XLV of 1860), 
and includes an employee of any corporation or other body 
or organization set up, controlled or administered by 0r 
under the authority of, the Federal Government ;
(I) "Special Police" means the Pakistan Special Police 
Establishment constituted under the Pakistan Special 
Police Establishment Ordinance, 1948, (VIII of 1948) ;. I 
(g) "Specified persons" means the persons who were 
appointed to posts in or under a Provincial Police in 
pursuance of Article 3 of the Special Police and Provincial 
Police (Amalgamation) Order, 2002, (P.O. No. 1 of 2002); 
and 
(h) "rules" means rules made under this Act. 

 Constitution of the Agency
(1) Notwithstanding anything contained in any other law 
for the lime being in force, the Federal Government may 
constitute an Agency to be called the Federal Investigation 
Agency for inquiry into, and investigation of, the offences 
specified in the Schedule, including an attempt or 
conspiracy to commit, and abetment of, any such offence.
(2) The Agency shall consist of a Director General to be 
appointed by the Federal Government and such number of 
other officers as the Federal Government may, from time to 
time, appoint to be members of the Agency. 

Superintendence and 
administration of the Agency.
(1) The superintendence of the Agency shall vest 
in the Federal Government. 
(2) The administration of the Agency shall vest 
in the Director-General who shall exercise in respect of 
the Agency such of the powers of an Inspector 
General of police under the Police Act, 1861, as may be 
prescribed by rules. 

 Powers of the members of the 
Agency.
(l) Subject to any order which the Federal Government may 
make in this behalf, the members of the Agency shall, for the 
purpose of an inquiry or investigation under this Act, have 
throughout Pakistan such powers, including powers relating to 
search, arrest of persons and seizure of property, and such 
duties, privileges und liabilities as the officers of a Provincial 
Police have in relation to the investigation of offences under the 
Code or any other law for the time being in force. 
(2) Subject to rules, if any, a member of the Agency not 
below the rank of a Sub-Inspector may, for the purposes of any 
inquiry or investigation under this Act, exercise any of the 
powers of an officer in charge of a police station in any area in 
which he is for the time being and, when so exercising such 
powers, shall be deemed to be an officer-in-charge of a police 
station discharging his functions as such within the limits of his 
station. 

contd:
(3) Without prejudice to the generality of the 
provisions of subsection (1) and subsection (2), any 
member of the Agency not below the rank of a Sub￾Inspector authorized by the Director-General in this behalf 
may arrest without warrant any person who has committed, 
or against whom a reasonable suspicion exists that he has 
committed, any of the offences referred to in subsection (1) 
of section 3.
(4) For the purpose of the exercise by the members 
of the Agency, of the powers of an officer in charge of a 
police station, “Police station" includes any place 
declared, generally or specially by the Federal Government 
to be a police station within the meaning of the Code. 

(5) If, in the opinion of a member of the Agency 
conducting an investigation, any property which is the 
subject-matter of the investigation is likely to be removed, 
transferred or otherwise disposed of before an order of the 
appropriate authority for its seizure, is obtained, such 
member may, by order in writing, direct the owner or any 
person who is, for the time being, in possession thereof, 
not to remove, transfer or otherwise dispose of such 
property in any manner except with the previous 
permission of that member and such order shall be subject 
to any order made by the Court having jurisdiction in the 
matter. 
(6) Any contravention of an order made under 
subsection (5) shall be punishable with rigorous 
imprisonment for a term which may extend to one year, or 
with fine, or with both. 

Power to amend the 
Schedule:
The Federal Government may, by 
notification in the official Gazette, amend the 
Schedule so as to and any entry thereto or modify or 
omit any entry therein. 

Delegation of powers.
The Director-General may, by order in 
writing, direct that-all or any of his powers under this 
Act or the rules shall, subject to such conditions, if any, 
as may be specified in the order, be exercisable also by 
any member of the Agency so specified. 

Indemnity.
No suit, prosecution or other legal 
proceeding shall lie against the Federal Government, 
any member of the Agency or any other person 
exercising any power or performing any function 
under this Act or the rules for anything which is in 
good faith done or intended to be done under this Act 
or the rules. 


Power to, make rules.
(l) The Federal Government may, by notification in the official 
Gazette, make rules for carrying out the purposes or this ACI: 
(2) In particular and without prejudice to the generality of the 
foregoing power, such rules may provide for all or any of the 
following matters, namely :-- 
(a) The terms and conditions of service of the Director-General 
and other members of the Agency and the qualifications for 
recruitment to various posts; 
(b) The powers and functions of the members of the Agency in 
relation to the conduct of inquiries and investigation ; 
(c) the nature and context of the assistance which the Agency 
may provide to Provincial investigating agencies: 
(d) the powers of Inspector General of Police under the Police 
Act, 1861 (V of 1861), which shall be exercised by the Director￾General; and 
(c) the manner in which rewards may be given to the members 
of the Agency or of the public for rendering commendable 
services. 


Repeal.
(1) The Pakistan Special Police Establishment 
Ordinance, 1948 and the Special Police and Provincial 
(Amalgamation) Order, 1962 hereinafter referred 10 
respectively are hereby repealed. 

Schedule
  SCHEDULE OF FIA ACT, 1974
  1)    Offences  punishable under sections k[120-B, 121,122, 
123, 123-A, 124, 124-A, p[161, 162, 163, 164, 165, 165-A, 168, 
169], q[175, 182, 183, 186, 187, 188, 189], b[201], 217, 218, 
q[224, 225], 245, 255, 256, 257, 258, 259, 260, 261, 263 k[300, 
301, 302, 324, 332, 333, 334, 335, 336, 337, 337-A, 337-B, 337-
C, 337-D, 337-E, 337-F], q[342, 348], 353 k[365-A] 366-B, 
q[383], 402-A, 402-B, 402-C, 403, 404, b[406,407,408], 
p[409], b[411,418,419,], a[420], 435, 436, 440, r[462A, 462B, 
462C, 462D, 462D, 462E, 462F] q[466], 467, a[468,471], 
b[472], q[473, 474, 475, 476], 477-A, 489-A, 489-B, 489-C, 
489-D, 489-E, g[489-F], q[499, 500, 501, 502, 506, 507], of 
the Pakistan Penal Code (Act XLV of 1860)


Major Crop’s in Pakistan it’s impact on economy

June 21, 2026

Major Crop’s in Pakistan 

it’s impact on economy

Major Crop’s in Pakistan  it’s impact on economy



Major Crops Of Pakistan

The main Crops of Pakistan are classified into food crop and new food crops. The 
each crop include wheat, rice, maize, coarse grains, grams and other pulses. The 
cash crop in cotton, sugarcane, tobacco, mustard and sesame. The total area 
yield and productions of crop is now discussed under separate heads.

Wheat:
Wheat is the principal food crop of the people. It occupies us 
important position in farming polices. The share of wheat is 
1.8% to GDP and 9.2% to value added agriculture.

Rice:
Rice is the 2nd largest food crop in Pakistan. It is now a major export 
items and contribution 3.5% and 0.7% of value added in Agriculture and 
GDP. During 2019-20 rice contributed under rice crop has increased ny 9 
percent to 3.335 thousand increased.
Pakistan produces finest quality of rice named as “Banaspati”.

Maize
Maize is and important food grain as well raw material for edible 
production. It is also used to produce starch and poultry food mixes. 
Maize contributes 3.41 to the value added in agriculture and 0.6% to 
the GDP.

Other Crops:
 During 2019-20 gram production declined by of 47% on access of 
decline in area yield and unfavorable weather conditions. The 
production of Bajra jowar decreased by 30.7 percent and 20 percent 
respectively. 

Cash Crops:

Cotton:
Cotton is the most important cash crop of Pakistan in items of area and 
addition. During 2019-20 cotton production stood at 7 million bales 
showing a 23% over the production of 9 million bales during same period 
last year, continue has 0.6 percent share in GDP and contribution 3.1 
percent in agriculture value addition.

Sugarcane:
 Sugarcane is high value cash crop of Pakistan and is significant 
important for sugar and sugar related industries in the national 
economy. It provides material for sugar industry which is the country’s 
second largest agro industry sector.

What is Pharmacogenomics in Drug Development?

June 21, 2026

What is Pharmacogenomics in Drug 

Development?


Table Of Contents
• VIRUS
• DEFINITION
• CLASSIFICATION (BALTIMORE)
GROUP 6 CLASSIFICATION (STRUCTURE, MODE OF REPLICATION)
• RETROVIRUSES 
• HIV
• TREATMENT AND PREVENTIONS 
• CONCLUSION 
• REFERENCES

What is virus?

 A virus is a tiny, non-cellular, infectious agent that replicates only inside the 
living cells of other organisms. It consists of genetic material (DNA or RNA) 
encased in a protein shell (capsid) and can cause diseases in humans, animals, 
and plants.


Baltimore Classification
 This system categorizes viruses into seven groups based on their 
nucleic acid type (DNA or RNA), strandedness (single or double), and 
how they produce mRNA. 
Group I: Double-stranded DNA (dsDNA) 
viruses. 

Group II: Single-stranded DNA (ssDNA) viruses. 

Group III: Double-stranded RNA (dsRNA) viruses. 

Group IV: Positive-sense single￾stranded RNA (ssRNA) viruses.

Group V: Negative-sense single￾stranded RNA (ssRNA) viruses. 

Group VI: ssRNA viruses that use reverse 
transcription to replicate. 

Group VII: dsDNA viruses that use reverse 
transcription to replicate.

Group 6 Classification
i) Retroviruses 
ii) HIV

Introduction to Retroviruses

   A retrovirus is a virus that uses RNA as its genomic material. Upon 
infection with a retrovirus, a cell converts the retroviral RNA into DNA, 
which in turn is inserted into the DNA of the host cell. The cell then 
produces more retroviruses, which infect other cells.

History
 Human Retroviruses:
    The first human retrovirus, HTLV-1, was detected and isolated in 1979 
by Robert C. Gallo.

Structure Of Retroviruses
    Retroviruses are spherical, enveloped particles containing two 
identical single-stranded RNA molecules and a protein core, with the 
outer lipid envelope consisting of glycoproteins.


What is Pharmacogenomics in Drug  Development



Mechanism of Action
 When a retrovirus infects a host cell the viral RNA genome is released into the 
cytoplasm of host cell.
 Then the viral enzyme called reverse transcriptase copies viral RNA to single 
stranded DNA.
 The viral RNA degrades and reverse transcriptase synthesizes the 
complementary second DNA strand.
 Then the double stranded DNA enters the DNA of host cell and integrates into 
the genome of host DNA using viral enzyme integrase. The integrated DNA is 
called provirus.
 Then the viral DNA starts making viral RNA which in turn synthesizes proteins.


Drug development


Diseases caused by retroviruses:(In humans)
 Human immuno efficiency viruses e.g AIDS 
 Human T lymphocyte virus(HTLV-1) associated with adult T-cell leukemia (ATL) and a    
neurodegenerative condition called HTLV-1.

Vaccines against Retroviruses
 Currently there are no licensed vaccines against retroviruses however the 
retroviral vaccines for HIV the research is still ongoing.

Introduction to HIV

HIV, or Human Immunodeficiency Virus, is a virus that attacks the body's immune 
system, specifically targeting white blood cells called CD4 cells, leading to a 
weakened immune system and increased vulnerability to infections and diseases; 
if left untreated, it can progress to AIDS.

History of HIV
 Scientists believe that HIV originally came from a virus particular to 
chimpanzees in West Africa during the 1930s.

Structure of HIV
 HIV-1 virions contain two copies of a single-stranded RNA genome within a 
conical capsid surrounded by a plasma membrane of host-cell origin 
containing viral envelope proteins.
Hiv




Mechanism of Action
The seven stages of the HIV life cycle are:
 Binding
 Fusion
 Reverse transcription 
 integration 
 Replication
 Assembly
 Budding.

Disease caused by HIV
Acquired immunodeficiency syndrome (AIDS), is an ongoing, also called 
chronic, condition. It is caused by the human immunodeficiency virus, 
also called HIV. HIV damages the immune system so that the body is less 
able to fight infection and disease.

Vaccines against HIV
 There are currently no FDA-approved vaccine to prevent or treat HIV 
infection.

Treatment and prevention of retroviruses 
including HIV
 However there are no approved vaccines for retroviruses also including HIV 
but still HIV is being treated with a combination of medicines (pills) taken by 
mouth every day
 Antiretroviral therapy (ART) is also a treatment of people infected with 
human immunodeficiency virus (HIV) using anti-HIV drugs.
 In terms of antiretroviral therapies, drugs like azidothymidine (AZT) and other 
antiviral agents are utilized for both prophylaxis against the progression of 
retroviral infections to disease and for the treatment of established 
infections.

Current Research
 Current retroviral and HIV research focuses on understanding viral 
dynamics, developing new therapies and prevention methods, and 
exploring innovative approaches like gene therapy and therapeutic 
vaccines, with a focus on overcoming challenges like drug resistance 
and persistent viral reservoirs.

Future Directions
 Future research directions in retroviral and HIV studies include 
understanding viral entry and latency, developing novel therapies and 
vaccines, and exploring the role of host factors in viral replication and 
pathogenesis.

Conclusion
 In conclusion, retroviruses, particularly HIV, pose significant 
challenges to human health. Understanding their structure, lifecycle, 
and pathogenesis is crucial for developing effective treatments and 
prevention strategies. While significant progress has been made in 
managing HIV with antiretroviral therapy, ongoing research is essential 
to finding a cure and mitigating the impact of retroviral infections. By 
continuing to advance our knowledge and collaborate globally, we can 
work towards better control and ultimately, the eradication of these 
viruses.

How to Create an app service and deploy a web on it?

June 20, 2026

How to Create an app service and deploy a web on it?



Introduction


Cloud computing has made it easy to host and run websites without the need to buy or manage physical servers. Microsoft Azure is one of the most popular cloud platforms, offering many services for developers and students. One of its main services is Azure App Service, which lets us create, deploy, and manage web applications quickly.

In this practical, we completed the entire process of deploying a web application on Azure. First, we already created an App Service Plan named `appdemo` in the resource group `appwork`. Using this plan, we created a new web app called `namal web`. After successfully creating the app service, we accessed Azure’s Advanced Tools, known as Kudu, to reach the File Manager. Through the File Manager, we uploaded our HTML and CSS code for Namal University’s website into the `wwwroot` folder.

Once the code was uploaded, we copied the default URL from the App Service overview and opened it in a browser. The website loaded successfully, confirming that the deployment was done correctly. This exercise helped us understand how Azure App Service functions as a Platform-as-a-Service and how it simplifies the process of hosting web applications on the cloud with minimal setup.

Created an app service plan with the name appdemo and in the resource group named as
appwork.

App service

ScreenShot .1 Deployment of App service plan

Created An app service named step by step .

Step 1: Open App services and create a web app.

Creating an app service
ScreenShot .2 App services

Step 2:Web App manual Creation with named as namal web in the same resource group

ScreenShot .3 New App service Connection

Step 3: Then after creation it is deployed successfully


App service

ScreenShot .4 Deployment Successfull

Step 4:Used advance tool to get a collection of developer oriented tool

Create app service
ScreenShot .5 Advance Tools

Then through file manager in the root folder of site saved my web code .

App service


ScreenShot.6 FileManager Info

Code of Namal Web

Code on Namal web


ScreenShot .7 Code

Copied the link from the overview and run it in my browser ,it showed my deployed web

App service

ScreenShot .1 Web Interface 1

App service

Observation:

The deployment process demonstrated the efficiency of Azure App Services in hosting a
Node.js runtime stack within a managed Windows environment. By utilizing the Advanced
Tools (Kudu) and the integrated File Manager, the web code was successfully uploaded to the
root directory, ensuring that the custom HTML/CSS interface for Namal University was
accessible via a public .azurewebsites.net URL.



Conclusion:


The deployment of the "Namal Web" application successfully validated the end-to-end functionality of Azure App Service. Using the pre-created App Service Plan `appdemo` in resource group `appwork`, the web app was manually provisioned and deployed without infrastructure management overhead. 

Key outcomes from the process:

1. Managed Hosting Efficiency - Azure App Service provided a ready-to-use Windows environment with http://Node.js runtime, eliminating server setup and maintenance.

2. Streamlined Deployment - Advanced Tools (Kudu) and the built-in File Manager enabled direct upload of HTML/CSS code to the `wwwroot` folder, making the deployment process quick and developer-friendly.

3. Instant Public Accessibility - Upon successful deployment, the custom web interface for Namal University became immediately accessible via the default `azurewebsites.net` URL, confirming correct configuration.

4. Platform Reliability - The process demonstrated Azure’s ability to host, scale, and serve web applications with minimal effort while providing developer-oriented tools for troubleshooting and file management.

Overall, Azure App Service proved to be an efficient, scalable, and user-friendly platform for hosting web applications, suitable for both academic projects and production workloads.

HOW TO WRITE A COMPREHENSIVE INTERNSHIP REPORT ON Bank Of Punjab FOR INTERNSHIP

June 18, 2026

HOW TO WRITE A COMPREHENSIVE INTERNSHIP REPORT ON
Bank Of Punjab FOR INTERNSHIP 




Internship Report submitted to the Faculty of Management and administrative
Sciences in Partial Fulfillment of the Requirements for the Degree of Bachelors of
Business Administration.


Bop

BOp
Bop


Bop anal

Analysis bop

Bop report

EXECUTIVE SUMMARY

The report is planned to cover the details associated with my internship at the Bank of Punjab 
(BOP). Bank of Punjab is one of the top banks in Pakistan with branches all across the country 
with a control center in Lahore, Pakistan. I accomplished my internship at a branch of the f BOP. 
This branch has been opened considering the needs of a lot of people living in the zone. Now is 
the first choice of the people around this zone. The Branch has been performing best by 
continuously accomplishing its deposit goals efficiently. 
This branch deals in several banking activities associated with deposits, home remittances, 
Agriculture loans, debit card issuance, leasing, ATM services, e-and banking. I had the 
opportunity to learn and work in almost every department of the branch. The staff at the branch 
is helpful and I have learned a lot from them. I also have been assigned different tasks related to 
the departments. This report includes the detail of the tasks that I have performed during my 
internship. The knowledge that I have learned in the class room has assisted me in my internship.
It includes details related to the banking sector, the bank of Punjab and also different analysis 
like PESTL analysis and SWOT analysis.
I found my skill very pleasing. I’ve been able to clear my bookish concepts a lot better by 
relating my knowledge almost.

PART-I
1.1 Introduction
As a student of Bachelor of Business Administration, it is necessary to get the degree to 
complete an internship in an organization and then later complete a comprehensive report on
all the significant details of the organization with details associated with activities learned at 
the organization during the internship. I have done my internship at the Bank of Punjab’s 
branch and in this part of the report, I will cover all the details related to the report’s scope 
objectives Limitations and relevant details of the Bank of Punjab. 

1.1.2 Scope
The internship report is used in several tasks. First of all, it improves writing skills. Then it 
remains as a record of the internship experience. Moreover, it provides guidance regarding 
professional skills.

1.1.3 Objectives of Report
The main objectives behind formulating this report are:
• To constitute a report containing facts about my internship skill.
• To examine banks' working based on my internship practice.
• To make improved endorsements based on my information. 

1.1.4 Methodology
The methodology adopted in getting the data required to complete the study includes both 

primary and secondary sources of data.
The following primary sources of collecting data were restored in the study.
• Personal debate with the staff at the bank
• Personal collaboration with customers
• Personal opinion and searching

Secondary sources that were used are the following:
• Internet researching
• Website of Bank of Punjab
• Articles
• Annual performance reports 
• Handbooks available at the bank

1.1.5 Limitations
This report includes the information thoroughly collected to provide support for the study. 
However other aspects that do not directly relate to the study have been ignored. So, this 
report technically does not cover all the aspects rather it has more focus on the information 
that relates to my internship at the bank specifically.

1.2 Overview of the Organization Bank of Punjab (BOP
Bank of Punjab (BOP) Pakistan: It is a Pakistani bank with central command in Lahore, 
Pakistan. What's more, is one of the nation's driving monetary foundations holding PACRA 
(Pakistan Credit Rating Agency) AA appraisals. The bank suggests a broad size of banking 
organizations containing close-by cash stores. Wide-reaching cash stores for customers, 
refunds, and advances to associations, projects, and agriculture. First Punjab Modaraba 
(FPM), an altogether guaranteed bank helper, was spread out in 1992. It works with its 
customers through a spread-out extent of banking organizations like payments or clearing 
and loans to agriculture, industry, and trade. 

1.2.1 Vision
To offer great support to turn into a client/client-centered bank.

1.2.2 Mission 
To encounter financial partners' hopes by supporting Punjab Government's relationship and 
assigning a whole scope of skillful preparations focusing on program-driven items and 
management enter-level business markets and agriculture management through an 
influenced team.

How to build Lexical Analyzer (or "Lexer") for a specific subset of the C programming language

June 18, 2026

How to build Lexical Analyzer (or "Lexer") for a
specific subset of the C programming language 






Problem Statement:
You are required to design and implement a simple lexical analyzer for a basic
programming language that
consists of the following elements:
1. Keywords: if, else, while, return, int, float
2. Identifiers: Sequences of letters and digits that begin with a letter.
3. Operators: +, -, *, /, =, ==, !=, >, <, >=, <=
4. Delimiters: (, ), {, }, ;
5. Constants: Integer and floating-point numbers.
6. Comments: Single-line comments that begin with //.
Your program may be written in C, C++, Java or any other programming language.

Solution:

Code:

Lexer free

Lexer anal

Building a lexer anal

Building a lexer anal

Building a lexer anal


Building a lexer anal

Building a lexer analyzer
Explanation:
The main goal of this assignment was to build a Lexical Analyzer (or "Lexer") for a
specific subset of the C programming language. Essentially, the lexer acts as the first
step for a compiler. Its job is to read through a source code file, character by character,
and group those characters into meaningful chunks called "tokens." For example, it
needs to distinguish between a reserved keyword like while, a variable name like
user_count, or a mathematical operator like +. I also had to make sure the program
could handle numbers correctly, including more complex ones like decimals or those
using scientific notation (like 1.2E+5).

Implementation and Logic
Initially, the logic was designed using a manual approach where I had to keep track of
every single "state" the program was in. If the program saw a letter, it moved to an
"identifier" state; if it saw a digit, it moved to a "number" state. This was done using a
system called a Deterministic Finite Automaton (DFA). Later, I moved this logic over to
Flex, which is a professional tool specifically made for generating lexers. Instead of
writing long "if-else" chains or switch statements, Flex allowed me to use simple
patterns (regular expressions) to define what each token looks like. This made the code
much shorter and much more reliable.

How it Works
When the program runs, it scans the input file and matches the text against the rules I
defined. Every time it finds a match, it prints out the "Class" (the type of token) and the
"Lexeme" ( the actual text found). If it runs into a character it doesn't recognize,like a
random symbol that shouldn't be there,it labels it as an "Error" and keeps going. I also
made sure that the program ignores things that don't matter to a compiler, like extra
spaces or comments, so they don't get in the way of the actual logic.


Symbol Table and Results:
As a final step, every time the lexer finds a new variable name (an identifier), it saves it
into a "Symbol Table." This table keeps track of the name of the variable and the line
number where it was first seen. This is useful because, in a real compiler, we would
need this list later to make sure variables are being used correctly. The final output of
the project is a clean list of all tokens found in the input file, followed by a summary of all
the identifiers that were stored during the process.

Combined DFA:



Lexer analyzer building


The diagram represents a Unified Deterministic Finite Automaton (DFA) designed to
tokenize source code by transitioning between states based on input characters. It
effectively categorizes the input into five primary token classes: Keywords/Identifiers,
Constants, Operators, Delimiters, and Comments .



1. Identifiers & Keywords: Starting with a letter, the DFA moves to ID_START. It
continues to loop on letters or digits until an other character is encountered,
reaching the IDENTIFIER state. A lookup table is then used to differentiate
between reserved Keywords (e.g., if, while) and user-defined names .

2. Constants (Integer/Float): The DFA handles numeric values through states INT,
DOT, and FRAC. It supports scientific notation via the EXP (Exponent) branch,
ensuring that both simple integers and complex floating-point numbers are
recognized as CONSTANTS.

3. Operators & Relational Ops: Single-character operators (like +, -, *) transition
directly to the OPERATOR state. Multi-character relational operators (like <=, !=)
are handled via the R_START path, which checks for an optional = to finalize a
RELOP token.

4. Delimiters: Fixed characters such as (, ), {, }, and ; are recognized
immediately from the Start state and categorized as DELIMITERS.

5. Comments: When a / is followed by another /, the DFA enters a
COMMENT_START loop. It consumes all characters until a newline (\n) is
reached, at which point the token is discarded as per the assignment logic.

6. Error Handling: Any character that does not fit a defined transition (labeled
invalid) leads to the ERR state, triggering an error message with the
character's position.



 
Copyright © The Beginner . Designed by OddThemes