User:Saroj Neupane Lesson Plan 8: Difference between revisions

From ICTED-WIKI
Jump to navigation Jump to search
(Created page with "<div style="column-count: 2; column-gap: 20px;"> '''Subject :''' Computer Science '''Period:''' 3rd '''Topic:''' Array in C Programming '''School:''' ABC School '''Class:''' 10 '''Unit:''' Seven '''Time:''' 15 min '''No. of Students:''' 20 </div> Specific Objectives By the end of this brief lesson, students should be able to: Understand the concept of arrays in C programming. Declare, initialize, and access elements in an array. M...")
 
mNo edit summary
Line 15: Line 15:


'''No. of Students:''' 20
'''No. of Students:''' 20
</div>  
</div>
Specific Objectives
 
== Specific Objectives ==
By the end of this brief lesson, students should be able to:
By the end of this brief lesson, students should be able to:


Understand the concept of arrays in C programming.
* Understand the concept of arrays in C programming.
Declare, initialize, and access elements in an array.
* Declare, initialize, and access elements in an array.
Materials:


Whiteboard and markers
== Teaching Materials ==
Quick access to a C compiler for live coding demonstration


Teaching Learning Activity
* Whiteboard and markers
* Quick access to a C compiler for live coding demonstration


Introduction (3 minutes):
== Teaching Learning Activity ==
'''Introduction (3 minutes):'''


Briefly review the concept of variables.
* Briefly review the concept of variables.
* Introduce the need for handling multiple values efficiently.
* Explain that arrays are collections of similar elements stored in contiguous memory locations.
* The array is the simplest data structure where each data element can be randomly accessed by using its index number.


Introduce the need for handling multiple values efficiently.
'''Declaration and Initialization (5 minutes):'''


Explain that arrays are collections of similar elements stored in contiguous memory locations.
* Show the syntax for declaring an array and initializing it.
* Syntax:    data_type array_name[array_size];  //Declaration of array Example: int marks[5]; 


The array is the simplest data structure where each data element can be randomly accessed by using its index number.
* marks[0]=80;//initialization of array
* marks[1]=60; 
* marks[2]=70; 
* marks[3]=85; 
* marks[4]=75;


Declaration and Initialization (5 minutes):
* Declaration with Initialization:
* int numbers[5] = {1, 2, 3, 4, 5};


Show the syntax for declaring an array and initializing it.
'''Accessing Array Elements (3 minutes):'''


marks[0]=80;//initialization of array 
* Explain how to access individual elements using index notation.
marks[1]=60; 
marks[2]=70; 
marks[3]=85; 
marks[4]=75; 


Syntax:data_type array_name[array_size]; 
int x = numbers[2];  // Access the third element (index 2) of the array
Example:int marks[5];   
 
Declaration with Initialization:
int numbers[5] = {1, 2, 3, 4, 5};
 
Accessing Array Elements (3 minutes):
 
Explain how to access individual elements using index notation.


int x = numbers[2];  // Access the third element (index 2) of the array




Code Demonstration (4 minutes):
'''Code Demonstration (4 minutes):'''


Quickly demonstrate a simple code example on the whiteboard.
Quickly demonstrate a simple code example on the whiteboard.
Line 76: Line 73:
     return 0;
     return 0;
}
}
Conclusion (2 minutes):


Summarize the key points: Arrays store multiple values of the same type.
'''Conclusion (2 minutes):'''
Encourage students to practice declaring, initializing, and accessing arrays.
 
* Summarize the key points: Arrays store multiple values of the same type.
* Encourage students to practice declaring, initializing, and accessing arrays.
 
== Evaluation ==


Evaluation:
* What is array? How to declare and initialize array in c?
What is array? How to declare and initialize array in c?
* Write simple program of array in c ?
Write simple program of array in c ?

Revision as of 09:20, 4 December 2023

Subject : Computer Science

Period: 3rd

Topic: Array in C Programming

School: ABC School

Class: 10

Unit: Seven

Time: 15 min

No. of Students: 20

Specific Objectives

By the end of this brief lesson, students should be able to:

  • Understand the concept of arrays in C programming.
  • Declare, initialize, and access elements in an array.

Teaching Materials

  • Whiteboard and markers
  • Quick access to a C compiler for live coding demonstration

Teaching Learning Activity

Introduction (3 minutes):

  • Briefly review the concept of variables.
  • Introduce the need for handling multiple values efficiently.
  • Explain that arrays are collections of similar elements stored in contiguous memory locations.
  • The array is the simplest data structure where each data element can be randomly accessed by using its index number.

Declaration and Initialization (5 minutes):

  • Show the syntax for declaring an array and initializing it.
  • Syntax: data_type array_name[array_size]; //Declaration of array Example: int marks[5];
  • marks[0]=80;//initialization of array
  • marks[1]=60;
  • marks[2]=70;
  • marks[3]=85;
  • marks[4]=75;
  • Declaration with Initialization:
  • int numbers[5] = {1, 2, 3, 4, 5};

Accessing Array Elements (3 minutes):

  • Explain how to access individual elements using index notation.

int x = numbers[2]; // Access the third element (index 2) of the array


Code Demonstration (4 minutes):

Quickly demonstrate a simple code example on the whiteboard.

  1. include <stdio.h>

int main() {

   int numbers[5] = {1, 2, 3, 4, 5};
   for (int i = 0; i < 5; i++) {
       printf("Element %d: %d\n", i, numbers[i]);
   }
   return 0;

}

Conclusion (2 minutes):

  • Summarize the key points: Arrays store multiple values of the same type.
  • Encourage students to practice declaring, initializing, and accessing arrays.

Evaluation

  • What is array? How to declare and initialize array in c?
  • Write simple program of array in c ?