Professional Documents
Culture Documents
Lecture 2-11-8-2021
Lecture 2-11-8-2021
Date: 11.08.2021
What is a function?
What is subroutine/procedure?
procedure and function these two terms were used in Pascal language.
subroutine and function these two terms were used in FORTRAN language.
printf(“%d”, res );
}
What is an instruction?
What is program?
A program is comprised of set of instruction(s) and/or subprogram(s) which performs a given task.
For example consider the following code segment.
#include<stdio.h>
void main()
{
int number, result;
printf(“Input the number for which factorial will be computed”);
scanf(“%d”, &number);
result=factorial(number);
printf(“Factorial =%d”, result);
}
What is software?
Software is comprised of set of instruction(s) and/or subprogram(s) and /or program(s) which meets
requirement of any given application.
Assignment: Write a program which performs any operation on given data. It should perform the
following operation