Prova di ammissione A.A. 2008/2009

Prima parte – Informatica

Esercizio 1

Scrivere (in pseudocodifica o in un qualsiasi linguaggio procedurale implerativo) una funzione che calcoli il valore minimo e il valore massimo fra quelli di un vettore passato come parametro.

Esercizio 2

Cosa fa il codice seguente?

C:

void foo(int v[100])
{
	int i,j;
	for (i=99;i>0;i--) {
		for (j=0;j<i;j++) {
			if (v[j] > v[j+1]) {
				int t=v[j];
				v[j]=v[j+1];
				v[j+1]=t;
			}
		}
	}
}

pascal:

type intarr=array [0..99] of integer;
procedure foo (var v: intarr);
var i,j,t:integer;
begin
	for i:=99 downto 1 do
	begin
		for j:=0 to i-1 do
		begin
			if v[j] > v[j+1] then
			begin
				t:=v[j];
				v[j]:=v[j+1];
				v[j+1]:=t;
			end;
		end;
	end;
end;
  • Quante volte viene eseguito il confronto “v[j] > v[j+1]” ?

Esercizio 3

Dare una breve descrizione di cosa si intenda con “Linguaggio di Programmazione” e fornire una lista di esempi mettendo in evidenza le caratteristiche dei singoli linguaggi.

Esercizio 4

Cosa è la struttura dati denominata “albero”? Fornire esempi di programmi che utilizzano alberi.

Esercizio 5

Il candidato descriva brevemente l’area o le aree dell’informatica per le quali nutre maggiore interesse, anche alla luce dei propri studi e, ove esista, della propria esperienza lavorativa.

Seconda parte – Inglese

Descrivere in Italiano il contenuto del testo che segue tratto dal primo capitolo del testo “Linux Device Drivers” di Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman

One of the many advantages of free operating systems, as typified by Linux, is that their internals are open for all to view. The operating system, once a dark and mysterious area whose code was restricted to a small number of programmers, can now be readily examined, understood, and modified by anybody with the requisite skills. Linux has helped to democratize operating systems. The Linux kernel remains a large and complex body of code, however, and would be kernel hackers need an entry point where they can approach the code without being overwhelmed by complexity. Often, device drivers provide that gateway.
Device drivers take on a special role in the Linux kernel. They are distinct “black boxes” that make a particular piece of hardware respond to a well-defined internal programming interface; they hide completely the details of how the device works. User activities are performed by means of a set of standardized calls that are independent of the specific driver; mapping those calls to device-specific operations that act on real hardware is then the role of the device driver. This programming interface is such that drivers can be built separately from the rest of the kernel and “plugged in” at runtime when needed. This modularity makes Linux drivers easy to write, to the point that there are now hundreds of them available.

 
prova_2008.txt · Ultima modifica: 2009/07/24 09:51 da kendra
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki