• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

ProjectsGeek

Virtual Classroom Java Project

June 27, 2011 by ProjectsGeek 36 Comments

Virtual Classroom Java Project 1
Virtual Classroom Java Project 2
Virtual Classroom Java Project 3
Virtual Classroom Java Project 4
Virtual Classroom Java Project 5

Virtual Classroom Java Project

 

The Virtual Classroom is a collaborative teaching tool to assist the students to learn in an interactive manner. It aims to complement the efforts of teachers to integrate technology into their classrooms and link the students to the Internet in educationally productive ways and provide them a stimulating, positive and enjoyable environment to study.

It contains the following elements:-

 

1. Student Login:

It enables a person to login as a student or sign up if he/she has not registered for the classroom.

Once logged in a student has the following features:-

a) Edit Profile:

It allows modifying the details

b) Study Material & Video Lectures:

It displays a list of ppts & interactive video lessons categorized by subjects as posted by the faculty

c) Ask doubts:

It enables the students to ask questions

d) Answers:

It shows the answers by the teachers to the questions asked by various students

2. Faculty Login:

It enables a person to login as a faculty member or sign up if he/she has not registered for the classroom.

Once logged in a faculty member has the following features:-

a) Edit Profile:

It allows modifying the details

b) Study Material & Video Lectures:

It allows the faculty members to post & remove ppts & video lessons c) Doubts:

It shows all the questions asked by the students

d) Answers:

It enables teachers to answer the questions asked by the students

3. Administrator Login

The administrator is the ultimate controller of the application with the highest authority.

He/she has the following features:-

a)Student/Faculty:

It displays a list of students/faculty members registered for the classroom

b)Student/Faculty req:

It displays a list of students/faculty members whose sign up request is still pending

c)PPT (pload/del)/Video(upload/del):

It displays a list of ppts & videos posted by the faculty members. The administrator has the power to remove ppts/videos from the list and upload according to wish

d)Question/Ans

It displays a list of questions asked by students/answers to questions by teachers. The administrator has the power to delete questions/answers from the list.

Project Download

Other Projects to Try:

  1. Teachers Feedback Form Java Project
  2. Online Examination System project Java
  3. Online Examination System project using Java
  4. Course Management System project in Java
  5. Faculty Book System Java Project

Filed Under: Java Projects Tagged With: Java Projects

String Operations with Pointers

June 26, 2011 by ProjectsGeek Leave a Comment

String operations with pointers

Program showing various operations on string(functions implemented
with pointers).
functions implemented:
(1) Reversing a string
(2) Palindrome
(3) Copy
(4) String comparison
(5) Searching a string(substring)

