Get Paid To Promote, Get Paid To Popup, Get Paid Display Banner
Showing posts with label material. Show all posts
Showing posts with label material. Show all posts

Sunday, February 27, 2011

recursive

void main(int n)
{
printf("%d ",n);
n++;
if(n>100)
exit(getch());
main(n);
}

STAARRAY

/*  Write a Program to perform the following operation stack using array. */
/* PUSH, POP, ISEMPTY, ISFULL, PEEP */
#define max 4
void push();
void pop();
int isempty();
int isfull();
void peep();
void disp();
int top=-1,stack[max];
void main()
{
int ret,s1,choice;
clrscr();
do
{
printf("\n\n1 : Push element in Stack.\n");
printf("2 : Pop an element from stack.\n");
printf("3 : Peep an element into stack.\n");
printf("4 : Exit from Program.\n");
printf("Enter your choice : ");
scanf("%d",&choice);

switch(choice)
{
case 1:
ret = isfull();
if(ret!=1)
push();
disp();
break;
case 2:
ret = isempty();
if(ret != 1)
pop();
disp();
break;
case 3:
ret = isempty();
if(ret != 1)
peep();
disp();
break;
case 4:
exit();
default :
printf("\n\n\t\t######## INVALID CHOICE ##########\n\n");
}

}while(s1);

}



int isfull()
{
if(top == max)
{
printf("\n\n\t\t####### STCK IS OVERFLOW #########\n\n");
return 1;
}
else
return 0;
}


int isempty()
{
if(top == -1)
{
printf("\n\n\t\t####### STCK IS UNDERFLOW #########\n\n");
return 1;
}
else
return 0;
}

void push()
{
int item;
printf("\nEnter an Integer value : ");
scanf("%d",&item);
top = top + 1;
stack[top] = item;
}

void pop()
{
int item;
item = stack[top];
top = top -1;
printf("\n\n\t\t%d is deleted\n",item);
}


void peep()
{
int item,p;
printf("\n\nEnter position : ");
scanf("%d",&p);
printf("\n\nYour selected Element is %d ",stack[top-p+1]);
}

void disp()
{
int i;
printf("\n\nStack Contains : ");
for(i=0;i<=top;i++)
printf("%d ",stack[i]);
}



postfix

/*   Write a Program for to evaluate postfix expression    */
char postfix[100];
static i,top;
long int stack[20];
void main()
{
int temp,p;
clrscr();
printf("Enter Postfix Expression : ");
scanf("%s",postfix);

for(i=0;postfix[i]!='\0';i++)
{

if(postfix[i]=='$' || postfix[i]=='^')
{
temp = stack[top-1];
p = stack[top-2];
while(temp>1)
{
stack[top-2] *=p;
temp--;
}
top--;
}
else if(postfix[i] == '+')
{
stack[top-2] += stack[top-1];
top--;
}
else if(postfix[i] == '-')
{
stack[top-2] -= stack[top-1];
top--;
}
else if(postfix[i] == '*')
{
stack[top-2] *= stack[top-1];
top--;
}
else if(postfix[i] == '/')
{
stack[top-2] /= stack[top-1];
top--;
}
else if(postfix[i]!=',')
{
stack[top] = postfix[i]-48;
while(postfix[i+1]!=',')
{
stack[top] *= 10 + postfix[i+1]-48;
i++;
}
top++;
}
}
printf("\nValue of Postfix Expression : %ld",stack[top-1]);
getch();
}






new | DS

