User:Rakesh Agrahari/Lesson Plan 5

From ICTED-WIKI
Jump to navigation Jump to search
Subject : Programming with C Class: BICT 1rd Semester
Period: First Unit: One
Topic: Using Function in C Time: 10 min
Teaching Item: Function in C

SPECIFIC OBJECTIVES[edit | edit source][edit | edit source]

At the completion of this topic students will be able to:

  • Write a program in C using function with new example i.e (calculate area of room returning value)

TEACHING MATERIALS[edit | edit source][edit | edit source]

  • Daily materials
  • White Board
  • Marker
  • Computer for practical work

TEACHING LEARNING ACTIVITIES[edit | edit source][edit | edit source]

1.    Previous program will be explained.

2.    The following program will be explained.

#include<stdio.h>

#include<conio.h>

int area(); // declaring a function

void main()

{

int x;

x=area(); // calling a function.

}

int area();

printf("The area of room is %d",x);

{

int l,b,a;

printf("Enter length & breadth");

scanf("%d %d",&l,&b);

a=l*b;

return a;

}

EVALUATION[edit | edit source][edit | edit source]

  • What else we can use instead of int x and where does it effects after that,