Source Code

 #include  
 #include  
 #include  
 #include  
 /*function prototypes*/  
 void reverse(char *a);  
 int palindrome(char *a);  
 void copy(char *b,char *a);  
 int compare(char *a,char *b);  
 void search(char *a,char *b);  
 void main()  
 { char a[100],b[100];  
 int result,op;  
 clrscr();  
 do  
 { /* display the menu */  
 printf("\n1)Reverse the Given String");  
 printf("\n2)Check for palindrome");  
 printf("\n3)Copy");  
 printf("\n4)String Comparison");  
 printf("\n5)String Searching(substring)");  
 printf("\n6)Quit");  
 printf("\n\nEnter Your Choice:");  
 scanf("%d",&op);  
 flushall();  
 switch(op)  
 {  
 case 1: printf("\n Enter a String:");  
 gets(a);  
 reverse(a);  
 printf("\n Result=%s",a);  
 printf("\n\n press a Character !!!!!!");  
 getch();  
 break;  
 case 2: printf("\n Enter a String:");  
 gets(a);  
 result=palindrome(a);  
 if(result==0)  
 printf("\nNot a palindrome");  
 else  
 printf("\nA palindrome");  
 printf("\n\n press a Character !!!!!!");  
 getch();  
 break;  
 case 3: printf("\n Enter a String:");  
 gets(a);  
 copy(b,a);  
 printf("\nResult=%s",b);  
 printf("\n\n press a Character !!!!!!");  
 getch();  
 break;  
 case 4: printf("\n Enter 1st string:");  
 gets(a);  
 printf("\n Enter 2nd string:");  
 gets(b);  
 result=compare(a,b);  
 if(result==0)  
 printf("\nboth are same");  
 else  
 if(result>0)  
 printf("\n1st>2nd");  
 else  
 printf("\n1st<2nd");  
 printf("\n\n press a Character !!!!!!");  
 getch();  
 break;  
 case 5: printf("\n Enter 1st string:");  
 gets(a);  
 printf("\n Enter 2nd string:");  
 gets(b);  
 search(a,b);  
 printf("\n\n press a Character !!!!!!");  
 getch();break;  
 }  
 }while(op!=6);  
 }  
 void reverse(char *a)  
 { char *p,*q;  
 char temp;  
 /* Algorithm used is an inplace Algorithm  
 1. q is postioned on the last character  
 2. p is postioned on the first character  
 3. *p is interchanged with *q  
 4. p is increased by 1 and q is decremented by 1  
 5. if p"""  
 */  
 p=q=a;  
 while(*q!='\0')  
 q++;  
 /* q is on the null character*/  
 q--;  
 while(p /* Algorith used  
 1. q is positioned on the last character  
 2. p is positioned on the first character  
 3. if *p != *q then it is not a palindrome,return(0)  
 4. p is increased by 1 and q is decremented by 1  
 5. if p"""  
 6. string is a palindrome , return(1)  
 */  
 p=q=a;  
 while(*q!='\0')  
 q++;  
 /* q is on the null character*/  
 q--;/*q is on the last character*/  
 while(p /* Algorithm  
 1.both the strings are compared,character by character  
 from the beginning  
 2.on first point of mismatch:  
 a.if(*a>*b) then a>b  
 b.if(*a  
 3. if both the strings end together then they are eqaul  
 */  
 while(*a!='\0')  
 {  
 if(*a > *b)  
 return(1);  
 if(*a < *b)  
 return(-1);  
 a++;b++;  
 }  
 return(0);  
 }  
 void search(char *a ,char *b)  
 { int lena,lenb;  
 char *i,*j,*k;  
 /*Algorithm  
 1. lenb=length of string b[],lena=length of a[]  
 string a[] is scanned using the pointer i from location  
 0 to length of a[]-lenb+1  
 2. string b[] is matched in string a[] from the position i  
 */  
 for(lena=0;*(a+lena)!='\0';lena++)  
 ;  
 for(lenb=0;*(b+lenb)!='\0';lenb++)  
 ;  
 /* searching */  
 for(i=a;i<=a+lena-lenb+1;i++)  
 { k=i;  
 for(j=b;*k==*j&& *j!='\0';j++,k++)  
 ;  
 if(*j=='\0')  
 printf("\nstring found at location:%d",i-a+1);  
 }  
 }  
 ""  

String operations with pointers Output

1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:1

Enter a String:India

Result=aidnI

press a Character !!!!!!
1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:2

Enter a String:India

Not a palindrome

press a Character !!!!!!
1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:2

Enter a String:madam

A palindrome

press a Character !!!!!!

1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:3

Enter a String:Asia

Result=Asia

press a Character !!!!!!
1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:4

Enter 1st string:India

Enter 2nd string:Asia

1st>2nd

press a Character !!!!!!
1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:5

Enter 1st string:Pacific

Enter 2nd string:c

string found at location:3
string found at location:7

press a Character !!!!!!
1)Reverse the Given String
2)Check for palindrome
3)Copy
4)String Comparison
5)String Searching(substring)
6)Quit

Enter Your Choice:6

