Gaurav Sharma             
About Me : I am DBA in Kapasa Softwares for last one year.
Member Since :
26-Aug-2010
Articles Posted :
2
Answers Given :
11
Questions Asked :
4
no The method setLabel can be used with what type of Object?

1) Double-Field
2) int
3) Text-Field
4) String
A DoubleField
no What is Overflow and Underflow  in data Structure ?
A When a new item is to be inserted into stack, array or linked list but there is no available address space this situation is called overflow.

When we want to delete the item from stack, array and linked list but stuck, array and links list are empty this situation is known as underflow.
no what is protocol class in the c++ ?
A An abstract class is a protocol class if:
It neither contains nor inherits from classes that contain member data, non-virtual functions,

or private (or protected) members of any kind.

It has a non-inline virtual destructor defined with an empty implementation,

All member functions other than the destructor including inherited functions, are declared

pure virtual functions and left undefined.
no Of the following tree structure, which is most efficient considering space and time complexities?

(A) Incomplete Binary Tree

(B) Complete Binary Tree

(C) Full Binary Tree

(D) Complete Bina....
A By the method of elimination:

Full binary tree loses its nature when operations of insertions and deletions are done.

For incomplete binary trees, extra storage is required and overhead of NULL node checking takes place. So complete binary tree is the better one since the property of complete binary tree is maintained even after operations like additions and deletions are done on it.
no Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
A No.

Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it
doesn’t mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.
no main()

{

char s[ ]="man";

int i;

for(i=0;s[ i ];i++)

printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);

}
A The output will be :

mmmm
aaaa
nnnn
no Convert the following expression to equivalent Prefix and Postfix notations :

((A + B) * C – (D – E) ^ (F + G))
A Prefix Notation:

^ - * +ABC - DE + FG

Postfix Notation:

AB + C * DE - - FG + ^
no What is difference b/w Operator overloading and function overloading ?
A Function Overloading :

Function overloading is like you have different functions with the same name but different arguments in each function.

Operator Overloading  :

It's the features of C++ that you can give special meanings to operators, when they are used with user-defined classes.

The following set of operators is commonly overloaded for user-defined classes:

1)   = (assignment operator)
2)   + - * (binary arithmetic operators)
3)   += -= *= (compound assignment operators)
4)   == != (comparison operators)
no Which of the following line of code will run correctly ?
A. int p = Math.abs(-5);
B. int q = Math.abs(5.0);
C. int r = Math.abs(5.5F);
D. int s = Math.abs(5L);
A It should be A
no Tell me the output of this code please  !

    main()
    {
        int x=20,y=35;
        x=y++ + x++;
        y= ++y + ++x;
        printf(“%d%dn”,x,y);

    }
A I think 5794...
First  Prev 
 1   2 
Next  Last