Procedural Programming

           Do not forget to be creative! This is an option and a way to happiness.           


Solutions 21st Century Skills  BETT 2009- Londra: Siveco&Sanako  Moodle platform  Keys skills  Microsoft Surface  Intel - Dell


Course: Procedural Programming | Bachelor of Science (Computer Science)
Software: C, C++, java
Programare procedurala / Programare imperativa / Algoritmica si Programare


MOTTO: "Writing in C or C++ is like running a chain saw with all the safety guards removed."    Bob Gray
"The evolution of languages: FORTRAN is a non-typed language. C is a weakly typed language. Ada is a strongly typed language. C++ is a strongly hyped language."  Ron Sercely
The Origins of C++: C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the early 1980's, and is based on the C language. The name is a pun - "++" is a syntactic construct used in C (to increment a variable), and C++ is intended as an incremental improvement of C. Most of C is a subset of C++, so that most C programs can be compiled (i.e. converted into a series of low-level instructions that the computer can execute directly) using a C++ compiler.
Dacă în deceniul 70 (secolul XX) la nivel universitar, erau câteva discipline proprii informaticii, astăzi există domenii complexe ale Informaticii: Sisteme de operare, Arhitectura calculatoarelor, Programare şi Software Engineering, Reţele de calculatoare şi Computing, Baze de date şi sisteme informatice, Programare şi dezvoltare Web, Grafică pe calculator şi realitate virtuală, Geometria computaţională, Modelare şi simulare, Calcul paralel şi distribuit, Inteligenţă artificială şi sisteme expert, Ingineria cunoaşterii.


Comentariu introductiv

Complexitatea aplicaţiilor de utilizare a calculatorului în diverse domenii de activitate (inclusiv in educatie), a determinat perfecţionarea, atât a sistemelor de operare şi limbajelor de programare, cât şi a tehnologiilor şi platformelor.  Au fost concepute şi elaborate noi sisteme de operare, noi limbaje de programare, noi tehnologii. Dacă în anii ’70 inventarea şi utilizarea microprocesorului au însemnat o revoluţie  în domeniul arhitecturii calculatoarelor, în anii ’90 a fost o adevărată revoluţie, atât în domeniul reţelelor de calculatoare, cât şi în domeniile limbajelor de programare (Java şi JavaScript) şi sistemelor de operare (Linux, Windows). Astfel, au apărut tehnologiile Web. Trebuie menţionate dezvoltarea şi evoluţia limbajului C++ care în anii ’80 a implementat şi dezvoltat modelul orientat spre obiecte (modelul programării obiectuale are rădăcini în limbajele SmallTalk, Lisp etc.) şi programarea orientată spre obiecte (OOP-Object Oriented Programming).

Definition. Programming Language: An artificial language used to write instructions that can be translated into machine language and then executed by a computer.

Abordarea  modernă a conceptului de algoritm

- New definition of algorithm

(Ref.: M. Vlada,  Fisier de tip .pdf ! Concept_algoritmi-CNIV-2004)

Detalii: M. Vlada, Conceptul de ALGORITM - abordare MODERNĂ, Gazeta de Informatica, 2003 ( P-I , P-II, P-III, P-IV) ,


  •    competente si experienta in activitati de concepere si elaborare de aplicatii software: lucrul la proiecte si lucrul in echipa; intelegerea si asimilarea principalelor cunostinte privind modelarea, reprezentarea si prelucrarea informatiilor in rezolvarea problemelor- elaborarea algoritmilor si programelor; obtinerea de competente privind rezolvarea problemelor folosind limbajul C++
  •  prin activitatile de la laborator se urmareste ca studentii sa obtina competente privind utilizarea sistemelor de calcul in tehnologia informatiei privind rezolvarea problemelor complexe.



Algoritmi, programare, proces de calcul, functii, proceduri, instructiuni, structuri de control, alocare de memorie, structuri de date.


Obiectivele disciplinei

Obiectivele cursului

Obiectivele activităţilor aplicative

( laborator, proiect)

  • intelegerea si asimilarea principalelor cunostinte privind modelarea, reprezentarea si prelucrarea informatiilor in rezolvarea problemelor- elaborarea algoritmilor si programelor
  • programare in C++
  • consolidarea cunostintelor de la curs prin aplicatii, testari; elaborarea de aplicatii  C++
  • competente si experienta in activitati de concepere si elaborare aplicatii software: lucrul la proiecte si lucrul in echipa


Sisteme de calcul, Algoritmica, Programare

-          Evolutia dezvoltarii informaticii: concepte si tehnici, implementare (software de baza), aplicatii software;

-          Etapele rezolvarii problemelor cu ajutorul calculatorului;

-          Software orientat spre domeniu, spre utilizator, spre programator;

-          Algoritmi: concepere, elaborare, analiza si corectitudine;

      2.  Repezentarea algoritmilor si limbaje de programare

-          Limbajul pseudo-cod: lexic, sintaxa, semantica; exemple ;

-          Limbaje de programare: procedurala, functionala, declarativa, OOP, concurenta;

-          Procesarea si interpretarea informatiilor;

      3.  Algoritmi fundamentali si Rezolvarea problemelor

-          Rezolvarea unei probleme: Enunt, analiza si proiectarea solutiei (Metoda demonstrativa, metoda algoritmica), Algoritmul in pseudo-cod, Codul C++, Testare si executie;

-          Algoritmi de tip Backtracking, exemple;