Other Projects to Try:

  1. Database Operations without pointers source code
  2. String Operations in C Program
  3. Matrix Operations with Pointers
  4. string operations such as Copy, Length, Reversing, Palindrome, Concatenation
  5. String Operations in C Language

Filed Under: Fundamentals of Datastructure Tagged With: Datastructure Assignments

Database Operations without pointers source code

June 26, 2011 by ProjectsGeek Leave a Comment

Database Operations without pointers

Objective

Program for Operations on a database without using pointers. This program in c/c++ will simulate database operations such as create record, insert, delete, search, print, sort and modify records using simple menu interface which is provided to interact with the program.
Program developed using c/c++ starts with menu options where user can provide data such as employee details. User needs to provide number of employees we want to insert into the database. After entering number of employees we want to insert user can provide data inform of employee name, employee id, salary for particular employee. As soon as entered is pressed record will be inserted into database.
For more c programs check here.
Database Operations without pointers
 #include  
 #include  
 #include  
 typedef struct employee  
 { int code;  
 char name[20];  
 int salary;  
 }employee;  
 void insert(employee st[],int position,int n);  
 void Delete(employee st[],int position,int n);  
 int search(employee st[],int code,int n);  
 void print(employee st[],int n);  
 void read(employee st[],int n);  
 void sort(employee st[],int n);  
 void modify(employee st[],int n);  
 void main()  
 { employee st[30];  
 int n,i,op,position,code;  
 clrscr();  
 do{  
 flushall();  
 printf("\n1)create\n2)insert\n3)delete\n4)search\n5)print\n6)Sort\n7)Modify");  
 printf("\n8)Quit");  
 printf("\nEnter Your Choice:");  
 scanf("%d",&op);  
 switch(op)  
 { case 1: printf("\nEnter No. of employees:");  
 scanf("%d",&n);  
 read(st,n);  
 break;  
 case 2: printf("\n enter the position(no of records=%d):",n);  
 scanf("%d",&position);  
 if(position<=n+1)  
 {  
 insert(st,position,n);  
 n++;  
 print(st,n);  
 }  
 else  
 printf("\n can not insert");  
 break;  
 case 3:printf("\n enter the code : ");  
 scanf("%d",&code);  
 position=search(st,code,n);  
 if(position != -1 )  
 {  
 Delete(st,position,n);  
 n--;  
 print(st,n);  
 }  
 else  
 printf("\n can not delete ");  
 break;  
 case 4: printf("\nenter code:");  
 scanf("%d",&code);  
 position=search(st,code,n);  
 if(position==-1)  
 printf("\nnot found");  
 else  
 { printf("\n found at location=%d",position+1);  
 printf("\n %s\t%d\t%d",st[position].name,st[position].code,st[position].salary);  
 }  
 break;  
 case 5: print(st,n);  
 break;  
 case 6: sort(st,n);print(st,n);break;  
 case 7: modify(st,n);print(st,n);break;  
 }  
 }while(op!=8);  
 }  
 void insert( employee st[],int position,int n)  
 { int i;  
 printf("\n enter data(name code salary): ");  
 for(i=n-1;i>=position-1;i--) /*index is 1 less than position*/  
 st[i+1]=st[i];  
 scanf("%s%d%d",st[position-1].name,&st[position-1].code,&st[position-1].salary);  
 }  
 void Delete(employee st[],int position,int n)  
 { int i;  
 for(i=position+1;i st[j+1].code)  
 {  
 temp=st[j];  
 st[j]=st[j+1];  
 st[j+1]=temp;  
 }  
 }  

Output

1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:1

Enter No. of employees:2

enter data(name code salary): John 1 2000
Jenny 2 3000

1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:2

enter the position(no of records=2):3

enter data(name code salary): Merry 3 5000

John 1 2000
Jenny 2 3000
Merry 3 5000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:3

enter the code : 2

John 1 2000
Merry 3 5000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:4

enter code:3

found at location=2
Merry 3 5000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:5

