High Level Languages (Imperative, Object Orientated, Declarative)Project Student
Computer Science - High Level Languages
Different types of high level languages are explained within this presentation. For example, imperative, object orientated and declarative languages are explained. The two types of languages within declarative (logic and functional) are also mentioned and described as well as the characteristics of high level languages. There is also a hierarchy of high level languages and generations.
A computer languages are the languages by which a user command a computer to work on the algorithm which a user has written to get an output.
View it to know more about computer language !!!
High Level Languages (Imperative, Object Orientated, Declarative)Project Student
Computer Science - High Level Languages
Different types of high level languages are explained within this presentation. For example, imperative, object orientated and declarative languages are explained. The two types of languages within declarative (logic and functional) are also mentioned and described as well as the characteristics of high level languages. There is also a hierarchy of high level languages and generations.
A computer languages are the languages by which a user command a computer to work on the algorithm which a user has written to get an output.
View it to know more about computer language !!!
Computer Science - Classification of Programming Languages
Programming Languages are broken down into High level and Low level languages. This slideshow shows how they are classified and explains low level and high level languages in depth.
it is about computer languages which describes development of computer languages. as it provide best knowledge about computer languages,every sllides in this ppt makes you know the updation of machine languages by fliping every pages.
Computer Science - Classification of Programming Languages
Programming Languages are broken down into High level and Low level languages. This slideshow shows how they are classified and explains low level and high level languages in depth.
it is about computer languages which describes development of computer languages. as it provide best knowledge about computer languages,every sllides in this ppt makes you know the updation of machine languages by fliping every pages.
C is mother language of all programming language.
It is a system programming language. It is a procedure-oriented programming language. It is also called mid-level programming language.
C evolved from a language called B, written by Ken Thompson at Bell Labs in 1970. Ken used B to write one of the first implementations of UNIX. B in turn was a descendant of the language BCPL (developed at Cambridge (UK) in 1967), with most of its instructions removed.
So many instructions were removed in going from BCPL to B, that Dennis Ritchie of Bell Labs put some back in (in 1972), and called the language C.
The famous book The C Programming Language was written by Kernighan and Ritchie in 1978, and was the definitive reference book on C for almost a decade.
The original C was still too limiting, and not standardized, and so in 1983, an ANSI committee was established to formalize the language definition.
It has taken until now (ten years later) for the ANSI ( American National Standard Institute) standard to become well accepted and almost universally supported by compilers.
A computer is an electronic device used to process data, converting the data into information that is useful to people.
A computer is a system made of two major components:
hardware and software.
The hardware is the physical equipment.
The software is the collection of programs (instruction) that allow the hardware to do the job.
Concisely describe the following terms 40 1. Source code 2. Object c.pdffeelinggift
Concisely describe the following terms 40% 1. Source code 2. Object code 3. Compiler 4.
Algorithm 5. Byte (used for what purpose) 6. Nano second or ns (used for what purpose) 7.
System program (provide two examples) 8. Application program (provide two examples) 9.
Preprocessing directive 10. ASCII
Solution
Answers:
1.
A programmer writes a program in a particular programming language (ex : c , c++ ,java).This
form of the program is called the source code. it can be read and easily understood by a human
being.
For example : Source code for Hello world program is:
#include
void main()
{
printf(“Hello World”);
}
2.
An interpreter or a complier translates source code into executable machine code. This machine
code is called as the object code.
Complier translates source code into object code. Object code contains instructions to be
executed by the computer.
3.
A complier is a program that translates a source program or source code written in particular
programming language ( such as c , c++ or java ) into machine language (code).
Example : Turbo c compiler.
4.
Step –by- step instructions of a program is called is an algorithm.
5.
1 byte = 8 bits.
A byte is a unit of measurement used to measure the data.
Each byte represents a character.
6.
A nano second or ns is a unit of time representing 10-9 or 1 billionth of a second. computer
memory speed is represented in nano seconds.
7.
It is a type of computer program that is designed to run a computer’s hardware and application
programs.
Examples are :
OS (operating system)
BIOS
Boot program.
8.
Application program is a software program that runs on computer.
Examples are word processors, web browsers.
9.
Preprocessor directives are invoked by the complier to process some programs before
compilation.
Preprocessor directives are lines included in a program that begin with the character #.
10.
ASCII: American Standard Code for Information Interchange)
It is the most common format for text files in computers and on the internet.
Short Answers:
1.
Source code
|
Complier
| Assembly code
Assembler
Libraries | Object code
Link Editor
|
Executable code
2.
a)
Memory unit (storage)
ALU (Arithmetic and Logical unit)
CU (Control Unit)
b)
Storage:
All the data to be processed and the instruction required for processing.
Intermediate results of processing.
Final results of processing before these results are released to an output device.
ALU (Arithmetic and Logical unit):
It performs all the arithmetic operations (like addition, subtraction etc) and logical operations.
CU (Control Unit):
The control unit directs and controls the activities of the internal and external devices.
3.
Fetch the instruction
Decode the instruction
Read the effective address
Execute the instruction
In executing the instruction Arithmetic and Logical unit (ALU) performs mathematical or logical
operations .ALU sends a condition signal back to the control unit (CU). The result generated by
the operation is stored in the main memory or sent to o.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
2. What is computer?
Computer
Computer programs
A device capable of performing computations and making logical
decisions
A machine that manipulates data according to a list of instructions.
A programmable device that can store, retrieve, and process data.
Sets of instructions that control a computer’s processing of data
Hardware
Physical part of the computer
Various devices comprising a computer
Examples: keyboard, screen, mouse, disks, memory, CD-ROM, and
processing units
Software
A collection of computer programs, procedures and documentation that
perform some tasks on a computer system
Programs that run a computer
Programming Fundamentals by Maryam
Ehsan
2
3. Computer organization
There are Six logical units in every computer:
Input unit
Output unit
Performs arithmetic calculations and logic decisions
Central processing unit (CPU)
Rapid access, low capacity, stores input information
Arithmetic and logic unit (ALU)
Outputs information to output device (screen, printer) or to control
other devices.
Memory unit
Obtains information (data and computer programs) from input
devices (keyboard, mouse)
Supervises and coordinates the other sections of the computer
Secondary storage unit
Cheap, long-term, high-capacity storage, stores inactive programs
Programming Fundamentals by Maryam
Ehsan
3
4. Computer languages
Computer languages are divided into three types.
Machine languages
Machine language is machine dependent.
Strings of numbers giving machine specific instructions
Example:
+1300042774
+1400593419
+1200274027
Assembly languages
English-like abbreviations representing elementary computer
operations (translated via assemblers)
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
Translator programs called assembler were developed to convert assembly
language programs to machine language programs at computer speed.
Programming Fundamentals by Maryam
Ehsan
4
5. Computer languages
High-level languages
Similar to everyday English, use mathematical notations
(translated via compilers)
Example:
grossPay = basePay + overTimePay
C, C++ are the most widely used high level languages. Some
other examples are
FORTRAN (formula translator)
Used in scientific and engineering applications
COBOL (common business oriented language)
Used to manipulate large amounts of data
Pascal
Used to teach structured programming
Translator programs called Compilers converts high-level
language programs Programming Fundamentals language
into machine by Maryam
5
Ehsan
6. Basics of a typical C environment
Phases of C Programs
to be executed
Edit
Preprocess
Compile
Link
Load
Execute
Editor
Disk
Program is created in
the editor and stored
on disk.
Preprocessor
Disk
Preprocessor program
processes the code.
Compiler
Disk
Compiler creates
object code and stores
it on disk.
Disk
Linker links the object
code with the libraries,
creates a.exe and
stores it on disk
Linker
Primary
Memory
Loader
Loader puts program
in memory.
Disk
.
.
.
.
.
.
Primary
Memory
CPU
Programming Fundamentals by Maryam
Ehsan
.
.
.
.
.
.
CPU takes each
instruction and
executes it, possibly
storing new data
values as the program
6
executes.
8. C programming
C program
Collection of definitions, declarations and functions
Collection can span multiple files
2 Steps to Learn C
Write a program in C
Use Functions of C(Standard Template Libraries)
Programming Fundamentals by Maryam
Ehsan
8
9. C Programming
Simple program to print a line of text.
1
// A first program in C
2
Comments
return is a way to exit a function
#include <stdio.h>
from a function.
Written between /* and */ or following a //.
preprocessor directive
3
4
5
6
7
return 0, in this case, means that
Improve program readability and do not cause the
Message to the C preprocessor.
the program terminated normally. It
computer to perform any action.
int main()
is one of the several means used to Lines beginning with # are preprocessor directives.
exit a function
{
#include <stdio.h> tells the preprocessor to
The left brace ,{, line 5 must begin the body of
include the contents of the file <stdio>, which
cout << "Welcome to C!n";
function and the corresponding right brace ,}, line
includes input/output operations (such as printing
9 must end the body of each function.
to the screen).
C programs contain one or more functions, one of
8
9
return 0;
}
// indicate that program ended successfully
which must be main
Prints the string of characters contained between the quotation marks.
Parenthesis are used to indicate a function
int means that main "returns" an integer value.
Programming Fundamentals by Maryam
Ehsan
9
11. C Programming
1 // an example to observe using statement
2 // program to display greeting
3 #include <stdio.h>
4
5 int main()
6 {
7
printf( “Hello world“);
8
9
return 0;
// indicate that program ended successfully
10 }
Programming Fundamentals by Maryam
Ehsan
11
12. Escape Character
Indicates that a “special” character is to be output
Escape Sequence
Description
n
Newline. Position the screen cursor to the
beginning of the next line.
t
Horizontal tab. Move the screen cursor to the
next tab stop.
r
Carriage return. Position the screen cursor to the
beginning of the current line; do not advance to
the next line.
a
Alert. Sound the system bell.
Backslash. Used to print a backslash character.
"
Double quote. Used to print a double quote character.
Programming Fundamentals by Maryam
Ehsan
12
13. C Programming
There are multiple ways to print text. Following are some more examples.
1
//observing the use of n
2
// Printing a line with multiple statements
3
#include <stdio.h>
4
5
int main()
6
{
7
cout << "Welcome ";
8
cout << "to C!n";
9
10
return 0;
// indicate that program ended successfully
11 }
The output would be as bellow
Welcome to C!
Unless new line 'n' is specified, the text continues
on the same line.
Programming Fundamentals by Maryam
Ehsan
13
14. C Programming
1
// printing multiple lines with a single statement
2
// Printing multiple lines with a single statement
3
#include <stdio.h>
4
5
int main()
6
{
7
printf("WelcomentonnC!n“);
8
9
return 0;
// indicate that program ended successfully
10 }
Welcome
To
C!
Multiple lines can be printed with one
statement.
Programming Fundamentals by Maryam
Ehsan
14
15. Testing and Debugging
Bug
A mistake in a program
Debugging
Eliminating mistakes in programs
Programming Fundamentals by Maryam
Ehsan
15
16. Program Errors
Syntax errors
Violation of the grammar rules of the language
Discovered by the compiler
Run-time errors
Error messages may not always show correct location of
errors
Error conditions detected by the computer at run-time
Logic errors
Errors in the program’s algorithm
Most difficult to diagnose
Computer does not recognize an error
Programming Fundamentals by Maryam
Ehsan
16