How can you find dead code!!

Answers were Sorted based on User's Feedback



How can you find dead code!!..

Answer / satish nath siddha

Dead code is something, which is not executed. Generally,
static testing techniques are used to find out dead code.
There are lots of Commercial Off the Shelf (COTS) tools
like Static Analyzer, to perform this static testing. This
is more of a white-box testing, done by developers in most
cases.

Is This Answer Correct ?    6 Yes 1 No

How can you find dead code!!..

Answer / bhargavi

If the program is small, dead code can be detected by
manual code review.for each file,class,module and
interface,list where it is being used.For which no use
location is available is the candidate for removel.
If program is very large it is hard to detect the
unreachable code,in such cases make use available tools.

Is This Answer Correct ?    0 Yes 0 No

How can you find dead code!!..

Answer / mfsi_chinmayb`

Hi
Dead code (a.k.a Unreachable code),as the name suggests is
the portion of the code which is never executed.
Point out the word NEVER , as the code above that made the
break before that and the execution of that never come.
Ex:
int function(a,b)
{
int z;
return a+b;
z=a*b; //It will never be executed
}

The above is the example for a Statement . There might a big
function which is never executed.In larger programs 5-10% of
dead code can be found.

Note : If a program is smaller in size error code can be
checked manually.But for larger program we have automated
tools like: TrueCoverage etc

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Manual Testing Interview Questions

What is Trivial Bug?

2 Answers  


What is the difference between code walkthrough and code review? What is the difference between walkthrough and inspection?

0 Answers   HCL,


how can i derive the test case for requirement and usecase ?

1 Answers  


write the test case for Bulb & Mobile phone

4 Answers   Wipro,


can som1 can tell me that can two or more tester can be given the same project for testing such as unit, regression,UIT,retesting. suppose the project has 10 modules so can all the tester will be asine to write the test cases for same or for differt modules? and in one project how many testers of the same level can participate? plz answer it fast. txs in advance and in which phase we will do the retesting in stlc

1 Answers  






what is diff between 32 / 64 bit web browser

1 Answers   HP,


One scenario: yahoo inbox doesnt show emails but instead of all inbox emails are shown in draft folder. How do u wrte the defect repert for this scenario.

0 Answers   STG,


what we have to read to gain knowledge in banking and financial domain(software testing) for 4+ experience

0 Answers  


how can u do database testing manually?

4 Answers   HCL,


What are starting link to test while website testing?

4 Answers  


Can any1 tell me what is the use of Shell Scripting on Manual Testing ?

3 Answers   Subex,


what are the reason for assigning the status Postponed and differed to a bug? Pls tell me with exampless

2 Answers  


Categories