John 1 2000
Merry 3 5000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:6

John 1 2000
Merry 3 5000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter Your Choice:7

Enter the code : 3

enter data(name code salary): Diya 5 4000

John 1 2000
Diya 5 4000
1)create
2)insert
3)delete
4)search
5)print
6)Sort
7)Modify
8)Quit
Enter the code : 8

 

 

 

Other Projects to Try:

  1. Mobile User Information Project
  2. Hash table code in C Language
  3. String Operations with Pointers
  4. Matrix Operations with Pointers
  5. Sparse Matrix Operations Code using C Langauge

Filed Under: Fundamentals of Datastructure Tagged With: Datastructure Assignments

Quick sort using recursion

June 26, 2011 by ProjectsGeek Leave a Comment

Implement Quick sort using recursion

 

In this post we will see how to implement quick sort using recursion in c/c++. Quick sort is simple and efficient algorithm for sorting items in array or elements in array. Its is very common algorithm used for sorting and asked in interviews as well.

Quick sort using recursion

Features of Quick sort

  • Worst-case performance‎: ‎O(n2)
  • Average performance‎: ‎O(n log n)
  • Best-case performance‎: ‎O(n log n)
Quick sort using recursion work is such as way that we need to select a pivot element. Now reorder the elements which are less than pivot should come before pivot. Similarly elements which are greater than pivot will come after selected pivot element. We need to repeat this process recursively on the element array.
Beyond this below implementation we have many different types of quick sorts available which are more efficient is specific scenarios.

Quick sort source code

#include
#include
void quick_sort(int [],int,int);
int partition(int [],int,int);
void main()
{
int a[30],n,i,op;
clrscr();
do
{
printf("\n1)Quick Sort\n2)Quit");
printf("\nEnter your choice : ");
scanf("%d",&op);
if(op==1)
{
printf("\nEnter no of elements :");
scanf("%d",&n);
printf("\nEnter array elements :");
for(i=0;i<=u);do
{ j--;
}while(a[j]>v);

if(i)>;i++)>

Quick sort using recursion Output

1)Quick Sort
2)Quit
Enter your choice : 1

Enter no of elements :6

Enter array elements :60 33 70 84 21 50

Sorted array is :21 33 50 60 70 84
1)Quick Sort
2)Quit
Enter your choice : 2

);>)>)>;i++)>

Other Projects to Try:

  1. Matrix Operations with Pointers
  2. Mobile User Information Project
  3. Set operations – Union, Intersection, Difference, Symmetric Difference using C
  4. Sparse Matrix Operations Code using C Langauge
  5. Factorial of a number using recursion in C

Filed Under: Fundamentals of Datastructure Tagged With: Datastructure Assignments

Mobile User Information Project

June 26, 2011 by ProjectsGeek Leave a Comment

Program for Mobile user information

Program details:

