...::: Recent Updates :::...

Monday, April 25, 2011

BST WITHOUT recursion

/*Binary search tree creation without recursion
LICENCE:-GNU/GPL :)
Authore:-Maulin Desai :)*/
#include

#include

struct maulin

{

int n;

struct maulin *left;

struct maulin *right;

};

int main()

{

void create(struct maulin **,int );

void preorder_disp(struct maulin *);

void postorder_disp(struct maulin *);

void inorder_disp(struct maulin *);

//void dele(struct maulin **,struct maulin **);

//void search(struct maulin **,struct maulin **,int no);
int no;
int ch;
char dec='y';

struct maulin *root=(struct maulin *)malloc(sizeof(struct maulin));

struct maulin *f=(struct maulin *)malloc(sizeof(struct maulin));
f=NULL;

root->n=0;
do

{

printf("\n1)create\n2)preorder Disp\n3)exit\n4)Postorder disp\n5)inorder display\n6)delete");

scanf("%d",&ch);

switch(ch)

{

case 1:

printf("\nEnter Number to insert in tree:-\t");

scanf("%d",&no);

create(&root,no);

break;

case 2:

preorder_disp(root);

break;

case 4:

postorder_disp(root);

break;

case 5:

inorder_disp(root);

break;

/*case 6:

dele(&root,&f);

break;*/

case 3:

exit(0);

}

printf("\nDo you want to continue:-\t");

scanf("%s",&dec);

}while(dec=='y'||dec=='Y');

return 0;

}

void inorder_disp(struct maulin *d)

{

if(d!=NULL)

{

inorder_disp(d->left);

printf("\n%d",d->n);

inorder_disp(d->right);

}

}

void postorder_disp(struct maulin *g)

{

if(g!=NULL)

{

postorder_disp(g->left);

postorder_disp(g->right);

printf("\n%d",g->n);

}

}

void preorder_disp(struct maulin *h)

{

// printf("\n\n\n\n The value of root node is:-\t%d",h->n);

if(h!=NULL)

{

printf("\n\t%d",h->n);

//printf("\nTraversing from Left sight:-:(");

preorder_disp(h->left);

//printf("\nNow Traversing From Right sight:0:-\t%d",h->right);

preorder_disp(h->right);

}



}

void create(struct maulin **h,int no)

{

int flag=0;

struct maulin *temp=(struct maulin *)malloc(sizeof(struct maulin));

struct maulin *new_node=(struct maulin *)malloc(sizeof(struct maulin));

//new_node=NULL;

//temp=NULL;

printf("\n value of head node:-\t%d",(*h));

if((*h)->n==0)

{

printf("\nRoot Node created:-\t");

(*h)->n=no;

(*h)->left=NULL;

(*h)->right=NULL;

return;

}

else if((*h)->n
{

temp=(*h);

printf("\nTraversing from right in subtree");

b:

while(temp->right!=0)

{

if(temp->n
{

flag=0;

temp=temp->right;

}

if(temp->n>no)

{

printf("\nMaulin :-\t%d %d",temp->n,no);

flag=1;

break;

}

}

if(flag==0)

{

printf("\n\n\t\t\t\t\t\t\t node inserted at right sight dude:-%d\t\t\t\n",no);

new_node->left=NULL;

new_node->n=no;

new_node->right=NULL;

temp->right=new_node;

// temp->left=NULL;

temp=(*h);

return;

}

else

{

printf("\nJump down word");

goto a;

}

}

else if((*h)->n>no)

{

a:

printf("\nTraversing from Left in subtree:-\t");

temp=(*h);

while(temp->left!=NULL)

{

if(temp->n>no)

{

temp=temp->left;

}

else if(temp->n
{

printf("\nGoto up like mario game:-\t");

goto b;

}

}

printf("\n\n\n\t\t\t\t\t\t\tInserting node at left sightv in tree:-%d\t\t\t\t\n",no);

new_node->left=NULL;

new_node->n=no;

new_node->right=NULL;

temp->left=new_node;

//temp->right=NULL;

}

else

{

printf("\nNo condition satisfy:-\t");

}

}

Friday, April 22, 2011

Data Structure Using C


Note : Due To Some Security Reasons all The Files Are Kept Password Protected So Those Who Want To Download These Files Just Comment (Reply) Ur Email Address With Ur Name and College Name. Ill Be Sending You Password In Mail ASAP!

...:::  Correct Expected Solution For D.S Question Set :::...


----------------------------
RAJ SOLUTION'S
www.rajsolution.com
www.sahinraj.blogspot.com

www.licamca.blogspot.com

Tuesday, April 12, 2011

MCA TIME TABLE 2011-2012

----------------------------------------------------------------------------------
MCA TIME TABLE 2011-2012
----------------------------------------------------------------------------------


SEM I Remedial

SEM II Regular / Remedial

SEM III Remedial

SEM IV Regular


----------------------------------------------------------------------------------
RAJ SOLUTION'S
www.rajsolution.com
www.sahinraj.blogspot.com
----------------------------------------------------------------------------------

Saturday, April 9, 2011

Communication Skills (CS) (620008)

GUJARAT TECHNOLOGICAL UNIVERSITY
Master of Computer Application
Semester: II
Subject Name : Communication Skills (CS)
Subject Code : 620008
----------------------------------------------------------------------


Note : Due To Some Security Reasons all The Files Are Kept Password Protected So Those Who Want To Download These Files Just Comment (Reply) Ur Email Address With Ur Name and College Name. Ill Be Sending You Password In Mail ASAP!


----------------------------
RAJ SOLUTION'S
www.rajsolution.com
www.sahinraj.blogspot.com

Thursday, April 7, 2011

Maths Complete Material CONM


Note : Due To Some Security Reasons all The Files Are Kept Password Protected So Those Who Want To Download These Files Just Comment (Reply) Ur Email Address With Ur Name and College Name. Ill Be Sending You Password In Mail ASAP!



 ..:: Complete Material of CONM all PPT ::..
----------------------------
RAJ SOLUTION'S
www.rajsolution.com
www.sahinraj.blogspot.com

Wednesday, April 6, 2011

MCQ With Answers Chapter I: Principles of Object-Oriented Programming

1. Which of the following languages is not a procedure-oriented programming language?

a) ALGOL

b) COBOL

c) FORTRAN