#include
#include
#include
void main()
{
int n,i, *p,*q;
clrscr();

printf("Howmany number that u want to store : ");
scanf("%d",&n);
p = new int[n];
q=p;
printf("Enter %d Elements : \n",n);
for(i=0;i {
scanf("%d",p);
p++;
}

printf("An array will Contains : ");
for(i=0;i {
printf("%d ",*q);
q++;
}


getch();
}

Doubly

/*  Write a Program to create doubly linklist */

void first();
void last();
void disp();
void specific();
struct doubly
{
int info;
struct doubly *lptr,*rptr;
}*node,*l,*r,*p;

void main()
{
int item,choice,s1;
clrscr();
printf("Enter an item 99 for stop : ");
scanf("%d",&item);
node = (struct doubly *)malloc( sizeof(struct doubly));
l = r = p = node;
if(item == 99)
r = l = '\0';

while(item!=99)
{
node->info = item;

p->rptr = node; //This two line make left to right link
p = p->rptr;

node->lptr = r; //this three line make right to left link
// r->rptr = node;
r = node;

node->rptr = '\0';
node = (struct doubly *)malloc(sizeof(struct doubly));
scanf("%d",&item);
}

/* The above while loop will create doubly link list whose left node adress
is stored in l and right node address is stored in r */

l->lptr = '\0';
disp(); //Disp function is display left and right traversal.

do
{
printf("\n\n1 : Insert first.\n");
printf("2 : Insert Last.\n");
printf("3 : Insert Specific Position\n");
printf("4 : Exit from Program.\n");
printf("\nEnter Your Choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
first();
disp();
break;
case 2 :
last();
disp();
break;
case 3 :
specific();
disp();
break;
case 4 :
exit();
default:
printf("\n\n\t\t######## INVALID CHOICE #########\n\n");
}
printf("\n\nDo you want to continue? if yes, press 1 : ");
scanf("%d",&s1);
}while(s1==1);
}




void disp()
{

p = l;
printf("\nLeft Traversal : ");
while(p!='\0')
{
printf("%d ",p->info);
p = p->rptr;
}

p = r;
printf("\nRight Traversal : ");
while(p!='\0')
{
printf("%d ",p->info);
p = p->lptr;
}

}

void first()
{
int item;
printf("Enter an integer value : ");
scanf("%d",&item);
node = (struct doubly *)malloc( sizeof(struct doubly));
node->lptr = '\0';
node->info = item;


node->rptr = l;
l->lptr = node;
l=node;
if(r == '\0')
r = l;

}
void last()
{
int item;
printf("Enter an integer value : ");
scanf("%d",&item);
node = (struct doubly *)malloc( sizeof(struct doubly));
node->rptr = '\0';
node->info = item;

node->lptr = r;
r->rptr = node;
r=node;
if(l=='\0')
l = r;


}


void specific()
{
int item,z,n=2;
printf("Enter an integer value : ");
scanf("%d",&item);
printf("Enter Position : ");
scanf("%d",&z);
node = (struct doubly *)malloc( sizeof(struct doubly));
node->info = item;
p = l;

if(z==1)
{
node->lptr = '\0';
node->rptr = l;
l->lptr = node;
l=node;
if(r=='\0')
r = l;
}
else
{
while(z>n)
{
p = p->rptr;
if(p == '\0')
{
printf("\n\n\t\tPosition is Not Found\n");
return;
}
z--;
}
if(p->rptr=='\0')
{
node->rptr = '\0';
p->rptr = node;
node->lptr = p;
p = node;
r = p;
}

else
{
p->rptr->lptr = node;
node->rptr = p->rptr;
p->rptr = node;
node->lptr = p;
}
}
}

Bisection method

/* Write a Program to solve equation using Bisection Method */
#include
float bisection(float,float,float);
void main()
{
float xl,xu,ea,fxr;
clrscr();
printf("Enter Lower Bound : ");
scanf("%f",&xl);
printf("Enter Upper Bound : ");
scanf("%f",&xu);
printf("Enter Percentage Error : ");
scanf("%f",&ea);
fxr = bisection(xl,xu,ea);
printf("F(xr) : %.2f",fxr);
getch();
}

float bisection(float xl,float xu,float ea)
{
float xr,fxr,tmp;
do
{
xr = (xl + xu) / 2;
fxr = ((xr*xr*xr) -9 * xr + 1);

if(fxr*xu < 0)
xu = xr;
else if(fxr*xu>0)
xl = xr;
else
xr = 0;

if(fxr<0)
tmp = fxr * -1;
}while(tmp>ea);
return xr;
}

mca Sem 2

GUJARAT TECHNOLOGICAL UNIVERSITY
MASTER OF COMPUTER APPLICATION
Proposed Subjects and Teaching SchemeSemester-II
SubjectCode
Subject
620001Data Structures (DS)
620002Programming Skills – II (DS)
620003Object Oriented Concepts & Programming (OOCP)
620004Programming Skills – III (OOCP)
620005Computer Oriented Numerical Methods
620006Database Management Systems – II
620007Theory of Computation
620008620008 - Communication Skills (CS)

Cool exam papers collection...

Syllabuss E-books Collection Free Download

Monday, November 22, 2010

630005 - System Software (SS)

630005 - System Software (SS)


Question Answer Of SS ((Download))
Shared By:Keval Nagaria(JVIMS MCA Jamnagar)


Full SS by Keval.ppt ((Download))
Shared By:Keval Nagaria(JVIMS MCA Jamnagar)


Important Questions of SS ((Download))
Shared By:Dipali Patel(B.H.GARDI - Rajkot)

630003 - Statistical Methods (SM)

630003 - Statistical Methods (SM)





Statistical Methods.pdf ((Download))
Shared By:Hiren Vyas

Introduction to probability theory by peter lucas.pdf ((Download))
Shared By:Dipali Patel(B.H.GARDI - Rajkot)



Share Your Material On This Site!! Just Send it to soriyaprashant@yahoo.com with your Name - College name..NOTE::All Material On this site is only for Guidance purpose ..So check yourself first...

Saturday, September 4, 2010

610007-Enterprise Resources & Financial Management

Er-Diagram
Shared By : Kinjal Dave (KSMCS-kapadavanj)

erdiagram_final
Shared By : Kinjal Dave (KSMCS-kapadavanj)

ERP by Alexis Leon
Shared By : Kinjal Dave (KSMCS-kapadavanj)

Account complete theory material.
Shared By : Kinjal Dave (KSMCS-kapadavanj)

610003-Discrete Mathematics for Computer Scienece

Discrete_Mathematics.pdf
Shared By : Vyas Hiren


Full DM by keval.ppt
Shared By : Nagaria Keval (JVIMS MCA Jamnagar )

610005-Database Management Systems – I

sql - plsql.pdf

Shared By:Prashant Patel

dbms-I.zip
Shared By:Prashant Patel


Full PL_SQL By Keval.rar
Shared By:Prashant Patel

unit 1 DBMS

Shared By : Prashant Patel


ch1 from korth 5th edition
Shared By : Prashant Patel


ch6 from korth 5th edition
Shared By : Prashant Patel


chapter1 DBMS nice 1
Shared By : Prashant


Oracle.pdf
Shared By : Prashant
610002-Programming Skills - 1(FOP)

C ASSIGNMENT COMPLETE SOLUTION .
complete set of c.pdf
Shared By:Vyas Hiren

Full 'C' By Keval.ppt
Shared By:Keval Nagaria(JVIMS MCA Jamnagar)


Ch1 in C

Shared By : Kinjal Dave (KSMCS-kapadavanj)

functions in C

Shared By : Kinjal Dave (KSMCS-kapadavanj)

Pointers in C
Shared By : Kinjal Dave (KSMCS-kapadavanj)

Ch 2 in C
Shared By : Kinjal Dave (KSMCS-kapadavanj)