1. Display the data in descending order of Mobile No.(insertion sort).
2. Display data in ascending order of name (selection sort).
3. Display details of Mobileno specified by user (Binary search).
4. Display the number of passes and comparisons for different test cases(
(Worst, Average,Best case).

 

;i++)>;i++)>

 #include  
 #include  
 #include  
 #include  
 typedef struct mobile  
 { long mobileno;  
 char name[20];  
 float billamt;  
 }mobile;  
 int binsearch(mobile st[],long mobileno,int n);  
 /* Different cases for searching :  
 Best case - Data being searched is exactly at the centre  
 worst Case - Data being searched is not there.  
 Average Case - Data being searched is at a random place .  
 */  
 void print(mobile st[],int n);  
 void read(mobile st[],int n);  
 void insertionsort(mobile a[],int n); //sort in descending order on MobileNo  
 /* Different cases for insertin sort  
 Best case : when the data is already sorted in descending order on mobileno  
 worst case: when the data is already sorted in ascending order on mobileno.  
 Average case : when the data is in a random sequence  
 */  
 void selectionsort(mobile a[],int n);  
 /*Different cases for selection sort :  
 Only one case :  
 No. of passes = n-1  
 no. of comparisons= n(n-1)/2  
 */  
 void main()  
 { mobile st[30];  
 int n,i,op,position;  
 long mobileno;  
 clrscr();  
 do{  
 flushall();  
 printf("\n1)create\n2)print");  
 printf("\n3)Display the data in descending order of mobileno(insertion sort)");  
 printf("\n4)Display the data in ascending order of name(selection sort)");  
 printf("\n5)Display details for mobileno specified by user(binary search)");  
 printf("\n6)Quit");  
 printf("\nEnter Your Choice:");  
 scanf("%d",&op);  
 switch(op)  
 { case 1: printf("\nEnter No. of Users :");  
 scanf("%d",&n);  
 read(st,n);  
 break;  
 case 2: print(st,n);break;  
 case 3: insertionsort(st,n); print(st,n); break;  
 case 4: selectionsort(st,n); print(st,n); break;  
 case 5: printf("\nPlease ensure that data is sorted using option no.3");  
 printf("\nenter Mobile number : ");  
 scanf("%ld",&mobileno);  
 position=binsearch(st,mobileno,n);  
 if(position==-1)  
 printf("\nnot found");  
 else  
 { printf("\n found at location=%d",position+1);  
 printf("\n %s\t%ld\t%6.2f",st[position].name,st[position].mobileno,st[position].billamt);  
 }  
 break;  
 }  
 }while(op!=6);  
 }  
 int binsearch(mobile st[],long mobileno,int n)  
 { int i,j,k,comp=0;  
 i=0;  
 j=n-1;  
 while(i<=j)  
 {  
 k=(i+j)/2;  
 comp++;  
 if(mobileno==st[k].mobileno)  
 {  
 printf("\nNo. of comparisons = %d ",comp);  
 return(k);  
 }  
 else  
 if(mobileno > st[k].mobileno)  
 j=k-1;  
 else  
 i=k+1;  
 }  
 printf("\nNo. of comparisons = %d ",comp);  
 return(-1);  
 }  
 void print(mobile st[],int n)  
 { int i;  
 for(i=0;i=0 && a[j].mobileno < temp.mobileno;j--)  
 {  
 comp++;  
 a[j+1]=a[j];  
 }  
 a[j+1]=temp;  
 }  
 printf("\nPasses = %d\t Comparisons = %d",passes,comp);  
 }  
 void selectionsort(mobile a[],int n)  
 {  
 int i,j,k,passes=0,comp=0;  
 mobile temp;  
 for(i=0;i< 0 )  
 k=j;  
 }  
 temp=a[i];  
 a[i]=a[k];  
 a[k]=temp;  
 }  
 printf("\nPasses = %d\t Comparisons = %d",passes,comp);  
 }  

Output

1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit
Enter Your Choice:1

Enter No. of Users :3

enter data(name mobile No.(9 disgits max) Bill Amount ):
Shreya 989087256 2289
Shruti 976015736 1345
Shina 989076543 1100

1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit
Enter Your Choice:2

Shreya 989087256 2289.00
Shruti 976015736 1345.00
Shina 989076543 1100.00
1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit
Enter Your Choice:3

Passes = 2 Comparisons = 1
Shreya 989087256 2289.00
Shina 989076543 1100.00
Shruti 976015736 1345.00
1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit
Enter Your Choice:4

Passes = 2 Comparisons = 3
Shina 989076543 1100.00
Shreya 989087256 2289.00
Shruti 976015736 1345.00
1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit

Enter Your Choice:5

Please ensure that data is sorted using option no.3
enter Mobile number : 976015736

No. of comparisons = 2
found at location=3
Shruti 976015736 1345.00
1)create
2)print
3)Display the data in descending order of mobileno(insertion sort)
4)Display the data in ascending order of name(selection sort)
5)Display details for mobileno specified by user(binary search)
6)Quit
Enter Your Choice:6