d) None of the above

2. Which of the following programming approach used functions as a key concept to perform action-oriented tasks?

a) Structured programming

b) Modular programming

c) Procedure-oriented programming

d) Object-oriented programming

3. Identify the drawback of using procedure-oriented programming, if any:
a) Data is hidden from external functions

b) New functions can be added whenever necessary

c) Does not reflect real world problems

d) All of the above

4. Which is not associated with Object-oriented programming?

a) Data abstraction

b) Automatic initialization

c) Dynamic binding

d) None

5. The term operator overloading in C++ refers to:
a) Inheritance

b) Message passing

c) Polymorphism

d) None

6. Which one of the following OOP concepts enables reusability of components?

a) Inheritance

b) Encapsulation

c) Polymorphism

d) All of the above

7. The concept of hierarchical classification is related to:

a) Abstraction

b) Inheritance

c) Function overloading

d) None

8. Object-based programming languages do not support:

i. Inheritance

ii. Dynamic binding

iii. Encapsulation

iv. All of the above

a) Both i and ii

b) iii only

c) iv only

d) i, ii, and iii

9. C++ does not support

i. Genericity

ii. Early binding

iii. Garbage collection

iv. Multiple Inheritance

a) i only

b) ii only

c) iii only

d) ii, iii and iv

10. Which of the following is an Object-oriented programming language?

i. Smalltalk

ii. Object Pascal

iii. Java

iv. All of the above

a) Both ii and iii

b) i only

c) iii only

d) iv only

--------------------------------------------------------------------------------

Answers

--------------------------------------------------------------------------------

1. d) None of the above
2. c) Procedure-oriented programming
3. c) Does not reflect real world problems
4. d) None
5. c) Polymorphism
6. a) Inheritance
7. b) Inheritance
8. a) Both i and ii
9. a) i only
10. d) iv only


----------------------------
RAJ SOLUTION'S
www.rajsolution.com
www.sahinraj.blogspot.com

Tuesday, April 5, 2011

pqueue_linklist_Manjoor_sir method

Hello this program particular priority wise linklist created and if same priority found than another node is created behind that particular node

/*
Thanx Manjoor sir to give awsome idea and please any error or new thing please reply as soon as possible
authore Maulin Desai
Licence Agreement:- GNU/GPL :) :)
*/
#include

#include

#include
struct maulin

{

int no;

int prt;

struct maulin *itself;

struct maulin *next;

};

int flag=0;

int main()

