{ City } hyderabad
< Country > india
* Profession * qa trainee
User No # 1208
Total Questions Posted # 0
Total Answers Posted # 58

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 6088
Users Marked my Answers as Wrong # 968
Questions / { sneha }
Questions Answers Category Views Company eMail

Answers / { sneha }

Question { ABC, 14246 }

What is Copy Constructor?


The purpose of a copy constructor is to initialize a new
object of a given class by copying an existing object of
that class.

Is This Answer Correct ?    61 Yes 3 No

Question { HP, 7674 }

What is an anonymous union and where to apply that ?


An anonymous union is a union without a name. It cannot be
followed by a declarator. An anonymous union is not a type;
it defines an unnamed object.

The member names of an anonymous union must be distinct
from other names within the scope in which the union is
declared. You can use member names directly in the union
scope without any additional member access syntax.

Is This Answer Correct ?    4 Yes 1 No

Question { HP, 6935 }

How to implement variable argument functions ?


Variable-argument functions in C are inherently unsafe
since there is no language-level mechanism to ensure that
the actual arguments agree in type and number with the
arguments that the function will be using. There are
several ways to implement variable argument functions in C

You can try to implement such function by taking the
address of a formal argument and working your way through
the stack frame.A better alternative is to use the
__builtin_next_arg function on gcc and then work your way
up the stack. You can write your variable argument
functions using the standard macros in and

Is This Answer Correct ?    8 Yes 2 No

Question { HP, 11446 }

What are the different operators in C++?


Addition: +
Subtraction: ?

Addition Assignment: +
Bitwise AND Assignment: &

Bitwise exclusive OR Assignment: ^
Bitwise inclusive OR Assignment: |
Division Assignment: /

Left shift assignment: <<
Modulus Assignment: %
Multiplication Assignment: *

Right shift assignment: >>
Subtraction Assignment: ?

Bitwise AND: &
Bitwise exclusive OR: ^
Bitwise inclusive OR: |

Logical AND: &&
Logical OR: ||

Comma: ,
Conditional: ? :
Pointer-to-member: .* or ?>*

Reference: &
Scope resolution: ::

Division: /
Modulus: %
Multiplication: *

Cast: ()
Function call: ( )
Member access: . and ?>

Postfix decrement: ??
Postfix increment: ++
Subscript: [ ]

Relational and Equality
Equality: ==
Greater than or equal to: >=
Greater than: >

Less than or equal to: <=
Less than: <
Not equal: !=

Left shift: <<
Right shift: >>

Address-of: &
Indirection: *

Logical Negation: !
One's Complement: ~

Prefix decrement: ??
Prefix increment: ++

Unary Plus Operator: +
Unary Negation Operator: -

Is This Answer Correct ?    16 Yes 8 No

Question { IBM, 182721 }

Difference between Overloading and Overriding?


Overloading - Two functions having same name and return
type, but with different type and/or number of arguments.
Overriding - When a function of base class is re-defined in
the derived class.

Is This Answer Correct ?    850 Yes 105 No

Question { HP, 46080 }

Difference between Operator overloading and Functional


Function overloading is like you have different functions
with the same name but different signatures working
differently. So, the compiler can differentiate and find
out which function to call depending on the context. In
case of operator overloading, you try to create your own
functions which are called when the corresponding operator
is invoked for the operands.

One important thing to understand is that you can create as
many functions as you want with the same name and sifferent
signatures so that they can work diffrently but for a
particular class, you cannot overload the operator function
based on number of arguments. There is a fundamental reason
behind this.

According to the rules, you can not create your own
operators but you have to use already available operators.
Another thing is since the operator are already defined for
use with buily-in types you can not change their
charecteristics. For example the binary operator '+' always
takes two parameters, so for this you cannot create a
function that takes three parameters. But you can always
overload them based on the type of the parameters.

Is This Answer Correct ?    115 Yes 14 No

