1. How will gather requirements and where do you record. Is it in word / Excel or do you have any tool for that?

There are different Requirement Gatherign tech

1. Brainstorming
2. Questioning
3. Interview
4. Prototyping
5. Workshops
6. Observation
7. Checklist

2. Write the test cases for a vending machine?

Assume tha tvending machine can provide tea, coffee and
milk, without taking any money or coin.

Firast we have to create finite state diagram for the test
case solution.

initial state ---->> coffee ------>> tea--------->> milk

this is the one test case where user can first ask for
coffee from initial state and then ask for tea and milk.

Now we have to take all the +ve test cases where user can
move from one state to another state.

3. Suppose You have 3 jars. Each jar has a label on it: white, black, or white&black. You have 3 sets of marbles: white, black, and white&black. One set is stored in one jar. The labels on the jars are guaranteed to be incorrect (i.e. white will not contain white). Which jar would you choose from to give you the best chances of identifying the which set of marbles in is in which jar?

there will be 2 combinations of the incorrect labeling.

lets suppose A,B,C are three jars and A has white, B has
Black and C has both of them.

now possible labeling will be A:B; B:B&W; C:W or A:B&W; B:W,
C:B . There cannot be other combinations...try it.

now in either of cases you choose the jar labeled with B&W
i.e mixture. and see which color of marbles are there. It
wont have both as it is incorrectly labeled. So it will be
the jar of such type of marbles and the remaining jars can
be easily identified with the justification of incorrect
labeles.

4. Write the InStr function. Write the test cases for this function?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InStr
{
class Program
{
static void Main(string[] args)
{
//test case 1, should return -1
string txt = "this is a test";
string searchString = "ae";
Console.WriteLine(InStr(txt, searchString));

//cast case 2, should return 2
txt = "this is a test";
searchString = "is";
Console.WriteLine(InStr(txt, searchString));

}

//return the position of the first occurrence of one
string "searchString" within another "txt"
//return -1 means cannot find
static int InStr(string txt, string searchString)
{
return txt.IndexOf(searchString);
}
}
}

5. Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function?

This is what I came up with (C#):

PSEUDO:
-Craete a list of numbers uptill n number - n being int
parameter
-Pass this list into a function to check for primilaty for
the number and then print primes wile we count for primes

BACKGROUND OF THIS SOLUTION:

THEORY:
- we know primes are the numbers starting from 2 are
divisible with 1 and themselves only i.e. n being a prime
number can only be divisble as n/n or n/1. testing from a
prime is called "primilatiy test" for a number...
-the simplest primality test is to see if given a number n
is divisible by an integer m from 2 to n-1. If n is
divisible by n then n is a composite number otherwise its a
prime...

TO SPEED UP THE COMPUTING WE CAN ALSO:
Rather than testing till n-1 we can test the number till
Square Root of n i.e. if n is a prime number it can always
be factored into 2 values.

REFERENCE:
See here if you want to be a mathematician ;-).
http://en.wikipedia.org/wiki/Primality_test

THE CODE:

I would assume you know how to deal with lists in c# so I
will not get into that. Just create an integer based items
list "list<int>" etc. in C# which adds digits to the list
till number n. HINT: use a for loop ...LOL!!

public void CountPrimes(list<int> c)
{
list<int> primes = c.FindAll(
delegate(int a)
for (int i = 2; i <= Math.Sqrt(a); i++)
{
if (a % i == 0)
return false; //is not a prime
return true;//is a prime
}
//list primes in a list box and get the total count
label1.Text = "Total Primes = " + Convert.ToString
(p.count);
for (int count = 2; count < p.count; count++)
{
}
}

6. How would you deal with changes being made a week or so before the ship date?

In this situation,following things must be think and tested

1) Impacted area should get tested
2) Should run all High priority test cases related area where changes has been made.
3) if gets time then run medium priority test cases
4) do sanity test around the impacted area.

7. What are the different phases in Software life cycle?

In easy words, The stages in a SDLC are:
1) Requirement analysis.
2) Coding
3) Testing
4) Maintainence.

8. What is software life cycle? How much time is spent usually in each phases and why?

Software life cycle simply contains
1) Requirement gathering
2) Requirement Analysis
Output: SRS (System Requirement Specification)
3) Design (High level and Low level)
High Level: Implementation, Technology
Low Level: Software design
4) Unit Testing & Coding
Unit Testing: Break the functionality and do the test
cases for each sub functionality
5) Testing
Unit Testing
Integration testing
UAT: User Acceptance Testing
6) Maintenance

9. What are the different inputs and outputs of the phases in SDLC?

Phase-I Feasibility Study: Input - Customer Requirement,
Budget and Timeframe / Output - Cost Benefit Analysis Report
Phase-II Requirement Analysis: Input - Customer
requirements given in different formats (BRD, FRD)/
Output - SRS
Phase-III System Analysis and Designing: Input - End User
Information / Output - ERD, DFD, Design Documents
Phase IV Development and Coding: Input - DB structures,
Coding and Programming / Output -developed modules
Phase V Integration and Testing: Input - Module
Integration, Test Plan, Test Cases / Output - Defects,
Issues, Interoperability Analysis Report
Phase VI Acceptance and Deployment: Input - Completed
Required System, User Guidance Documents / Output -
Acceptance Report, Deployment Issues

10. How do speedup the project delivery without affecting the cost?

1. Identify whether its under scope or not ?
2. If its with in the scope, then there is a mistake on effort/cost estimation or in the planning.
3. Here the case.. we should delivery with in the budget or estimated cost.
4. Revise the plan and make it strictly.
5. When you revise the plan, you will identify the resource who is lead and lag.
6. Have meeting with the team mates and let them know the situation and increase the work time.
7. According to ur revise plan ( allocate the idle resource and lead resource ) start doing the work.
8. Make sure the daily review and work towards the revised plan which you made against your requirement ( Delivery with in the cost is the purpose).

11. How to estimate the cost of projects?

1. Create the WBS of the project.
2. Assign TeamMember for each Task
3. Prepare the schedule of the Project.
4. Calculate the Effort based on the schedule & Number of
Team members

For example:

Project Shedule is 2 Month with 2 Team Member( Considering
8 Hrs per day)

That Means Effort is 4 Manmonths

Assume that Per Hour cost is 20\$
One day cost per resource is 8 * 20 = 160\$
One day Cost for two resources are 165*2 = 320\$

Number of Working days in one Month is 22 days.
Number of Working days in 2 Months are 2* 22 = 44 days.

Add 4 Hours of Project Management that means Number of
days for project Management is 22 Days.

Total Number of days = 44+22 = 66 days

The Total Poroject Cost = 66 *320\$ = 21120\$

( Note: I have Assumed cost per hour is 20\$ for Project Management Also. This cost may be diferent
I have Considered this Project executed @ offOsore
Onsite Cost will be more.
If the project is executed in ofshore/Onsite model , cost
will be diferent))

13. What is the basics of Agile/Scrum development?

Agile methodology is used to minimize the risk or surprise at the end of the project.
A project is divided into a small projects which has its own SDLC. In case of any failure, the impact will be very minimal i.e. impact will be only on that specific bit of the project.

Scrum is to maintain the transferancy of the progress with the stake holders and to cross check the achievements of the milestones.

14. Explain DLL HELL?

Dll Hell proble is windows register cann't supports the
multiple version of COM Components is called DLL Hell problem.

When ever the user presses tab key after entering the
password the program has to check all these scenarios---

1)The password should not appear in the URL once you press
enter after entering the password, it sometimes gets into
the URL