sneha


{ 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, 13997 }

What is Copy Constructor?


Answer

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, 7509 }

What is an anonymous union and where to apply that ?


Answer

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, 6826 }

How to implement variable argument functions ?


Answer

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, 11326 }

What are the different operators in C++?


Answer

Addition: +
Subtraction: ?

Addition Assignment: +
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
Logical AND: &&
Logical OR: ||

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

Reference: &
Scope resolution: ::

Multiplicative
Division: /
Modulus: %
Multiplication: *

Postfix
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: !=

Shift
Left shift: <<
Right shift: >>

Unary
Address-of: &
delete
Indirection: *

Logical Negation: !
new
One's Complement: ~

Prefix decrement: ??
Prefix increment: ++
sizeof

Unary Plus Operator: +
Unary Negation Operator: -






Is This Answer Correct ?    16 Yes 8 No

Question { IBM, 181722 }

Difference between Overloading and Overriding?


Answer

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, 45761 }

Difference between Operator overloading and Functional
overloading?


Answer

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, 203274 }

What is the difference between Class and Structure?


Answer

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, 246462 }

What is Difference between thread and process?


Answer

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, 6673 }

What is the best suited algorithm to avoid internal
fragmentation?


Answer

Markov Cluster algorithm

Is This Answer Correct ?    7 Yes 1 No

Question { Microsoft, 50952 }

What is the difference between mutex and semaphore?


Answer

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, 10807 }

What are counting semaphores?


Answer

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
deallocate.

Is This Answer Correct ?    11 Yes 5 No

Question { Wipro, 10361 }

What is Virtual Inheritance?


Answer

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, 12359 }

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


Answer

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, 65049 }

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


Answer

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
classes.

.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, 7687 }

Difference between Application and Applet ?


Answer

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
developers.

Is This Answer Correct ?    7 Yes 6 No

 [1]   2   3   4    Next