Other Projects to Try:

  1. Bubble Sort Code in C Language
  2. Database Operations without pointers source code
  3. Quick sort using recursion
  4. Matrix Operations with Pointers
  5. Operations on matrices like addition, multiplication, saddle point, magic square ,inverse & transpose

Filed Under: Fundamentals of Datastructure Tagged With: Datastructure Assignments

Matrix Operations with Pointers

June 26, 2011 by ProjectsGeek Leave a Comment

Program for Matrix operations with pointers

 

1) Create() : for creating and reading m x n elements in the given matrix using pointers.
2) Create1() : for reading m x n elements in the given matrix without using pointers.
3) print() : diaplays the given matrix using pointers
4) Print1() : displays the given matrix without using pointers.
3) Transpose() : Creates transpose of the given square matrix using pointers.
4) addmat() : adds two matrices and returns the resultant matrix using pointers.
5) multmat() : multipiles two matrices without using pointers.
6) saddle() : checks whether the given matrix has a saddle point without using pointers.

 

 

;j++)>;j++)>;i++)>;i++)>

#include  
 #include  
 /* Protype of functions */  
 int** create(int m ,int n); // Returns a 2D matrix.  
 void create1(int a[][10],int m , int n);  
 void print(int **a,int m ,int n);  
 void print1(int a[][10], int m , int n);  
 void transpose(int **a,int m ,int n);  
 /* Transpose will be calculated if m is equal to n.  
 Transpose will be strored in the same matrix a */  
 int** addmat(int **a,int m1,int n1 ,int **b,int m2,int n2);  
 /* Two matrices a and b will be added and the result  
 will be returned.  
 Matrix a is of the size m1 x n1 and the matrix b  
 is of the size m2 x n2 */  
 void multmat(int a[][10],int m1,int n1 ,int b[][10],int m2,int n2,int c[][10]);  
 /* Two matrices a and b will be multiplied and the result  
 will be stored in c .  
 Matrix a is of the size m1 x n1 and the matrix b  
 is of the size m2 x n2 */  
 int saddle(int a[][10],int m,int n);  
 /*An m x n matrix is said to have a saddle point if some entry a[i][j] is  
 smallest value in row i and the largest value of column j */  
 void main()  
 { int **a,**b,**c,m1,n1,m2,n2,m3,n3;  
 int a1[10][10],b1[10][10],c1[10][10];  
 int opt;  
 clrscr();  
 do  
 { printf("\n1)Transpose of the Matrix:(transpose stored in the same matrix)");  
 printf("\n2)Add two matrices");  
 printf("\n3)Multiply two matrices");  
 printf("\n4)Saddle point in the matrix");  
 printf("\n5)Quit");  
 printf("\nEnter Your Choice : ");  
 scanf("%d",&opt);  
 switch(opt)  
 {  
 case 1: printf("\n Enter the size of the matrix :");  
 scanf("%d%d",&m1,&n1);  
 a=create(m1,n1);  
 if(m1==n1)  
 {  
 transpose(a,m1,n1);  
 printf("\nResult=\n");  
 print(a,m1,n1);  
 }  
 else  
 printf("\Not a square matrix :");  
 break;  
 case 2: printf("\n Enter the size of the 1st matrix :");  
 scanf("%d%d",&m1,&n1);  
 a=create(m1,n1);  
 printf("\n Enter the size of the 2nd matrix :");  
 scanf("%d%d",&m2,&n2);  
 b=create(m2,n2);  
 if(m1==m2 & n1==n2)  
 { c=addmat(a,m1,n1,b,m2,n2);  
 printf("\nResult=\n");  
 print(c,m1,n1);  
 }  
 else  
 printf("\n Can not be added ");  
 break;  
 case 3: printf("\n Enter the size of the 1st matrix :");  
 scanf("%d%d",&m1,&n1);  
 create1(a1,m1,n1);  
 printf("\n Enter the size of the 2nd matrix :");  
 scanf("%d%d",&m2,&n2);  
 create1(b1,m2,n2);  
 if(n1==m2)  
 { multmat(a1,m1,n1,b1,m2,n2,c1);  
 printf("\nResult=\n");  
 print1(c1,m1,n2);  
 }  
 else  
 printf("\n Can not multiply");  
 break;  
 case 4: printf("\n Enter the size of the 1st matrix :");  
 scanf("%d%d",&m1,&n1);  
 create1(a1,m1,n1);  
 saddle(a1,m1,n1);  
 break;  
 }  
 }while(opt!=5);  
 }  
 int ** create(int m ,int n)  
 { int i,j; int **a;  
 /*creating a matrix */  
 a=(int**)malloc(m*sizeof(int*));  
 for(i=0;i /*creating a matrix */  
 printf("\n Enter the data:");  
 for(i=0;i/* find saddle point row wise */  
 { small=a[i][0];  
 col_of_small=0;  
 for(j=1;j< small)  
 {  
 small=a[i][j];  
 col_of_small=j;  
 }  
 /* find the largest element in "col_of_small"*/  
 large= a[0][col_of_small];  
 row_of_large=0;  
 for(j=1;jlarge)  
 { large=a[j][col_of_small];  
 row_of_large=j;  
 }  
 if(i==row_of_large)  
 {  
 printf("\n Saddle point exist at (%d,%d) with value as %d",i,col_of_small  
 ,a[i][col_of_small]);  
 return(1);  
 }  
 }  
 printf("\nSaddle point does not exist ");  
 return(0);  
 }  

Output

1)Transpose of the Matrix:(transpose stored in the same matrix)
2)Add two matrices
3)Multiply two matrices
4)Saddle point in the matrix
5)Quit
Enter Your Choice : 1

