Entrance Announcement
MICTE 2080
2080 Magh 07
User:Bishu Thapa/Real teaching 25
Jump to navigation
Jump to search
Subject: Computer Science
Period: Third
Topic: Programing concept and Logics
Teaching Item: Write and run program of arrays with example in C programing language
Class: class 11
Unit: 1
Time: 45 minutes
No. of Students: 24
Objectives[edit | edit source]
At the end of this lesson, students will be able to:
- To Write a program of single- and two-dimensional array.
Teaching Materials[edit | edit source]
- Daily materials
- Power point presentation slides ·
Teaching Learning Activities[edit | edit source]
- After entering to the classroom, I will motivate students by asking some questions related to this topic before starting lesson for their attention.
- I will discuss previous topic and discuss the today's Topic
- Then, I will Write a program of single dimension array and run the program in Turboo C++
- // C Program to demonstrate array initialization #include <stdio.h> int main() { // array initialization using initialier list int arr[5] = { 10, 20, 30, 40, 50 }; // array initialization using initializer list without // specifying size int arr1[] = { 1, 2, 3, 4, 5 }; // array initialization using for loop float arr2[5]; for (int i = 0; i < 5; i++) { arr2[i] = (float)i * 2.1; } return 0; }
- Then I will write a program of multidimensional array and I will run on the turbo C++
- // C Program to print the elements of a // Two-Dimensional array #include <stdio.h> int main(void) { // an array with 3 rows and 2 columns. int x[3][2] = { { 0, 1 }, { 2, 3 }, { 4, 5 } }; // output each array element's value for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { printf("Element at x[%i][%i]: ", i, j); printf("%d\n", x[i][j]); } } return (0); }
- Moreover, I will also summarize the topic through discussion and Q/A Method while clarifying student’s confusion.
Assessment[edit | edit source]
- Write a C program to calculate total and average of salary of 100 person using Array?
Homework[edit | edit source]
- Write a C program to ask any 10 number from the user and sort them ascending order and Display?