Question { IBM, 204120 }

What is the difference between Class and Structure?


The difference between a class and a structure is that, by
default, all of the members of a class are private and, by
default, all of the members of a structure are public.

Is This Answer Correct ?    797 Yes 102 No

Question { Samsung, 247246 }

What is Difference between thread and process?


The major difference between threads and processes is
1.Threads share the address space of the process that
created it; processes have their own address.

2.Threads have direct access to the data segment of its
process; processes have their own copy of the data segment
of the parent process.

3.Threads can directly communicate with other threads of
its process; processes must use interprocess communication
to communicate with sibling processes.

4.Threads have almost no overhead; processes have
considerable overhead.

5.New threads are easily created; new processes require
duplication of the parent process.

6.Threads can exercise considerable control over threads of
the same process; processes can only exercise control over
child processes.

7.Changes to the main thread (cancellation, priority
change, etc.) may affect the behavior of the other threads
of the process; changes to the parent process does not
affect child processes.

Is This Answer Correct ?    1072 Yes 75 No

Question { HP, 6796 }

What is the best suited algorithm to avoid internal


Markov Cluster algorithm

Is This Answer Correct ?    7 Yes 1 No

Question { Microsoft, 51318 }

What is the difference between mutex and semaphore?


The only real difference between a Semaphore and a Mutex is
that a Semaphore can have a count > 1. While a mutex will
only let one owner attempt access, a Semaphore can be
assigned a number and allow "x" number of threads access.

..........Let me know if it's wrong!

Is This Answer Correct ?    31 Yes 18 No

Question { IBM, 10932 }

What are counting semaphores?


Counting semaphore -Locks a shared resource against
simultaneous access by multiple threads
A counting semaphore is a generalization of a mutex
semaphore that locks a shared resource against simultaneous
access by multiple threads. All resource allocation
functions, such as wait() and post() , take an optional
parameter defining the number of resources to allocate or

Is This Answer Correct ?    11 Yes 5 No

Question { Wipro, 10580 }

What is Virtual Inheritance?


Virtual inheritance is used to avoid multiple copies of a
base class in a multiple-inherited object. However, there
are cases where multiple copies of a base are needed in a
derived class. In such cases, virtual inheritance is
intentionally avoided

Is This Answer Correct ?    18 Yes 2 No

Question { Wipro, 12577 }

What are the differences between a struct in C and in C++?


C structure does not support member functions to be
declared in the structure whereas C++ structure can have
member functions declared in them

Is This Answer Correct ?    34 Yes 3 No

Question { IBM, 65526 }

What are the differences between public, private, and
protected access?


We use these keywords to specify access levels for member
variables, or for member functions (methods).

.Public variables, are variables that are visible to all

.Private variables, are variables that are visible only to
the class to which they belong.

.Protected variables, are variables that are visible only
to the class to which they belong, and any subclasses.

Deciding when to use private, protected, or public
variables is sometimes tricky. You need to think whether or
not an external object (or program), actually needs direct
access to the information. If you do want other objects to
access internal data, but wish to control it, you would
make it either private or protected, but provide functions
which can manipulate the data in a controlled way.

Is This Answer Correct ?    172 Yes 22 No

Question { Wipro, 7769 }

Difference between Application and Applet ?


In simple terms, an applet runs under the control of a
browser, whereas an application runs stand-alone, with the
support of a virtual machine. As such, an applet is
subjected to more stringent security restrictions in terms
of file and network access, whereas an application can have
free reign over these resources.

Applets are great for creating dynamic and interactive web
applications, but the true power of Java lies in writing
full blown applications. With the limitation of disk and
network access, it would be difficult to write commercial
applications (though through the user of server based file
systems, not impossible). However, a Java application has
full network and local file system access, and its
potential is limited only by the creativity of its

Is This Answer Correct ?    7 Yes 6 No

 [1]   2   3   4    Next