Wednesday, July 22, 2009

Data Structure

what is the difference between "SET" and "Array List" ?.
1)Why the Tree is called Non-liner Data Structure?.
2)what kind oftree traversel gives Sorting order ?.
3)what data structre you will use to store your name ?.
4)while writing algorthim what key factors need be consider ?.
5)why the "bubble sort" named "bubble sort" ?.
6)what is compleate binary tree ?.
7)what data structre you will use for construct dictionary ?.
8)what are the methods to store string?.
9)what is the difference between quque and circular quque?.
10)for near sorted array what kind of sorting algorthim will be best ?.
11)while doing liner search what the main factor need to be consider?.
12)when ever recursion call happen means what datastructre will form ?.
13)whatis hash table ?.
14)what is symbol table ?.
15)what is back tracking ?.
16)Write algorthim to reverse the signlely Link list?.
17)What is the difference between Link List and Array List ?.
18)what are Advantages of AVL trees?.
19)what is the use of B+?.
20)Implement queue using two stacks ?.

Thursday, July 16, 2009

Interesting C-Questions

1)find out structure size of with out using sizeof operator ?.
2) find the given number even or odd with out using % and - and < operator
3)implement queue with using two stacks ?.
4)what is memory leak?
5)int main(){int far *p,p1;printf("%d %d",sizeof(p),sizeof(p1);}
what will be output of the program
int main()
{
int a[12]={1};
printf("%d",a[2]);
}
6)what will be out of the program
int main()
{
char *p="havenicelife";
int i;
i=functionscalls(p);
printd("%d",i);
}
int functionscalls(char *s)
{
return(*s?1+functionscalls(++s):0);
}
7)what will be out of the program
int i;
int main()
{
prints("%d",i);
pp();
prints("%d",i);
gg();
prints("%d",i);
}
void pp()
{
int i;i =i+1;
}
void gg()
{
i=i+5;
}
8)what will be out of the program
int i;
int main()
{
printdf("%d",i);
pp();
printdf("%d",i);
pp();
printdf("%d",i);
gg();
printdf("%d",i);
}
void pp()
{
static int i;
i =i+1;
printf("%d",i);
}
void gg()
{
i=i+5;
}
9)int main()
{
int i;i=30;
switch(i)
{
case 3:
case 30:
printf("Test");
case 30:
printf("Test");
}
}
what will be output of the program
10)how many arguments passing through main functions ?. what are the arguments?.
11) where automatic and static and external variables are stored.?
what is the default values for that ?.
13)why we need different type of storeage classs?
14)what will be out of the program.
a)what is environment variable ?.
b)int main(int k,char s[],char ev[])
{
int i=0;for(i=0;ev[i];i++)
printf("%s",ev[i]);
}
15)int main()
{
const int i=10;
i=i+10;
}
its give error.so how to modify constant value
16)
what will be the output of the program.
int main()
{
if(-30);
printf("have good life");
if(0);
printf("have greatlife");
if(3)
printf("have good life");
if(-20)
printf("have greatlife");
printf("have greatlife");
if(-0)
printf("have greatlife");
}
17)what is static binding and dynamic binding ?.what is the difference with that ?.
18) write a program for the following cases there is doubly link list nodes
datas are 1 2 3 4 5 6 7 8 9 10
ouput wants 10 8 6 4 2
your able travel only one time only.
19) You having one array having data 0-9 only
int a[10]={1,3,4,1,3,2,5,6,4,4};
you have tell each element how many times apperared.
say now 1 comes -2 times
2 comes- 1 time
3 comes -2 times
4 comes -3 times
5 comes -1 time
6 comes - 1 time
20) nice program exam result. here exam result ready.they decided to give 5 mark bounds for you so you the got result like
sub1-45
sub2-49
sub3-49
sub4-48
sub5-47
sub6-49
so you add 5 bouns mark try make pass maximum number of subjects ?.
best case for this
sub2 adding one mark gets 50 - 1 mark
sub3 adding one mark gets 50 -1 mark
sub6 adding one mark gets 50 -1 mark
then
sub4 adding one mark gets 50 -2 mark
you can make pass 4 subjects suppose
if your add sub1 5 makes means only one subject will be cleared,
so think and implement the best exam result.
21) What is the use Virtual Table in C++ ?.
Wish all the best
if u have any questions mail me
njperiasamy@gmail.com