{

char dec='y';

int ch;

struct maulin *head;

void add(struct maulin **);

void display(struct maulin **);
void del(struct maulin **);

head = (struct maulin *)malloc(sizeof(struct maulin));

head=NULL;

do

{

printf("\n1)ADD\n2)DISPLAY\n3)Delete\n4)exit\nEnter Your Choice:-\t");

scanf("%d",&ch);

switch(ch)

{

case 1:

add(&head);
break;
case 2:
display(&head);
break;
case 3:
del(&head);
break;
case 4:
exit(0);
default:
printf("\nEnter proper choice:-\t");

}
printf("\nDo You want to continue:-\t");
scanf("%s",&dec);
}while(dec=='y'||dec=='Y');

return 0;
}
void del(struct maulin **h)
{
int no;
struct maulin *t;
struct maulin *k1 =(struct maulin *)malloc(sizeof(struct maulin));
struct maulin *k =(struct maulin *)malloc(sizeof(struct maulin));
t=(*h);
printf("Enter Which priority no you want to delete:-\t");
scanf("%d",&no);
if((*h)==NULL)
{
printf("\nlink list is Empty");
return;
}
while(t!=NULL)
{
if((*h)->prt==no)
{
printf("\nHead Node:-\t");
k1=(*h);
(*h)=(*h)->next;
free(k1);
return;
}
if((t->next)->prt==no)
{
if((t->next)->next==NULL)
{
printf("\n Last Node");
k1=(t->next);
t->next=NULL;
printf("\tDeleted node is:-\t%d",k1->no);
free(k1);
return;
}
else
{
printf("\nNot a Head Node\n");
k=t->next;
t->next=(t->next)->next;
free(k);
return;
}
}
t=t->next;
}
}

void add(struct maulin **h)

{

int cnt=0;
struct maulin *t1=(struct maulin *)malloc(sizeof(struct maulin));

struct maulin *t2;

//t2=(*h);

printf("\nEnter priority no:-\t");

scanf("%d",&t1->prt);

printf("\nEnter Number:-\t");

scanf("%d",&t1->no);

t1->itself=NULL;

t1->next=NULL;



if((*h)==NULL)

{

printf("\nAssigning node as head");
(*h)=t1;

}

else

{

t2=(*h);

while(t2!=NULL)

{

if(t2->prt==t1->prt)

{

flag=0;

if(t2->itself==NULL)

{

printf("\n There is no other node below this priority:-");
t2->itself=t1;

return;

}

while(t2->itself!=NULL)

{

//t2->itself=t1;
t2=t2->itself;
printf("\n going to the last node:-\t%d",t2->no);

}

t2->itself=t1;

t1->next=NULL;

return;

}

else

{

if(t2->next==NULL)

{

printf("\nset flag at one:-\t");
flag=1;

}

else

{

flag=0;
printf("\nget to the next priority node:-\t");
t2=t2->next;
}

}

if(flag==1)

{

printf("\nno priority found thats why add priortiy at last:-\t");
t1->itself=NULL;

t1->next=NULL;

t2->next=t1;

return;

}


}

}

}

void display(struct maulin **head)

{

struct maulin *t,*t1;

//printf("\n%d",(*head)->no);

t=(*head);
t1=(*head);

while(t1!=NULL)

{

t=t1;

//printf("\nouter loop");

while(t!=NULL)

{

printf("\n%d %d",t->no,t->prt);

t=t->itself;

}

//printf("\nExit from inner loop");

t1=t1->next;

}

}

Monday, April 4, 2011

OOCP Practical Exam

SET I
There are two classes Customer and Customer_details. Customer is defined in the Sales
department containing details about customer id and details about his/her payment.
Customer_details is a Marketing department class containing only net-salary details and
full personal details like gender, name of spouse, number of children, etc. Add code in
the Customer class such that, conversion from one type of customer object into another is
possible. While converting, items which are not there in the source class (like No. of
children when source class is Customer_details), it should take a default value.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET II
 A file contains names of countries and their imaginary population (in Millions). Country
names and population are separated by white spaces. Write a program which will include
a menu driven functionality for the above file
(a) Display 2 column output with country names left justified and population
right justified.
Country Population
Japan 789125
Egypt 456789
Indonesia 213148
(b) Determine the population for a given country name.
(c) Determine the country name(s) if the population is given.
(d) Update the population.
(e) Calculate total population for all the countries.

Previous Year - Mid Term Paper

