Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
When we talk about any programing language the first thing that comes to picture
are the data types.
In C# there are 2 kinds of data types:
1. Value Types (Primitive data types, Structs and enumerations) stored in
Stack
2. Reference Types (Class, Interface, Delegates) stored in Heap
ARRAYS:
Method: is a set of code under a unique name within the scope which accepts some
input values as parameters and may return value of a particular data type.
e.g. :
int Sum( int I, int j)
{
Int r = I + j;
return(r);
}
int x = Sum(4,5);
Method Overloading: is the process of having different methods with same name
but different signature.
Questions:
1. Print Fibonacci series till 10th term // 1 1 2 3 5 8 13 21
2. Write a method to accept integer value as argument and return the Factorial
for it recursively
3. Create an array containing 10 random integers and then print the integers in
ascending order. // Do not use Array.Sort