Archive for data strcuture programs in c language
You are browsing the archives of data strcuture programs in c language.
You are browsing the archives of data strcuture programs in c language.
21. What is the full form of CMM
(a) Capability Maturity Model
(b) Cost Maintainance Model
(c) Capability maintainance model
(d) Cost Maturity Model
Ans:A
22. Sorting is not possible by using which of the following methods?
(a) Insertion
(b) Selection
(c) Exchange
(d) Deletion
Ans:D
23. What are the methods available in storing sequential files ?
(a) Straight merging,
(b) Natural merging,
(c) Polyphase sort
(d) all
Ans:D
24. Conditional results [...]
Data Structure - Exam Oriented Material
Must Read Before Examination
1. What is data structure?
A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of [...]
/*Insertion and Deletion*/
#include<stdio.h>
#include<conio.h>
struct stack
{
int no;
struct stack *next;
}
*start=NULL;
typedef struct stack st;
void push();
int pop();
void display();
void main()
{
char ch;
int choice,item;
do
{
clrscr();
printf("\n 1: push");
printf("\n 2: pop");
printf("\n 3: display");
printf("\n Enter your choice");
scanf("%d",&choice);
switch (choice)
{
case 1: push();
break;
case 2: item=pop();
printf("The delete element in %d",item);
break;
case 3: display();
break;
default : printf("\n Wrong choice");
};
printf("\n do you want to continue(Y/N)");
fflush(stdin);
scanf("%c",&ch);
}
while (ch==’Y'||ch==’y');
}
void push()
{
st *node;
node=(st *)malloc(sizeof(st));
printf("\n Enter the number to be insert");
scanf("%d",&node->no);
node->next=start;
start=node;
}
int [...]