LAXMI VIDYAPEETH’s
LAXMI INSTITUTE OF COMPUTER APPLICATIONS, SARIGAM (MCA)
MIDTERM EXAMINATION (SEM-II)
620003: Object Oriented Concepts & Programming (OOCP)
DATE:
MAX. MARKS : 40 TIME: 2 HRS.
Q.1 Give a short answer 08
1. Void Pointer
2. Explain endl and setw with example.
3. Constant Pointer
4. Define Free-Store Operator & Explain use of it.
5. Explain Access Modifier
6. Identifier, Token & Keyword
7. Call by Reference & Call by Value
8. What is LIM give example
Q.2.A Give answer of the following question 04
1. What is Function Overloading? Explain with example
2. Explain All Types of Construction with example
Q.2.B Give answer of the following question 04
1. List out all rules on Operator Overloading.
2. Difference between POP & OOP
OR
Q.2.B Give answer of the following question 04
1. Difference between OBP & OOP
2. Short Note on Classes & Objects
Q.3 Give detail answer of the following questions (any two) 08
1. Features of Object Oriented Programming Language
2. Short Note on Friend Class & Functions
OR
Q.3 Give detail answer of the following questions (any two) 08
1. What is Operator Overloading? Give example (Unary, Binary)
2. What is Scope Resolution Operator? Where we can use it.
Q.4 Give detail answer of the following questions (any two) 08
1. User define Type Conversion list all the types of conversions.
2. What is Access Declaration?
OR
Q.4 Give detail answer of the following questions (any two) 08
1. What is Inheritance & Explain all the types with example
2. Short Note on Dynamic Initializations
Q.5 Give a code of program: (Full Code) 08
1. WAP to calculate the value of m raised to power n for both int and double data
Types (Use Function Overloading Concept)
2. WAP to perform the following functions on string (using operator overloading)
1. >>,<< (for input / output)
2. = = (Compare two string)
3. – (Reverse a String)
4. + (Concatenations)
* Menu Driven
ALL THE BEST

Short Question list



Laxmi Institute of Computer Applications, Sarigam (MCA)



Q1. Short Question / Define / Definition Marks (01/02)
1
What is Class?
2
Define Object
3
Define OOP
4
Define OBP
5
What is member function?
6
List all the features of OOP
7
Give difference between OOP & OBP
8
Identifier, token, keywords
9
Data Types (built in/ User define/ derived)
10
Explain Void Pointer
11
Constant Pointer
12
Pointer to Constant
13
Define Reference Variable & its properties
14
Dynamic Initialization
15
Adv. of New over Malloc().
16
Define Free Store Operator & explain the use of it.
17
Define Constant Objects
18
Local Class With example
19
Nested Class
20
Access Specifier (Private Data Member / Public Data Member)
21
Static Data Member
22
Static Function
23
*this Pointer
24
Access Modifier (Const & Volatile)
25
Function Prototype
26
Call by Reference
27
Const Function
28
Default argument
29
Friend function
30
Function Overloading
31
Inline Functions
32
Mutable data member
33
Static Function
34
NRV Optimization
35
Constructor
36
Copy Constructor
36
Parameterized Constructor
37
MIL
38
Dynamic Initialization
39
Explicit Constructor
40
Destructor
41
Default Constructor / Default Constructor provided by Complier
42
List all the operator which cant Overload as friend function
43
List all operator cant Overload
44
How we can Overload an object.
45
Explain Unary Operator / Binary Operator


Sunday, April 3, 2011

string word replace

/*hii This is my logic some of my friend says its to big prog but its easy and please give reply and give some other logic please reply it
Maulin Desai
GNU/GPL :) :) :) */
#include
#include
void main()
{
char s[80],w[80],w1[80];
int i,start,cnt=0,j,k,k1,flag=1,t=0,m,temp,j1,l;
printf("\nEnter string:-\t");
gets(s);
printf("\nEnter Word:-\t");
gets(w);
printf("\nEnter replace word:-\t");
gets(w1);
for(l=0;s[l]!='\0';l++);
for(k=0;w[k]!='\0';k++);
for(k1=0;w1[k1]!='\0';k1++);
for(i=0;s[i]!='\0';i++)
{
if(s[i]!=' ' && s[i+1]!='\0')
{
cnt++;
}
else
{
if(s[i+1]=='\0')
{
cnt++;
i++;
}
temp=cnt;
start=i-cnt;//get the starting pos of particular word
cnt=0;
if(temp!=k)
{
flag=0;
continue;
}
for(j=start;j<=i-1;j++)
{
for(t=0;t {
if(s[j]!=w[t])
{
flag=0;
break;
}
else
{
flag=1;
j++;
}
}
if(flag==1)
{
if(k1!=k)
{
for(t=k;t {
for(m=l;m>=i;m--)
{
s[m+1]=s[m];
}
l++;
}
// printf("\nhello:\t%d",strlen(s));
// puts(s);
t=0;
for(j1=start;j1<=i;j1++)
{
for(;t {
s[j1]=w1[t];
j1++;
}
if(j1 {
s[j1]=' ';
t=k1;
}
}
}
else
{
for(j=start;j {
for(t=0;t {
s[j]=w1[t];
j++;
}
}
}
}
if(flag==1)
break;
}
}
}
printf("\n\n\n\n\t\t\t\tReplace String is Shown Below\n\n\n\n\n\t\t\t\t");
puts(s);
}