Project Work of Computer Science: Devi Secondary School, Anarmani-3 ESTD:2019
Project Work of Computer Science: Devi Secondary School, Anarmani-3 ESTD:2019
Project Work of Computer Science: Devi Secondary School, Anarmani-3 ESTD:2019
}
20.//program to read name, address, and age.
#include<stdio.h>
#include<conio.h>
struct person
{
char name[20]; char address[20];
int age;
};
void main()
{
struct person p[5];
int i;
for(i=0;i<5;i++)
{
printf(“Enter the name”);
scanf(“%s”,p[i].name);
printf(“Enter address of person”);
scanf(“%s”,p[i].address);
printf(“Enter age of person”);
scanf(“%d”,&p[i].age);
}
for(i=0;i<5;i++)
{
printf(“\n Name=%s\tAddress=%s\tAge =%d”,p[i].name,p[i].address,p[i].age);
}
getch();
}
21./*program to take n number of string and sort them in alphabetical
order.*/
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[50][30],temp[30];
int i,j,n;
printf(“Enter number of strings”);
scanf(“%d”,&n);
for (i=0;i<n;i++)
{
printf(“\nEnter the string”);
scanf(“%s”,str[i]);
}
for(i=0;i<n-1;i++);
{
if(strcmp(str[i],str[j])>0)
{
Strcpy(temp,str[i]);
Strcpy(str[i],str[j]);
Strcpy(str[j],temp);
}
}
printf(“The sorted string are:”);
for (i=0;i<n;i++)
{
printf(“\n%s”,str[i]);
}
getch();
}
Acknowledgement
I would like to express my special thanks of gratitude to my teacher
Mr. PRABAT THAPA as well as our principal MAM AMBIKA
SHRESTHA who gave me the golden opportunity to do this wonderful
project on the topic C PROGRAMMING, which also helped me in doing
a lot of Research and I came to know about so many new things.
I am really thankful to them.
Despite of my sincere effort to this report, there might be some mistake or
weakness. If there is any mistake regarding my project please pardon me.
I am making this project not only for marks but to also increase my
knowledge.
THANKS AGAIN TO ALL WHO HELPED ME
Content
1. Acknowledgement
2. Certificate from supervisor
3. Introduction of C Programming
4. Programming on the respective topic:
Program to find odd or even.
Program to find the commission amount.
Program to display the name of day on the basis of entered
number 1 to 7.
Program to input a number and display its multiplication
table.
Program to read salaries of 200 employee.
Program to add two matrices.
Program to read name, address and age of 5 different person.
Program to find the factorial of given number using recursive
function.
Program to input ‘n’ number and sorting them in ascending
order.
Program to calculate and display the factorial number of 5.
Program to check whether the given number is prime or
composition.
Program to display the multiplication table of n number using
function.
Program that takes ‘n’ number of string and sorting them in
ascending order.
5. Conclusion
6. Bibliography
7. End page
Introduction on ‘C’ Language
Programming in C
Background
The computer needs a set of instructions to process data. A program is a
sequence of instructions to perform a particular task. Collection of the
program is called software.
A programming language is a well-defined set of rules for specifying a
program’s sequence of instruction.
Example: C, C++, FORTRAN, Java, BASIC, Prolog, Pascal etc.
The source code is a sequence of instruction, written in a human-readable
programming language. It constitutes a program or a piece of a program. A
source file is a file of source code.
Programming language
A language is a mean of communication. A programming language is a well-
defined set of rules for specifying a program sequence of instructions. A
programming language consists of symbols, characters, and rules that permit
people to communicate with computer.
Founder of C Language: Dennis Ritchie in 1970s.
Bibliography:
Following books and websites were a source for my project.
Signature:………………. Signature:……………………..