The document discusses arrays and classes in C#. It describes that arrays are sequences of data of the same type that can be accessed by index. Classes define common behaviors and attributes with members that must have access modifiers. The document also explains properties of arrays like length, rank, and methods; and string class methods such as insert, length, copy, and compare.
Functions: Function Definition, prototyping, types of functions, passing arguments to functions, Nested Functions, Recursive functions.
Strings: Declaring and Initializing strings, Operations on strings, Arrays of strings, passing strings to functions. Storage Classes: Automatic, External, Static and Register Variables.
Structures-Declaring and Initializing, Nested structure, Array of Structure, Passing Structures to functions, Unions, typedef, enum, Bit fields.
Pointers: Declarations, Pointer arithmetic, Pointers and functions, call by value, Call by reference, Pointers and Arrays, Arrays of Pointers, Pointers and Structures. Meaning of static and dynamic memory allocation, Memory allocation functions.
Files: File modes, File functions, and File operations, Text and Binary files, Command Line arguments Preprocessor directives. Macros: Definition, types of Macros, Creating and implementing user defined header files
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
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!
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
2. Array
Arrays are sequence of data of the same data type. You can access an
individual element of an array by means of its position (index).
In C#, array notation is very similar to that used by C/C++ but it differs
in two things:
• You can't write square brackets to the right of the variable name.
• You DON'T specify the size of array when declaring it.
All C# array are derived from the System.Array base class.
To define an array, this is done in 2 steps:
1. declare array
2. create array
The general form of declaring an array:
Data_type[] array_name;
The size of an array is established when it is created not when it is
declared.
mmouf@2018
3. Array
• In C#, an array element access expression is automatically
checked to ensure that the index is valid. This is used to ensure that C#
is a type safe language. Otherwise, it will throw OutofRangeException.
• We can't shrink or expand the array
• Declaring an array doesn't mean creating an array instance, this is
because array are reference type not value type.
• The array are implicitly initialized by 0 or false if it is of type
boolean.
• When initializing array, you must explicitly initialize all array
element.
mmouf@2018
4. Single Dimension Array
string[] books; //declare
books = new string[3]; //create array of 3 element
OR
Books = new string[3] {"C#", "DotNet", "VB.Net"}; //create and init
OR(Declare and create at 1 step)
string[] books = {"C#", "DotNet", "VB.Net"}; //will set the array 3
OR(Declare and create at 1 step)
string[] books = new string[3]{"C#", "DotNet", "VB.Net"};
mmouf@2018
6. Two Dimension Array
Declaration is important in compilation. While creation is done at
runtime
So, you can make the size of array variable, which is very similar to
Dynamic allocation.
Example:
int rows;
int col;
Console.WriteLine(“Enter number of rows”);
rows = int.Parse(Console.ReadLine());
Console.WriteLine(“Enter number of columns”);
col = int.Parse(Console.ReadLine());
int[,] ar;
ar = new int[rows, col];
mmouf@2018
7. Jagged Array
C# also allows you to create a special type of two-dimensional array
called a jagged array.
A jagged array is an array of arrays in which the length of each array
can differ.
A jagged array can be used to create a table in which the lengths of the
rows are not the same.
Jagged arrays are declared by using sets of square brackets to indicate
each dimension.
For example, to declare a two-dimensional jagged array, you will use
this general form:
type[ ] [ ] array-name = new type[size][ ];
Here, size indicates the number of rows in the array.
The rows, themselves, have not been allocated. Instead, the rows are
allocated individually. This allows for the length of each row to vary.
mmouf@2018
8. Jagged Array
Example:
int[][] jagged = new int[3][];
jagged[0] = new int[4];
jagged[1] = new int[3];
jagged[2] = new int[5];
Once a jagged array has been created, an element is accessed by
specifying each index within its own set of brackets.
For example, to assign the value 10 to element 2, 1 of jagged, you
would use this statement:
jagged[2][1] = 10;
mmouf@2018
9. Properties of Array
Length: returns number of element in the array.
Example:
int[] x;
x = new int[7];
int y = x.Length; //y = 7
int[,] a;
a = new int[3, 4];
int b = a.Length; //b = 12 (3*4)
Rank: return the dimension of array
Example:
int z = x.Rank; //z = 1;
int c = a.Rank; //c = 2;
mmouf@2018
10. Properties of Array
Sort(): sort an array
System.Array.Sort(array_name); //sort the array
Clear(): set a range of elements in the array to zero, false or null
reference
System.Array.Clear(array_name, starting_index, numberofelement);
Clone(): this method creates a new array instance whose elements are
copies of the elements of the cloned array.
int[] cl = (int[])data.Clone();
If the array being copied contains references to objects, the
references will be copied and not the objects. Both arrays will refer to
the same objects
mmouf@2018
11. Properties of Array
GetLength(): this method returns the length of a dimension provided as
an integer.
Ex: int [,] data = {{0, 1, 2, 3}, {4, 5, 6, 7}};
int dim0 = data.GetLength(0); //2
int dim1 = data.GetLength(1); //4
IndexOf(): this method returns the integer index of the first occurrence
of a value provided as argument or -1 if not found. (used in 1-dimension
array)
int[] data = {4, 6, 3, 8, 9, 3};
int Loc – System.Array.IndexOf(data, 9); //4
A method may return array:
mmouf@2018
12. Properties of Array
The C# allows you to iterate over all items within a collection (ex:
array,…)
int []ar = new int[]{0, 1, 2, 3, 4, 5};
foreach(int I in ar)
{
Console.WriteLine(i);
}
You can’t modify the elements in a collection by using a foreach
statement because the iteration variable is implicitly readonly.
foreach(int i in ar)
{
i++ ; //compile time error
Console.WriteLine(i);
}
mmouf@2018
13. Implicitly Typed Local Variables and Arrays
We can declare any local variable as var and the type will be inferred by
the compiler from the expression on the right side of the initialization
statement.
This inferred type could be:
Built-in type
User-defined type
Type defined in the .NET Framework class library
Example:
var int_variable = 6; // int_variable is compiled as an int
var string_variable = “Aly"; // string_variable is compiled as a string
var int_array = new[] { 0, 1, 2 }; // int_array is compiled as int[]
var int_array = new[] { 1, 10, 100, 1000 }; // int[]
var string_array = new[] { "hello", null, "world" }; // string[]
mmouf@2018
14. Implicitly Typed Local Variables and Arrays
Notes:
• var can only be used when you are to declare and initialize the local
variable in the same statement.
• The variable cannot be initialized to null.
• var cannot be used on fields at class scope.
• Variables declared by using var cannot be used in the initialization
expression. In other words, var i = i++; produces a compile-time error.
• Multiple implicitly-typed variables cannot be initialized in the same
statement.
• var can’t be used to define a return type
• Implicit typed data is strongly typed data, variable can’t hold values of
different types over its lifetime in a program
mmouf@2018
15. Classes
Class is a named syntactic construct that describes common behavior
and attribute.
All classes are reference type and inherit from object class directly or
indirectly.
There is also: class variable( or static members).
Ex:
class MyClass
{
private int x;
public int GetX()
{
return x;
}
}
mmouf@2018
16. Classes
Each member in the class (class member or static member) must have
an access modifier (public, private or protected)
The class itself is a template, so to deal with the class we must have an
object from this class.
To have an object of a class:
1) Declaration : MyClass m;
2) Creation : m = new MyClass(); //Done at run time.
Note: object of a class is a reference type.
mmouf@2018
17. Classes
Passing Reference type variable to a function:
Ex:
class C1
{
public int a;
}
class C2
{
public void MyFunction(C1 x)
{
x.a = 20;
}
}
mmouf@2018
18. Classes
class C3
{
public static void Main()
{
C1 L;
C2 M;
L = new C1();
L.a = 5;
M = new C2();
M.MyFunction(L);
Console.WriteLine(L.a); // 20
}
}
With reference type variable: either call by value or call by reference it will be
considered as a call by reference
The this object is sent in calling the function of an object, it is the reference to the
calling object. mmouf@2018
19. Static Classes
C# 2.0 added the ability to create static classes.
There are two key features of a static class.
First, no object of a static class can be created.
Second, a static class must contain only static members.
The main benefit of declaring a class static is that it enables the
compiler to prevent any instances of that class from being created.
Thus, the addition of static classes does not add any new functionality to
C#.
Within the class, all members must be explicitly specified as static.
Making a class static does not automatically make its members static.
mmouf@2018
20. String Class
1) Insert: insert characters into string variable and return the new
string
Ex: String S = “C is great”
S = S.Insert(2, “Sharp”);
Console.WriteLine(S); //C Sharp is great
2) Length : return the length of a string.
Ex : String msg = “Hello”;
int slen = msg.Length;
3) Copy: creates new string by copying another string (static)
Ex: String S1 = “Hello”;
String S2 = String.Copy(S1);
4) Concat: Creates new string from one or more string (static)
Ex: String S3 = String.Concat(“ä”, “b”, “c”, “d”); or use + operator
S3 = “a” + “b” + “c” +”d”;
mmouf@2018
21. String Class
5) ToUpper, ToLower: return a string with characters converted
upper or lower
Ex: String sText = “Welcome”;
Console.WriteLine(sText.ToUpper()); //WELCOME
6) Compare: compares 2 strings and return int.(static)
-ve (first<second) 0 (first = second) +ve (first>second)
Ex:String S1 = “Hello”; S2 = “Welcome”;
int comp = String.Compare(S1, S2); //-ve
there is another version of Compare that takes 3 parameters, the
third is a boolean :true (ignore case) false (Check case)
mmouf@2018