Writa a C program to implement singly linked list:insert,delete,search and display.

PROGRAMĀ    #include<stdio.h>4 #include<conio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct node *start=NULL; int menu() { int choice; clrscr(); printf("\n 1.create a list"); printf("\n———————-"); printf("\n 2.Insert a node at beginning"); printf("\n 3.Insert a node at end"); printf("\n 4.Insert a node at middle"); printf("\n———————-"); printf("\n 5.Delete a node from beginning"); printf("\n 6.Delete … Read moreWrita a C program to implement singly linked list:insert,delete,search and display.

Write a Java Program to implement multilevel inheritance by applying various access controls to its data members and methods.

  class Length { int l; void setl(int a) { l=a; } void putl( ) { System.out.println("Length="+l); } } class Breadth extends Length { int b; void setb(int y) { b=y; } void putb( ) { System.out.println("Breadth="+b); } } class Height extends Breadth { int h; void seth(int z) { h=z; } void puth( ) … Read moreWrite a Java Program to implement multilevel inheritance by applying various access controls to its data members and methods.

C Program to process student structure containing roll number, class and age as members .The program must read 5 student record in an array of structure and display the details of student who is eldest use a function to find the eldest for which array of structure is an argument

  /*WAP to process student structure containing roll number, class and age as members .The program must read 5 student record in an array of structure and display the details of student who is eldest use a function to find the eldest for which array of structure is an argument*/ #include<stdio.h> struct student { int … Read moreC Program to process student structure containing roll number, class and age as members .The program must read 5 student record in an array of structure and display the details of student who is eldest use a function to find the eldest for which array of structure is an argument

C Program to create a structure with employee details and display the same

  /*wAP to create a structure with employee details and display the same*/ #include<stdio.h> void main() { struct employee { int empno; char empname[20]; char design[20]; float salary; }; struct employee e1; clrscr(); printf("Input Employee Number\n"); scanf("%d",&e1.empno); printf("Input Employee Name\n"); scanf("%s",&e1.empname); printf("Input Employee Designation\n"); scanf("%s",&e1.design); printf("Input employee salary\n"); scanf("%f",&e1.salary); printf("The employee details are\n"); printf("Employee number=%d\n",e1.empno); … Read moreC Program to create a structure with employee details and display the same

C Program to find Addition of two matrix

  12 /*WAP to find Addition of two matrix*/ #include<stdio.h> main() { int a[5][5],b[5][5],s[5][5],i,j,r,c,m,n; clrscr(); printf("Enter the size of first matrix-\n"); scanf("%d%d",&r,&c); printf("Enter the size of second matrix-\n"); scanf("%d%d",&m,&n); if(r==m&&c==n) { printf("Enter the value of first matrix:-\n"); for(i=0;i<r;i++) for(j=0;j<c;j++) scanf("%d",&a[i][j]); printf("Enter the value for second matrix-\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&b[i][j]); /*Addition of two matrix*/ for(i=0;i<r;i++) for(j=0;j<c;j++) … Read moreC Program to find Addition of two matrix

C Program to find transpose of a matrix

  /*WAP to find transpose of a matrix*/ #include<stdio.h> void main() { int a[5][5],b[5][5],i,j,m,n; clrscr(); printf("Enter the Order of matrix-\n"); scanf("%d%d",&m,&n); printf("Input the elements of the matrix-\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); /*Logic of transpose*/ for(i=0;i<n;i++) for(j=0;j<m;j++) b[i][j]=a[j][i]; printf("Transpose of matrix is-\n"); for(i=0;i<n;i++) { for(j=0;j<m ;j++) printf("%4d",b[i][j]); printf("\n"); } getch(); }     Output Enter the Order … Read moreC Program to find transpose of a matrix

C Program to search for a given number in an array

Program /*WAP to search for a given number in an array*/ #include<stdio.h> #include<stdlib.h> void main() { int a[20],i,n,s; clrscr(); printf(“Input the size of an array-\n”); scanf(“%d”,&n); printf(“Enter %d elements-\n”,n); for(i=0;i<n;i++) scanf(“%d”,&a[i]); printf(“Input the number to search-\n”); scanf(“%d”,&s); for(i=0;i<n;i++) if(a[i]==s) { printf(“Number %d found at %d position\n”,s,i+1); exit(0); } printf(“Number %d is not found\n”,s); }   … Read moreC Program to search for a given number in an array

C Program to find the GCD of the 2 numbers using functions

Program /*WAP to find the GCD of the 2 numbers using functions*/ #include<stdio.h> void main() { int gcd(int,int); int m,n; clrscr(); printf(“Input 2 Numbers-\n”); scanf(“%d%d”,&m,&n); printf(“GCD of %d and %d is %d”,m,n,gcd(m,n)); getch(); } int gcd(int x, int y) { while(x!=y) { if(x>y) x=x-y; else if(y>x) y=y-x; } return(x); }   Output   Input 2 … Read moreC Program to find the GCD of the 2 numbers using functions

C Progam to find factorial of a number using function

Program:   /*WAP to find factorial of a number using function*/ #include&lt;math.h&gt; #include&lt;stdio.h&gt; main() { int factorial,n; clrscr(); printf(&quot;Enter the number\n&quot;); scanf(&quot;%d&quot;,&amp;n); factorial=fact(n); printf(&quot;Factorial of a given number=%d&quot;,factorial); getch(); } int fact(int a) { int i,f=1; for(i=1;i&lt;=a;i++) f=f*i; return(f); }   OutPut: Enter the number 6 Factorial of a given number=720   Download ProgramĀ