-          Algoritmi de tip “Divide et impera”, exemple

-          Algoritmi de tip “Geedy”, exemple

-          Algoritmi privind grafuri orintate si neorintate, exemple

-          Algoritmi privind arbori, exemple

-          Algoritmi privind sortarea informatiilor, exemple

-          Algoritmi privind geometria computationala

-          Algoritmi raster (J. Bresenham) pentru trasarea segmentului  de dreapta si cercului;

-          Algoritmul de clipping Cohen-Sutherland (clipping-ul unui segment fata de o fereastra dreptunghiulara);

     4. Fundamente de programare C++ si aplicatii software

-          Tipuri de date, variabile si expresii;

-          Input /output;

-          Instructiuni de control al calculului;

-          Definirea si utilizarea functiilor;

-          Recursivitate;

-          Tablouri, Tipuri definite si utilizator, fisiere;

-          Pointeri si masive

-          Directive de preprocesor



1. Exemple si aplicatii in C++

2. Dezvoltarea de programe in C++: calcule numerice, modelari geometrice

3. Implementarea algoritmilor privind structuri de date, probleme cu grafuri si arbori


Algoritmi si Programare (tkdokid published this -11.08.2010):

M. Vlada, Metoda Backtracking: : (Rusu Radu) rody_radu22 published this (11/08/2009)




1. R. Andonie, I. Garbacea,Fundamental algorithms. A C++ View (in romanian), Ed. Libris,Cluj-Napoca, 1995 (,

2. Gr. Albeanu, Grafica pe calculator. Algoritmi fundamentali, Editura Universitatii Bucuresti, 2001

3. D.S. Malik, C++ Programming: Program Design including Data Structure (2nd Edn), 2003

4. M. Vlada, , 2004

5. Bjarne Stroustrup, The C++ Programming Language (Special Edition), Addison Wesley Publishing Company Inc., 3rd Edition, 2000

6. Walter Savitch, Problem Solving with C++, 7th Edition, Addison Wesley Publishing Company, Inc., 2009

C++ Programming Language Tutorials




ALGORITM = LOGICA + CONTROL ( R. Kowalski 1979 )





On experimental algorithmics

Catherine McGeoch is the Beitzel Professor of Technology and Society at Amherst College, Massachusetts

Ubiquity, Volume 2011, Number August (2011), Pages 1-14

Computer science is often divided into two camps, systems and theory, but of course the reality is more complicated and more interesting than that. One example is the area of "experimental algorithmics," also termed "empirical algorithmics." This fascinating discipline marries algorithm analysis, which is often done with mathematical proofs, with experimentation with real programs running on real machines.

Catherine McGeoch: In fact there are three main activities in algorithm research: analysis, which is about predicting performance; design, which is about finding new and better ways to solve problems; and models of computation, which is about understanding how design and analysis changes when the basic operations (defined by the platform) are modified. In all three areas, theoretical methods necessarily make simplifying assumptions—worst-case inputs, dominant operation costs, and the RAM. Experimental methods fill in the gaps between those simplifying assumptions and real experience by incorporating interesting subclasses of inputs, constant factors and secondary costs, and more realistic machine models. This fundamental gap between theory and practice has existed since the beginning of computing, and experiments have always been used as a bridge between the two. In recent times the gap has become an abyss, due to the increased complexity of systems and algorithms, so the bridge must be stronger and more sophisticated. Also the traffic on the bridge has become more bidirectional—we see experiments developed in the service of theory as well as of practice.




Course: Procedural Programming | Bachelor of Science




About the Course

This course aims to introduce the student to more advanced computer programming using the C++ language. As well as learning C++, the student will learn how problems that are initally described in very general terms can be analysed, outlined and finally transformed into well-organised C++ programs using structured programming techniques. The course also introduces students to programming in C++. The assessment items are designed to reward regular study throughout term and to provide timely feedback to students.

 C++ programming fundamentals.

  •     Variables and expressions
  •     Input and output
  •     Flow of control: if, switch, while, for
  •     Pointers and references
  •     Arrays
  •     Functions

Synopsis (

[1] Basic imperative programming constructs: assignments, conditionals and loops. Comparison of procedural and functional programming. Example: summing an array.

[2] Informal introduction to pre-conditions, post-conditions, and invariants for reasoning about the correctness of loops. Example: slow and fast exponentiation.

[3] Further examples of invariants. Example: printing integers in decimal.

[4] Summary of rules for invariants. Example: string matching.

[5] Proof of termination. REPEAT, LOOP and FOR statements. Example: printing matching lines.

[6] Introduction to procedures.

[7] Binary search.

[8] Quicksort. Example: a sort utility.

[9] Introduction to modules. Example: a phone book implemented with arrays.

[10] Pointers, record types and linked lists. Example: phone book as a linked list.

[11] Doubly-linked lists, dummy nodes. Example: priority queues.

[12-13] Dijkstra's algorithm.

[14-15] A larger programming example: designing a text editor. Representations of text buffers; implementing a 2-D view of the text, implementing display update; implementing editor commands.

[16] Summary and closing example.


D.S. Malik, C++ Programming: Program Design including Data Structure (2nd Edn), 2003

Bjarne Stroustrup, The C++ Programming Language (Special Edition), Addison Wesley Publishing Company Inc., 3rd Edition, 2000

Walter Savitch, Problem Solving with C++, 7th Edition, Addison Wesley Publishing Company, Inc., 2009.




Pagină actualizată la 12 August 2011.