Entrance Announcement
MICTE 2080
2080 Magh 07
User:Saroj Neupane Lesson Plan 8: Difference between revisions
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...") |
m (→Evaluation) |
||
(2 intermediate revisions by one other user not shown) | |||
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. | ||
== 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):''' | |||
Syntax:data_type array_name[array_size]; | * Show the syntax for declaring an array and initializing it. | ||
Example:int marks[5]; | * 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<br /> | |||
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 67: | Line 62: | ||
#include <stdio.h> | #include <stdio.h> | ||
int main() { | # 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? | |||
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 ? | [[Category: Lesson Plan]] | ||
__notoc__ | |||
[[Category: BICTE]] |
Latest revision as of 04:29, 12 March 2024
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[edit | edit source]
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[edit | edit source]
- Whiteboard and markers
- Quick access to a C compiler for live coding demonstration
Teaching Learning Activity[edit | edit source]
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.
- 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[edit | edit source]
- What is array? How to declare and initialize array in c?
- Write simple program of array in c ?