Enter the size of the matrix :3 3

Enter the data:1 2 3
4 5 6
7 8 9

Result=

1 4 7
2 5 8
3 6 9
1)Transpose of the Matrix:(transpose stored in the same matrix)
2)Add two matrices
3)Multiply two matrices
4)Saddle point in the matrix
5)Quit

Enter Your Choice : 2

Enter the size of the 1st matrix :3 3

Enter the data:1 2 3
4 5 6
7 8 9

Enter the size of the 2nd matrix :3 3

Enter the data:9 8 7
6 5 4
3 2 1

Result=

10 10 10
10 10 10
10 10 10
1)Transpose of the Matrix:(transpose stored in the same matrix)
2)Add two matrices
3)Multiply two matrices
4)Saddle point in the matrix
5)Quit
Enter Your Choice : 3

Enter the size of the 1st matrix :2 2

Enter the data:6 8
3 5

Enter the size of the 2nd matrix :2 2

Enter the data:7 9
2 4

Result=

58 86
31 47
1)Transpose of the Matrix:(transpose stored in the same matrix)
2)Add two matrices
3)Multiply two matrices
4)Saddle point in the matrix
5)Quit
Enter Your Choice : 4

Enter the size of the 1st matrix :2 2

Enter the data:5 6
1 2

Saddle point exist at (0,0) with value as 5
1)Transpose of the Matrix:(transpose stored in the same matrix)
2)Add two matrices
3)Multiply two matrices
4)Saddle point in the matrix
5)Quit
Enter Your Choice : 5

Other Projects to Try:

  1. Operations on matrices like addition, multiplication, saddle point, magic square ,inverse & transpose
  2. Matrix Operations in C Language
  3. String Operations with Pointers
  4. Database Operations without pointers source code
  5. Matrix operations in c language

Filed Under: Datastructure and Files Tagged With: Datastructure Assignments

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 117
  • Page 118
  • Page 119
  • Page 120
  • Page 121
  • Interim pages omitted …
  • Page 135
  • Go to Next Page »

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy