What are Advantages and Disadvantages of waterfall model

What are Advantages and Disadvantages of waterfall model
A: Easy to Understand and Coding, identifies deliverables and milestones, works well on mature products and weak teams Disadvantages: Requirements be completely
specified before the rest of the development.

What is Waterfall model

What is Waterfall model
A1:It is a Traditional Model, In this Requirements are Freezed in Each and every phase of SDLC
A2: This is the simplest of all the models in SDLC.In this process the phases are organized in a linear and sequential order

Difference between Product development and Project Development

Difference between Product development and Project Development
Developing a product without interactions to two client before the product release. End user may be unknown.
Developing a product based on the client needs or requirements.

What is Testing?Why we use testing for software?

What is QA?Why we use testing for software QA?
Software Testing:
Testing is executing a program with an intention of finding errors.
Fault: Is a condition that causes the software to fail to perform its required function.
Error: Error refers to difference between actual output & expected output.
Failure: Is the inability of a system or component to perform the required function according to its specification.
To discover defects.
To avoid the user/customer from detecting problems.
To prove that the s/w has no defects.[ofcourse not 100% :) ]
To learn about the reliability of the software.
To ensure that product works as user expected.
To stay in business
To avoid being sued by customers
To detect defects early, which helps in reducing the cost of fixing those defects?

Different Blackbox testing interview questions

Different Blackbox testing interview questions
Blackbox Techniques:
Equivalence Class
Boundary Value Analysis
Error Guessing
Equivalence Class
For each piece of the specification, generate one or more equivalence class.
Label the classes as “valid” or “invalid”.
Generate one test case for each Invalid Equivalence Class.
Generate a test case that covers as many as possible equivalence classes.
Boundary values Analysis
Generate test cases for the boundary values.
Minimum value, minimum value+1, minimum value-1
Maximum value, Maximum value +1, Maximum value –1

Error Guessing:

Generate test cases against to the specification
Eg:For a text field it takes age limits only 40-60. But here we write test cases against to that like 30, 20, 70 & 65.

Backend testing,Database testing interview

Backend testing,Database testing interview
What is Data ? And How it is Importance to the Organization
A collection of facts, Pieces of information from which conclusions may be drawn.
Ex: Resumes for managing the human Resources..!
What is Database..?
The Collection of Interrelated Data is called Data Base.
Relational Database Concepts
RDBMS= DBMS +Referential Integrity (It is achieved through Foreign Key).
Referential Integrity :The existence of a value in one dataset is dependent on the existence of the same value in another linked dataset
Ex: Oracle, Sqlserver, Mysql follow RDBMS model.
What is Database Testing ?
Testing an application’s interface with a relational database.
Interface: SQL is nothing but Interface Between RDBMS and application so it lets us to extract, combine, manipulate, and organize data and many more….!
What should we Test in Data Base
Database testing basically include the following.
1)Data validity testing.
2)Data Integrity testing
3)Performance related to data base.
4)Testing of Procedure, triggers and functions.
Data validity testing:
Data validity testing: Testing the correctness and reasonableness of data.
Ex: Account no falling within range, numeric data being all digits, dates having valid months
Note: Data validity errors are more common and most difficult to detect.
Errors in data validity are caused by End user/ by who enters Ex: 13/25/2006
Data Integrity testing:
Date integrity is nothing but enforcing the business rules (facts/data) into database table is called data integrity
Types of Data Integrity :
Entity Integrity: can be achieved through Primary Key and Unique Key Constraints.
Should be tested: whether it is taking duplicate values, Whether it is taking null values.
Domain Integrity: can be achieved through Not null, Default, Check .
Should be tested: Whether it is taking default values even though if we won’t give, checking the values in the column. Ex: age column should take < 60.
Referential Integrity: can be achieved through Foreign Key.
Should be tested : Checking Whether "child" rows are deleted or not when a parent row is deleted from parent table.
For performance related Testing in DB:
Indexes are used to increase the performance.
It is nothing but ordered list of values taken from one or more columns in the tables and organized in to b_tree structure
Need to test: whether we have created index on column for particular table or not.
Why back end testing is so important
A back end is the engine of any client/server system. If the back end malfunctions, it may cause system deadlock, data corruption, data loss and bad performance. Many front ends log on to a single SQL server. A bug in a back end may put serious impact on the whole system. Too many bugs in a back end will cost tremendous resources to find and fix bugs and delay the system developments.
It is very likely that many tests in a front end only hit a small portion of a back end. Many bugs in a back end cannot be easily discovered without direct testing.
Back end testing has several advantages
The back end is no longer a "black box" to testers. We have full control of test coverage and depth. Many bugs can be effectively found and fixed in the early development stage. Take Forecast LRS as an example; the number of bugs in a back end was more than 30% of total number of bugs in the project. When back end bugs are fixed, the system quality is dramatically increased.
Differences between back end testing and front end testing
It is not easier to understand and verify a back end than a front end because a front end usually has friendly and intuitive user interfaces.
A back end has its own objects, such as, tables, stored procedures and triggers. Data integrity and protection is critical. Performance and multi-user support are big issues. Slowness in operation can be vital to the project’s future.
There are no sufficient tools for back end testing. SQL language is mainly a testing tool. MS Access and MS Excel can be used to verify data but they are not perfect for testing. However, there are a large number of test tools available for front end testing.
To be able to do back end testing, a tester must have strong background in SQL server and SQL language. It is relatively difficult to find testers who understand both SQL server and SQL testing. This causes a shortage of back end testers.

Back end testing phases,database testing phases
There are several phases in back end testing. The first step is to acquire design specifications for an SQL server. The second step is test specification design. The next step is to implement the tests in this design with SQL code. The test specification design should contain information concerning component testing (individual pieces of the system), regression testing (previously known bugs), integration testing (several pieces of the system put together), and then the entire system (which will include both front and back ends).
Component testing will be done early in the development cycle. Integration and system tests (including interfaces to front ends and nightly processes) are performed after the component tests pass. Regression testing will be performed continuously throughout the project until it is finished. The back end usually does not have an independent beta test, as it only exercised by the front end during the beta test period. The last step is to deliver users a quality product.
Back end test methodology
Back end test methodology has many things in common with front end testing and API testing. Many test methods can be used for back end testing. Structural testing and functional testing are more effective approaches in back end testing. They are overlapped in some test cases. However, the two methods may discover different bugs. We strongly recommend testers to do both types of testing. There are many other test methods that can be applied to back end testing. We list a few below. For other test methods, please check other test design references.
Structural testing
A back end can be broken down into a finite number of testable pieces based on a back end’s structure. Tests will verify each and every object in a type of structure.
Functional testing
A back end can be broken down into a finite number of testable pieces based on application’s functionality. The test focus is on functionality of input and output but not on the implementation and structure. Different projects may have different ways to break down.
Boundary testing
Many columns have boundary conditions. For example, in a column for percentages, the value cannot be less than zero and cannot be greater than 100%. We should find out these types of boundary conditions and test them.
Stress testing
It involves subjecting a database to heavy loads. For incidence, many users heavily access the same table that has a large number of records. To simulate this situation, we need to start as many machines as possible and run the tests over and over.

Database testing interview questions faqs

Database testing interview questions faqs
• What is SQL and where does it come from?
• What are the difference between DDL, DML and DCL commands?
• How does one escape characters when building SQL queries?
• How does one eliminate duplicate rows from a table?
• How does one generate primary key values for a table?
• How does one get the time difference between two date columns?
• How does one add a day/hour/minute/second to a date value?
• How does one count different data values in a column?
• How does one count/sum RANGES of data values in a column?
• Can one retrieve only the Nth row from a table?
• Can one retrieve only rows X to Y from a table?
• How does one select EVERY Nth row from a table?
• How does one select the TOP N rows from a table?
• How does one code a tree-structured query?
• How does one code a matrix report in SQL?
• How does one implement IF-THEN-ELSE in a select statement?
• How can one dump/ examine the exact content of a database column?
• Can one drop a column from a table?
• Can one rename a column in a table?
• How can I change my Oracle password?
• How does one find the next value of a sequence?
• Workaround for snapshots on tables with LONG columns
• Where can one get more info about SQL?

Testing Interview questions and answers

Testing Interview questions and answers,Testing faqs
1.How many trigger events are there in recovery operation?
1) Popup Window 2) Object State 3) Application Crash 4) Test Run Error.
2. How many types are there to split the actions?
1)Independent and
2)Nested (Parent-Child.)
3. What is meant by Source Control?
4. Give one example where you have used Regular Expression?
05/19/2004 (mm/dd/yyyy)
5.How to instruct QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of execution due to an error (for example Object not found)?
1)Recovery Scenario
6.What is the Extension For Shared Object Repository
7. What is the default Sync time out.
20000 ms
8. What is the Difference between SystemUtil And InvokeApplication?
1)Using SystemUtil we can make use of the different methods such as Run or Close , whereas in InvokeApplication we can only open the apllication.
2)InvokeApplication method can open only executable files
9.What is the Difference Between GetRo Property and GetToProperties?
1)You use the GetROProperty method to retrieve the current value of a test object property from a run-time object in your application
2) GetTo Property Returns the collection of properties and values used to identify the object.
10. What is the Difference Between Call to copy of Action and Call to Existing Action?
If u do any Enhancements in Existing Action It will Affect to the Main Tests where as in the Copy of Action ,The Main Test will not Get Affected.
11. What is the extension for ‘Per Action’ object Repository?
12. How Object Repository will Learn the Objects from Application?
Based on Physical Desc And the logical Name
13. How many types are there in Run Mode?
1)Fast 2) Normal
14. How do You Change the Logical Name of the Object in Test Script?
By Renaming the object in The Repository.
15. What is the Diffrence Between the Wait and sync Time?
"Wait" statement is used to instruct QuickTest to wait for a window to open or an object to appear.where as "Sync" Waits for the browser to complete the current navigation.

Load runner interview questions faqs

Load runner Interview questions ,Testing with loadrunner faqs:
1. Which protocol has to be selected for recording/playback a Visual Basic application?
2. What kind of problem we can face regarding hardware, software, and network and
memory bottleneck during the performance test?
3. What is a LoadRunner Agent? Why is it used? Where does the Agent run?
4. What is the use of RCL is performance testing conducted by LoadRunner? Distinguish between the exact functionality of RCL vs. LR Agent?
5. How much memory is utilized per VUSER?
6. How can set the number of virtual users in Load Runner?
7. How would you plan, execute and analyze performance test case?
8. What is extended log in load runner?
9. What is co-relation in load runner?
10. How to call win runner script in LoadRunner?
11. What enables the controller and the host to communicate with each other in Load
12. What protocols does LoadRunner support?
13. What are all the functions available in LoadRunner to do the correlation?
14. What is load runner controller?
15. What is load runner API function?
16. Where you insert the rendezvous point?
17. What is transaction performance graph?

Different Phases in QTP Testing

Different Phases in QTP Testing
QTP process consists of 7 main phases
i)Preparing to record
Test Environment
Test Conditions
ii)Recording a session on your application
Navigate according to Test Conditions
iii)Enhancing your test
Adding logic and conditional statements
Inserting checkpoints
iv)Debugging your test
Check that it operates smoothly and without interruption.
v)Run Test
Check the behavior of your application
vi)Analyzing the test results
vii)Reporting defects
QTP High-level features
Object Spy
Object Repository
Tree View
Expert View
Active Screen Technology
Data Tables (Global, Local)
Object Identification
Various Add ins

Testing Interview Questions ,Testing Faqs

Testing Interview Questions ,Testing Faqs
1] Record and playback - drawbacks
Test scripts contains hard-coded values.
This is not a viable cost-effective test automation approach for long term.
2] Difference between Image and Bitmap checkpoint
Image Checkpoint Checks the whole Image whereas in bitmap checkpoint we can check the selected area of image/page
3] What is the Automation framework you are following?
Keyword driven/Datadriven approach, Functional decomposition.
4] Write one line code - to Get value from Datatable in the script
1)strText = DataTable("ColumnHeading", dtGlobalSheet)
2)strText=datatable("column Name")
5] Write one line code - to Connect to Excel
1)DataTable.Import "FilePath"
6] Explain Descriptive Programming, why do you go for that?
1)We can run the script without object repository.
2) Based on Properties and prop's Values .
7] How many actions can we write in a Test?
1) "N" no of Actions
8] What do u mean by Compile Module?
Compile Module in Win Runner is Same as library file. Collection of functions.
9] How will you declare a variable to access in multiple actions?
2)Environment Variables.(User Defined).
10] What are associated files in QTP?
With QTP you can create VBScript library files containing VBScript functions, subroutines, classes, modules, etc., and then associate the files with your test
11] What is the difference between Object Repository and Object SPY?
Object Repository stores objects and gives basic properties and Object SPY gives in detail all the run-time and Test object properties associated with an object and to view the syntax for a selected method.
12] How to handle java tree in QTP?
To handle java tree, we must have Java Addin. After adding java addin we must go to object configuration and do some configurations
13] What are the different test status messages?
Done, Pass, Fail and Warning
14] What is the extension for the test version of Script? .mts
15] What are the types of ordinal identifier?
Index Property, Location Property, Creation Time Property

Different types of Testing

Different types of Testing
1.Black Box Testing
Black box testing is also called as functionality testing. In this testing testers will be asked to test the correctness of the functionality with the help of inputs & valid outputs.
Black box testing not based on any knowledge of internal design or code. Tests are based on requirements & functionality.
2.White box testing:
White box testing also called as Structural Testing. White box testing based on knowledge of the internal logic of an application’s code. Tests are based on coverage of code, statements, branches, paths, conditions & loops.
Structure = 1 Entry + 1 Exit with certain constrains, conditions and loops.
3.Grey box testing
This is just a combination of both black box and white box testing. Tester should have the knowledge of both the internal and externals of the function.
Tester should have good knowledge of white box testing & complete knowledge of black box testing
Grey box testing is especially important with web & Internet applications, because the Internet is built around loosely integrated components that connect via relatively well-defined interfaces.

DotNet Interview Questions

.Net Interview Questions
1. ­­­________________ is the heart of .Net Framework.
2. What type applications can be created on .Net framework.
3. Name the component responsible for cross language integration.
4. What are dlls corresponding to FCL and CLR?
5. What is the functionalities provided by FCL?
6. Name any features of Assembly.
7. Why is XCOPY deployment possible for .Net applications.
8. What is managed code?
9. Name any five .Net Compatiblelanguages.
10. Difference between directcast and ctype. An example of a ctype and directcast.
11. ctype(123.34,integer) - should it throw an error? Why or why not? directcast(123.34,integer) - should it throw an error? Why or why not?
12. Difference between Panel and GroupBox classes?

COBOL Interview questions and answers,Mainframes Interview question and answers

COBOL Interview questions and answers,Mainframes Interview question and answers
Q1) Name the divisions in a COBOL program ?.
Q2) What are the different data types available in COBOL?
A2) Alpha-numeric (X), alphabetic (A) and numeric (9).
Q3) What does the INITIALIZE verb do? - GS
A3) Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES. Numeric, Numeric edited items set to ZERO. FILLER , OCCURS DEPENDING ON items left untouched.
Q4) What is 77 level used for ?
A4) Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves.
Q5) What is 88 level used for ?
A5) For condition names.
Q6) What is level 66 used for ?
A6) For RENAMES clause.
Q7) What does the IS NUMERIC clause establish ?
A7) IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimal items and unsigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and - .
Q8) How do you define a table/array in COBOL?
Q9) Can the OCCURS clause be at the 01 level?
A9) No.
Q10) What is the difference between index and subscript? - GS
A10) Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of the
array. An index can only be modified using PERFORM, SEARCH & SET. Need to have index for a table in order to
Q11) What is the difference between SEARCH and SEARCH ALL? - GS
A11) SEARCH - is a serial search.
SEARCH ALL - is a binary search & the table must be sorted ( ASCENDING/DESCENDING KEY clause to be used & data loaded in this order) before using SEARCH ALL.
Q12) What should be the sorting order for SEARCH ALL? - GS
A12) It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want the search to be done on an
array sorted in descending order, then while defining the array, you should give DESCENDING KEY clause. (You
must load the table in the specified order).
Q13) What is binary search?
A13) Search on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat the process with the left half or the right half depending on where the item lies.
Q14) My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the
11th item in this array, the program does not abend. What is wrong with it?

A14) Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.
Q15) How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning. - GS
A15) Syntax: SORT file-1 ON ASCENDING/DESCENDING KEY key.... USING file-2 GIVING file-3.
USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2
GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2.
file-1 is the sort (work) file and must be described using SD entry in FILE SECTION.
file-2 is the input file for the SORT and must be described using an FD entry in FILE SECTION and SELECT
clause in FILE CONTROL.
file-3 is the out file from the SORT and must be described using an FD entry in FILE SECTION and SELECT
clause in FILE CONTROL.
file-1, file-2 & file-3 should not be opened explicitly.
INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure.
OUTPUT PROCEDURE is executed after all records have been sorted. Records from the sort work file must be RETURNed one at a time to the output procedure.
Q16) How do you define a sort file in JCL that runs the COBOL program?
A16) Use the SORTWK01, SORTWK02,..... dd names in the step. Number of sort datasets depends on the volume of data
being sorted, but a minimum of 3 is required.
Q17) What is the difference between performing a SECTION and a PARAGRAPH? - GS
A17) Performing a SECTION will cause all the paragraphs that are part of the section, to be performed.
Performing a PARAGRAPH will cause only that paragraph to be performed.
Q18) What is the use of EVALUATE statement? - GS
A18) Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and
case is that no 'break' is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is
Q19) What are the different forms of EVALUATE statement?
imperative stmt imperative stmt
WHEN (D+X)/Y = 4 WHEN -305 ALSO '32'
imperative stmt imperative stmt
imperative stmt imperative stmt
imperative stmt imperative stmt
imperative stmt imperative stmt
Q20) How do you come out of an EVALUATE statement? - GS
A20) After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the
EVALUATE statement. There is no need of any extra code.

Netapp Interview Questions and answers

Netapp Interview Questions and answers
First WRITTEN-1:30 min
it consisted of 4 sections.
1st section was quantitative aptitude. questions on pipe-cistern,work,percentages,profit loss etc.,
2nd section was c. this was the easiest of all as nearly all questions were from test ur c skills...but all good questions only.
3rd section was ADA.. i.e algorithms. questions were mixed easy as well as hard. some basic questions like a tree is given wat is inorder traversal. some complex questions like the complexity. there were even questions on Graphs.
4th section was Systems. questions were tricky. questions on race conditions.segmentation faults.code was given and race condition wat is final output.
int a[100];
for(i=0;i<=100;i++) a[i]=i; wat will happen?? questions on signals....
------------INTERVIEW- -----------
The written was followed by interviews. 1st- it was 20-25 min interview. mostly on c and systems(my aoi) questions
char *func(char *p)
p=p+3;//change local variable
return p;
char *y="HELLO";
y=func(y);//although call by value but u end up changing original variable
ans:LO now he asked is this call by value or call by reference.this is tricky because u end up changing ptr y. although this is call by value. this is because u r returning value and storing in same variable y.
2)then wat is difference in file pointer and file descriptor.(read K-R unix interface chapter).
3)i give u a 512 mb ram. wat will be there in it??

2nd interview 2 puzzles

1- u have a scooter. and 3 tyres. each tyre has a max life of 1 yr. wat is the max tym u can run ur scooter.
ans: 1.5 yrs 1-6 nnths 1,2 tyre replace 1st with 3rd after 1 yr 2nd finished. so replace it by 1st after 1.5 yrs total tyre=0:
2-u r given a disk. half black half white. its rotating. u have to make sum system using sensors etc. so that a computer can tell the direction in which the disc is rotating.
3-He asked me about the question from the written paper about race conditions and segmentation fault. this discussion went on and on.
what is segmentation fault?? who gets to know that there is segmentation fault. i said kernel. i said it sends a SIGSEGV signal. if u have a[100] array wat will happen when u assign a[102]?? ok now if i have a[100] and b[100] wat will happen now when i acess a[102]??? the correct answrs were ...there are segment registers in hardware..they give an exceptions to kernel which then generate SIGSEV...........read M.J Bach for furthur reference.
so all in all the interview was Fucked..... :(

3rd interview)
Ist question on project. around 10 mins on that. then write a code that will for sure generate segmentation fault.write a code to delete any node in a link list. with all test cases and boundary conditions.(easy stuff)
4th) Hr-- why u want to join netapp,about urself... i was the last person to be interviewed so this was very short interview.

Written test paper at Cisco interview Question paper

Written test paper at Cisco interview Question paper
1. The starting location of an array is 1000. If the array[1..5/...4] is stored in row major order, what is the location of element [4,3]. Each word occupies 4 bytes.
Ans: 1056 (Check it out for yourself!)
2. In a tertiary tree, which has three childs for every node, if the number of internal nodes are N, then the total number of leaf nodes are?
Ans: (2N+1)
3. Explain the term "locality of reference" ?
Ans: In computer science, locality of reference, also called the principle of locality, is the term applied to situations where the same value or related storage locations are frequently accessed. There are three basic types of locality of reference: temporal, spatial and sequential:
Temporal locality -
Here a resource that is referenced at one point in time is referenced again soon afterwards.
Spatial locality -
Here the likelihood of referencing a storage location is greater if a storage location near it has been recently referenced.
Sequential locality -
Here storage is accessed sequentially, in descending or ascending order.
4. What is the language used for Artificial Intelligence
Ans: lisp
5. What is the character set used in JAVA 2.0 ?
Ans: Unicode
6. char a =0xAA ;
int b ;
b = (int) a ;
b = b >> 4 ;
What is the output of the above
program segment ?

Ans: fffffffa
7. struct s1 { struct { struct { int x; } s2 } s3 }y;
How does one access x in the above given structure definition ?

Ans: Compilation failes as ";" is missing immediately after declaration of the strcuture variables s2 and s3.
Otherwise, we can access x like this: y.s3.s2.x
8. Why there is no recursion in Fortran ?
Ans. There is no dynamic allocation.
9. What is the worst case complexity of Quick sort?
Ans. O(n2)
10. What will be sequence of operating system activities when an interrupt occurs ?
Ans: Most modern general purpose microprocessors handle the interrupts the same way. When a hardware interrupt occurs the CPU stops executing the instructions that it was executing and jumps to a location in memory which either contains the interrupt handling code or an instruction branching to the interrupt handling code. This code usually operates in a special mode for the CPU, interrupt modeand, normally, no other interrupts can occur in this mode. There are exceptions though; some CPUs rank the interrupts in priority and higher level interrupts may happen. This means the first level interrupt handling code must be very carefully written and it often has its own stack which it uses to store the CPU's execution state (all of the CPU's normal registers and context) before it goes off and fully handles the interrupt. Some CPUs have a special set of registers that only exist in interrupt mode and the interrupt code can use these registers to do most of the context saving it needs to do. When the interrupt has been handled, the CPU's state is restored and the interrupt is dismissed. The CPU will then continue to doing whatever it was doing before being interrupted. It is important that the interrupt processing code is as efficient as possible and that the operating system does not block interrupts too long.
11. In a sequential search, what is the average number of comparisons it takes to search through n elements ?
Ans: (n+1)/2.
12. What is the size of the array declared as double * X[5] ?
Ans. 5 * sizeof ( double * )
13. A binary search tree with node information as 1,2,3,4,5,6,7,8 is given. Write the result obtained on preorder traversal of the binary search tree ?
Ans : (Not sure!)
14. If size of the physical memory is 232-1, then what is the size of the virtual memory ?

S -> A0B
A-> BB0
B-> AA1
How many strings of length 5 are possible with the above productions?

16. (3*4096+15*256+3*16+3). How many 1's are there in the binary representation of the result?
Ans. 10 ( 16179 = 11111100110011)
17. In memory mapped I/O how is I/O is accessed ?
Ans: uses the same address bus to address both memory and I/O devices, and the CPU instructions used to access the memory are also used for accessing devices.
18. What is the use of ALE in 8085 ?
Ans: To latch the lower byte of the address.
19. If the logical memory of 8 X 1024 is mapped into 32 frames, then the number of bits for the logical address are____ ?
Ans. 13
20. Context free grammar is useful for which purpose ?
21. In ternary number representation, numbers are represented as 0,1,-1.(Here -1 is represented as 1 bar.) How is 352/9 represented in ternary number representation?

22. There are processes which take 4,1,8,1 machine cycles respectively. If these are executed in round robin fashion with a time quantum of 1, what is the time it take for process 4 to complete ?
Ans. 9
23. The minimum frequency of operation is specified for every processor because......
a)for interfacing slow peripherals
b)dynamic memory refreshing.
c)to make compatible with other processor.
24. For linked list implementation , which search is not applicable ?
Ans: Binary search.
25. Each character is represented by 7 bits, 1 bit is used to represent error bit and another bit for parity. If total number of bits transmitted is 1200 bits, then what is the number of symbols that can be transmitted ?
Ans: 133
26. Explain set associativity of cache ?
27. Write the postfix form of the following expression . A+[[(B+C)+(D+E)*F]/G]
28. What is the function of the linker?
29. void f(int y)
struct s *ptr;
ptr = malloc (sizeof (struct)+99*sizeof(int));
struct s{
int i;
float p;
when free (ptr) is executed, then what will happen?
30. To concatenate two linked lists strings, the order is O(1) is obtained for what kind of list?
31. main()

{ fork();
How many times it will print hello?
32. char A[5,6] How many bytes it requires?
33. Bridges are used in which layer?
34 .Bigendian means
a)lower byte stored in lower address
b)lower byte stored in higher address
one of these is correct.u can verify in Any micro processor book.
35 main()
{ j=0
what is the value of i & j at the end of the loop

ans: 10,46

Cisco Interview questions for Electronics Engineer

Cisco Interview questions for Electronics Engineer
1. In order to find out stack fault of a three input nand gate how many necessary input vectors are needed ?
2. What is parity generation ?
3. A nand gate becomes ___ gate when used with negative logic ?
4. What is the advantage of cmos over nmos ?
5. What is the advantage of syncronous circuits over asynchronous circuits ?
6. What is the function of ALE in 8085 ?
7. A voice signal sample is stored as one byte. Frequency range is 16 Hz to 20 Hz. What is the memorysize required to store 4 minutes voice signal?
8. What will the controller do before interrupting CPU?
9. In a normalised floating point representation, mantissa is represented using 24 bits and exponent with 8 bits using signed representation. What is range ?
10. The stack uses which policy out of the following-- LIFO, FIFO, Round Robin or none of these ?
11. Where will be the actual address of the subroutine is placed for vectored interrupts?
12. Give the equivalent Gray code reprasentation of AC2H.
13.What is the memory space required if two unsigned 8 bit numbers are multiplied ?
14. The vector address of RST 7.5 in 8085 processor is _______.
Ans. 003C (multiply 7.5 by 8 and convert to hex)
15. Subtract the following hexadecimal numbers--- 8416 - 2A16
16. Add the following BCD numbers--- 1001 and 0100
17. How much time does a serial link of 64 Kbps take to transmit a picture with 540 pixels.
18. Give the output when the input of a D-flip flop is tied to the output through the XOR gate.
19. Simplify the expression AB + A( B + C ) + B ( B + C )
20. Determine the logic gate to implement the foolowing terms--ABC, A+B+C
21. Implement the NOR gate as an inverter.
22. What is the effect of temperature on the Icb in a transistor
23. What is the bit storage capacity of a ROM with a 512*4 organisation?
24. What is the reason of the refresh operation in dynamic RAM's ?
25. Suppose that the D input of a flip flop changes from low to high in the middle of a clock pulse.Describe what happens if the flip flop is a positive edge triggered type?
26. How many flip flops are required to produce a divide by 32
device ?
27. An active HIGH input S-R latch has a 1 on the S input and a 0 on the R input. What state is the latch in?
28. Implement the logic equation Y = C^BA^ + CB^A + CBA with a multiplexer. (where C^ stands for C complement)
29.Equivalent Gray code reprasentation of AC2H.
30. What does a PLL consist of ?

Cisco Interview Questions asked,Cisco sample Interview Questions

Cisco Interview Questions asked,Cisco sample Interview Questions
1)What is Recovery Testing
Ans: In software testing, recovery testing is the activity of testing how well the software is able to recover from crashes, hardware failures and other similar problems.
2)Which layer is responsible for determining if sufficient resources for the intended communication exists?
* Application
* Network
* Session
* Presentation
* Transport
Ans:The Application layer of the OSI model is where users communicate to the computer. The Application layer is responsible for identifying and establishing the availability of the intended communication partner and determining if sufficient resources for the intended communication exist.
3)What are the 2 functions of the Data Link Mac layer?
* Handles access to shared media
* Manages protocol access to the physical network medium
* Provides SAPs for higher level protocols
* Allows multiple devices to uniquely identify one another on the data link layer
Ans: Handles access to shared media and Allows multiple devices to uniquely identify one another on the data link layer
4)Describe End to End network services: (Choose all that apply)
* Best Route selection
* Accomplished Segment by Segment, each segment is autonomous
* Flow Control & Data Integrity
* Best efforts packet delivery
Ans: Accomplished Segment by Segment, each segment is autonomous and Flow Control & Data Integrity (Not sure! Double check!)
5)Which of the following provide correct information about a protocol at the transport layer of the OSI model?
* UDP - Provides Connectionless datagrams service
* TCP - Provides Connection Oriented Services
* SMTP - Provides Mail Exchange
* IP - Route determination
* FTP - Transfers of Files
Ans: UDP - Provides Connectionless datagrams service and TCP - Provides Connection Oriented Services
6)Which layer is responsible for providing mechanisms for multiplexing upper-layer application, session establishment, and tear down of virtual circuits?
* Session
* Network
* Physical
* Transport
* Application
* Presentation
Ans: Transport Layer
7)Which of the following are logged when IP access list logging is enabled?
* source address
* protocol
* source port
* destination address
* access list number
* destination port
8)What?s the default CDP holdtime in seconds for Cisco routers?
* 30 seconds
* 180 seconds
* 90 seconds
* 60 seconds
Ans: 180 Seconds
9)Which two of the following protocols are used at the Transport layer?
* BootP
Ans: TCP and UDP
10)Choose three reasons why the networking industry uses a layered model:
A* It facilitates systematic troubleshooting
B* It allows changes in one layer to occur without changing other layers
C* It allows changes to occur in all layers when changing one protocol
D* It clarifies how to do it rather than what general function to be done
E* It clarifies what general function is to be done rather than how to do it
Ans: A, B, and E
11)Which layer is responsible for identifying and establishing the availability of the intended communication partner?
* Application
* Presentation
* Transport
* Session
* Network
Ans: Application
12)What is TACACS? Radius?
Ans: Terminal Access Controller Access-Control System (TACACS) is a remote authentication protocol that is used to communicate with an authentication server commonly used in UNIX networks. TACACS allows a remote access server to communicate with an authentication server in order to determine if the user has access to the network.
RADIUS: Remote Authentication Dial In User Service (RADIUS) is an AAA (authentication, authorization, and accounting) protocol for controlling access to network resources. RADIUS is commonly used by ISPs and corporations managing access to Internet or internal networks across an array of access technologies including modem, DSL, wireless and VPNs.
13)What is flow or netflow?
Ans: NetFlow is an open but proprietary network protocol developed by Cisco Systems to run on Cisco IOS-enabled equipment for collecting IP traffic information.
14)What is SPAN or RSPAN?
Ans: Switched Port Analyzer. Remote Switched Port Analyzer. You can monitor traffic flowing to a port from another port.
15)What is VMPS?
Ans: The VLAN Membership Policy Server ( VMPS ) makes it possible to use a client/server architecture to manage dynamic VLAN based on the MAC addresses.
When someone connects to a port, the client switch connects it to server VMPS to know if this MAC address can be connected to this port.

Cisco Network Interview Questions-Technical interview questions Cisco

Cisco Network Interview Questions-Technical interview questions Cisco
1. What is a wildcard mask, and how is it different from a netmask?
2. How do you configure a Cisco switch or router? What are the steps needed?
3. How would I place an interface into trunking mode?
4. How do you shutdown an interface on a router or switch?
5. What is VTP?
6. What is VMPS?
7. What is SPAN/RSPAN?
8. What is flow/netflow?
9. What is TACACS? Radius?

Citrix written test Question Paper at off campus

Citrix written test Question Paper at off campus
1. What is the output of this statement ?
Printf(“%d”,printf(“%d %d”,2,2) & printf(“%d %d ”, 2, 2));

a. 22222
b. 22221
c. It will give an error during compilation
2. What is the output of this code snippet

{ int *p[10];
printf("%d %d\n",sizeof(*p),sizeof(p));
3. Function inlining is best used when
a. In a small recursive function
b. In large function where number of variables used is small
c. In a large function where there are many loops and number of variables used is small
d. None of these
4. If there is a large quantum in round robin it will be equivalent to
a. First come first serve
b. Shortest job first
c. Least recently used
d. None of these
5 . which of the following will lead to starvation
a. Fifo
b. Shortest job first
c. Round robin
d. Least recently used
6 . if the address space is which of the following is the broadcast ip
7. if there are 9 yellow balls, 3 red balls and 2 green balls. What is the probability that the second ball picked is yellow given the first ball is yellow
a. 8/13
b. 9/13
c. 8/14
d. 9/14
8. How many processes are created in this snippet?
Fork() && fork () || fork ();
Fork ();
a. 15
b. 19
c. 21
d. 27
e. 31
9. which of the following is TRUE about the declaration const char * p
a. the pointer cannot be changed but the value to which it points can be changed
b. the value is constant but the pointer can be changed
c. neither the value nor the pointer can be changed
d. none of these
10. If F and L are the pointers to the first and last elements in a linked list, then which of the following operations is dependent on the length of the list?
a. delete the first element in the list
b. insert a new element as a first element
c. delete the last element of the list
d. add a new element at the end of the list
11. Find the slope of the line joining the points (0,2) and (3, -2)
a. -4/3
b. ¾
c. -3/4
d. 4/3
12. Solve for x in x^3+3x^2+5x+9=6
a. -1
b. 1
c. -2
d. -3
13. 73 to the base x is equivalent to 51 to the base y. which of the following may be the possible values of x and y
a. 10, 12
b. 8, 16
c. 9, 13
d. 8, 12
14. Which of the following is independent of the operating system and machine architecture
a. linker
b. loader
c. compiler
d. debugger
15. Which of the following restricts a process to the memory allocated to it
a. stack pointers
b. memory allocation hardware
c. kernel
d. none of these
16. When a user logs out, what happens to the processes created by him?
a. they’ll be killed
b. aborted
c. hang
d. none of these
17. What is the output of
Struct node {
Int a;
Int b;
Int c;
Struct node a = {2,4,5};
Struct node *st;
St = &a;
Printf(“%d”, *(int *)st);
a. 2
b. 3
c. 7
d. 11
18. What is the output of
Struct outer{
Struct inner{
Int a = 10;
Int b = 5;
Struct inner new;
Printf(“%d”, new.a)
a. It will give a compilation error
b. 10
c. 5
d. 15earrange?blogID=9179416692752405527
19. Thrashing is solved by
a. increasing cpu bound processes
b. reducing the degree of multi-programming
c. increasing user processes
d. none of these
20. If t` is the reverse of t then what is the reverse of trs
a. s’r’t’
b. srt
c. t’r’s’
d. t’rs’

CITRIX Interview Questions,Citrix interview faqs

CITRIX Interview Questions,Citrix interview faqs
1)Explain an algorithm for path planning in a given map.
2)Write a code to find the shortest path in a given graph.
3)Write a code for minimal spanning tree
4)How do you find existence of a cycle in the given graph.
5)Explain OSI model.
6)How do you find out the sizeof an object in Java.
7)Given a byte, write a code to swap every two bits. [Using bit operators] Eg: Input: 10 01 11 01 Output: 01 10 11 10
8)Write a Shell code which takes in as input several files and replaces each occurance of word “Nishant” with word “reddy”.
9)What is VPN ?
10)What are TCP/IP protocol , Routing algorithms , P2P file sharing , Routing protocols.
11)Implement the above protocols in C.

Sun Microsystems Interview questions

Sun Microsystems Interview questions
1)How many ways can a thread be used?
2)What is multithread synchronizing ?
3)In which way does a Primitive data type is passed ?
4)What happens when a main method is declared as private?
5)Is there any need to import java.lang package?
6)What is multithread synchronizing ?
7)Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }
8)Which data structure gives efficient search? A. B-tree B. binary tree C. array D. linked list
9)Give the output of the following program main() {char *p='a'; int *i=100/*p; } what will be the value of *i= 1
10)Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");

Sasken Interview Questions and answers

Sasken Interview Questions
1)I am running a windows based application.While running the script on QTP ,The Application pop-up an Error Message as "object Disabled" in two different scenarios
Scenario 1-->The Application pops-up a Message for Max Session Reached(as the application is set to hold 2 sessions and if it crosses the pre-defined limit then the error message pops-up)
Scenario 2-->When Network connectivity is disabled the Application screen gets greyed out in colour with no operation possible.
Now though Exception handling features in QTP ,we need to do the following For Scenarion 1-->Through Exception handling we need to just accept the Message pop-up in the Application and and resume with the call function as is for Scenario 2--> Through Exception Handling featutes on QTP we need to shut down the client , restart the client and resume the call functions as it is
Note: The Application returns an Error Message as "object disabled" in both the cases i.e for pop-up message and when the Apllication getting greyed out due to Network failure how can we enhance the script in such a way that for the same error message retured by the application in two different and how to handle them????
2)What is the ethernet interface? Wand when we can use? How to connect the host systems to target system
3)What is the difference between ArrayList and Vector?
Ans: ArrayList is not synchronized while Vector is Synchronized.
4)How to test the MMS application?
5)What is regression testing?

Deshaw Fresher C part Interview Questions,Basic Interview Questions

Deshaw Fresher C part Interview Questions,Basic Interview Questions
Write the programs for the following problems in C.
1. Swap two variables x,y without using a temporary variable.
2. Write algorithm for finding the GCD of a number.
3.Write a program for reversing the given string.
4. The integers from 1 to n are stored in an array in a random
fashion. but one integer is missing. Write a program to find the
missing integer.
Ans): Hint : The sum of n natural numbers is = n(n+1)/2.
if we subtract the above sum from the sum of all the
numbers in the array , the result is nothing but the
missing number.

5. Some bit type of questions has been given on pointers asking to
to find whether it is correct from syntax point of view. and if
it is correct explain what it will do. (around 15 bits).
6. For the following C program
#define AND &&
#define ARRANGE (a>25 AND a<50)
{int a = 30;
printf("within range");
printf("out of range");

What is the output?
7. For the following C program
#define AREA(x)(3.14*x*x)
{float r1=6.25,r2=2.5,a;
printf("\n Area of the circle is %f", a);
printf("\n Area of the circle is %f", a);

What is the output?
Ans. Area of the circle is 122.656250
Area of the circle is 19.625000

8. What do the following statements indicate. Explain.





Refer to:
-- Kernighan & Ritchie page no. 122
-- Schaum series page no. 323
9. Write a C program to find whether a stack is progressing in forward
or reverse direction.
10. Write a C program that reverses the linked list.

Deshaw Aptitude Interview questions

Deshaw Aptitude Interview questions
(1)A man bought two horses for Rs.924 each and sold one horse for
15% profit and the other for 15% loss.What is the net gain?
(2) Two pumps fill atank in 20 hrs. One pump fills the same
tank 10hrs. faster than the other pump. In what time the
other pump fills the tank?
(3) X men in Xhrs/day finish a work in x days. Y men in y hours
per day finish the work in
(a) X**2/Y**2 (b)X**3/Y**2 (c) Y**2/X**2 (d) Y**3/X**2
(4)8 men + 2 boys finish a work in 16 days.
2 men + 5 boys finish a work in 20 days. 8 men and 8 boys
finish the same work in how many days?
(5)A & B are two trains, travell from X & Y stations to Y & X
stations after crossing each other A takes 4 hrs.48 mins. to
reach Y station. B takes 3hrs.20 mins. to reach X station.
The speed A is 45kmph. Speed of B is ?


1. To display the contents of a executable file the following
command can be used
(a) cat (b) od (c) vi (d) ed ans : b
2. Assume the current directory contains 10 files and does'nt
contain 'temp'. What will be the output of the follwing
$ls > temp
$wc -l temp
(a) 9 (b) 10 (c) 11 (d) undefined. ans : b *c
3. If one wants the output of one command( command1) to be
printed inthe printer as well as to be added to another file
(outfile) which one of the following is a currect command
he can give?
(a) $command1 >>outfile|tee lpr
(b) $tee -a command1 | lpr
(c) $ command1 | tee outfile | lpr
(d) $ command | tee -a outfile |lpr ans : d
(4) In the shell program set -x will cause
A. Execution of the commands in the background
B. Execution of the commands in verbose mode
C. Exit from the shell program.
D. Exit from the shell program after executing the next command
(5) ACL in UNIX refers to
A. Acces Control List
B. Action Control List
C. Application Command Language
D. Advanced C lanuage
ans a:
(6) The command echo*
A. will print * on the screen
B. will print contents of all the files in the current
C. will list the files in the current directory
D. will print the contents of all shell variables
ans c:
(7) ls || date will
A. print the name of the files in the current directory
B. print today's date and time
C. (A) followed by (B)
D. none of the above
ans : a
(8) The built-in shell variable $$ refers to
A. printing numbers in dollar format
B. proces id_ of last command
C. proces id_ of last background command issued
D. proces-id of current shell
ans :d
(9) dd is mainly used for
A. dealing with raw, unformated data, whatever the source
B. dealing with data dictionary
C. deleting a directory
D. none of the above
ans :d
(10) vis in UNIX is
A. a command that takes only one input
B. a command for deleting strange or unwanted charectors that
may have crept into files.
C. points non-printable characters in understandable format
D. all of the above
(11) Which of the following is true regarding the UNIX
(i) Multiuser Operating System
(ii)Multitasking Operating System
(iii) Real timing Operating System
A. i only B. i and ii only C. i and ii and iii only
D. i and ii
ans : a
(12) ln command is used to
A. link object codes into a executable code
B. give two names to the same file
C. set line numbers for the file
D. none of the above
ans : b
(13) nohup command is used for
A. protecting the execution of programmes from aborting when
hangup signal is received
B. changing the execution priority of the programes
C. not hanging up of the modem
D. disconnecting a node from the system
ans : a
(14) SCCS is a
A. Tool for maintaining large programmes in a production
B. Communication Protocol
C. Shell Programming Language
D. String processing utility
ans : a
(15) Which one of the following is true as long as UNIX is
A. One can do programming in C only
B. It can support terminals capable of printing only uppercase
C. The text files are sorted as it is in MS-DOS
D. None of the above
ans: d
(16) Inside vi editor to replace the string 10/$$/92 with
10/$$/92 globally the following command can be used
A. :1,$ s/\/10\/\$\/94/10\/\$\$\/92/g
B. :1,$ s/\/10\/\$\/94/10\/\$\/$92/
C. :s10/$$/92/10/$$/92/g
D. :1,$ s/\/10\/$\/94/10\/$$\/92/g
**** ans : d
(17) The ed command without any argument
A. will print the current working directory
B. will make the home directory as current directory
C. will ask for the directory to be used as the current
D. will go to the previous directory
(18) nice command is used
A. to increase/decrease execution priority of a command
B. to compress a file
C. to run a programme at latter time
D. to set the key board responce slower
ans : a
(19) What will be the output of the following command sequence
$ x='I am x'
$echo $x
A. I am x B. Blank line C. x D. None of the above
ans :b
(20) The command tr a-z 0-9 < x
A. converts all the digits to lowercase alphabets
B. converts all the lowercase alphabets to digits
C. will give syntax error
D. none of the above
ans :d

Deshaw Interview Questions and Answers: Data Structure and algorithm Interview

Deshaw Interview Questions and Answers: Data Structure and algorithm Interview
1)What is the number of zeros of the product of the first 100 numbers ?
2)A report has 20 sheets each of 55 lines and each line consists of 65 characters. If this report is to be retyped with each sheet having 65 lines and each line of 75 characters wht will be the reduction percent in the pages ?
(a) 22.5 % (b) 35 (c) 25 (d)none
Ans: 25
3)A man driving the car at twice the speed of auto oneday he was driven car for 10 min. and car is failed. he left the car and took auto to goto the office .he spent 30 min. in the auto. what will be the time take by car to go office?
(a) 25 (b) 30 (c) 35 (d) none
Ans: 25
4)Write code for initializing one dimentional and two dimentional array in a C Program?
Ans: I am sure you know this!
5)What is the difference between AWT & Swing?
Ans: Swing is written in Pure Java
AWT components use native code and controls has OS specific look and feel

6)If a number is choosen between 100 and 999 including these numberrs what is the provbabilty that the number selected does not contain a 7 is?
Ans: 18/25 (Check once!)
7)What command is used for knowing our own computer's IP address
Ans: ifconfig - for MAC and LINUX
ipconfig for windows

8)How many no of 4x1 muxes are required for making a 16x1 mux?
Ans: Five
9)Minimum number of IP addresses requiered for a router?
Ans: Two

Deshaw Interview Questions

Deshaw Interview Questions
Question1: Differentiate HTTP and HTTPS
Question2: Discuss ACID properties of a database system.
Question3: Given a table Employee with only one field: Names, report all names with multiple entries.
Question4:Given two sequences s1,s2 and another sequence s3, find if s3 is formed by interleaving s1 and s2.[Example: s1:abcd s2:bcaa s3:abbccdaa].
Question5: If a class B is inherited from a class A, B has a function foo which is also in A, how do you call foo function in A??
Question6: If a class B is inherited public from a class A, what all the variables that can be accesses and those that cannot be.
Question7: List out the additional features of C++ over C when the latter is already available as a good programming language?
Question8: Can classes,protected variables or other features in C++ be implemented using C?
Question9: Define Deadlock
Question20:Given a multi-threaded program How can you make it run on a system that supports only a single thread execution?
Question11:What are the Differences between a const char * and char const *?
Question12:What are the Differences between a reference variable and pointer variable in C++?
Question13:What is a register variable and what are the limitations on it? What is an automatic variable?
Question14:What are the Differences in memory allocation in array and pointer(stack and heap)?
Question15:Find the missing element in a sorted array in most optimum running time (O(log n))

Multithreading vs Multiprocessing,Difference between multithreading and Multiprocessing

Multi-threading refers to an application with multiple threads running within a process, while multi-processing refers to an application organised across multiple OS-level processes.
A thread is a stream of instructions within a process. Each thread has its own instruction pointer, set of registers and stack memory. The virtual address space is process specific, or common to all threads within a process. So, data on the heap can be readily accessed by all threads, for good or ill.
Multi-threading is a more "light weight" form of concurrency: there is less context per thread than per process. As a result thread lifetime, context switching and synchronisation costs are lower. The shared address space (noted above) means data sharing requires no extra work.
Multi-processing has the opposite benefits. Since processes are insulated from each other by the OS, an error in one process cannot bring down another process. Contrast this with multi-threading, in which an error in one thread can bring down all the threads in the process. Further, individual processes may run as different users and have different permissions.

Puzzles to Puzzle you

Assume for a moment that the earth is a perfectly uniform sphere of radius 6400 km. Suppose a thread equal to the length of the circumference of the earth was placed along the equator, and drawn to a tight fit.
Now suppose that the length of the thread is increased by 12 cm, and that it is pulled away uniformly in all directions.
By how many cm. will the thread be separated from the earth's surface?

The cicumference of the earth is
= 2 * PI * r
= 2 * PI * 6400 km
= 2 * PI * 6400 * 1000 m
= 2 * PI * 6400 * 1000 * 100 cm
= 1280000000 * PI cm
where r = radius of the earth, PI = 3.141592654
Hence, the length of the thread is = 1280000000 * PI cm
Now length of the thread is increasd by 12 cm. So the new length is = (1280000000 * PI) + 12 cm
This thread will make one concentric circle with the earth which is slightly away from the earth. The circumfernce of that circle is nothing but (1280000000 * PI) + 12 cm
Assume that radius of the outer circle is R cm
2 * PI * R = (1280000000 * PI) + 12 cm
Solving above equation, R = 640000001.908 cm
Radius of the earth is r = 640000000 cm
Hence, the thread will be separatedfrom the earth by
= R - r cm
= 640000001.908 - 640000000
= 1.908 cm

Some interview Puzzles-2

The sum of their (father, mother and son) ages is 70. The father is 6 times as old as the son. When the sum of their ages is twice 70, the father will be twice as old as the son. How old is the mother?
The mother is 29 years and 2 months old.
Let's assume that son is X years old. Hence, father is 6X years old and mother is (70-7X) years old.
It is given that the sum of their ages is 70, which will total 140 after 70/3 years.
After 70/3 years, son will be (X + 70/3) years old and father will be (6X + 70/3) years old. Also, it is given that after 70/3 years, the father will be twice as old as the son. Thus,
(6X + 70/3) = 2 * (X + 70/3)
6X + 70/3 = 2X + 140/3
4X = 70/3
X = 35/6
Hence, their ages are
Son = X = 35/6 = 5 years and 10 months
Father = 6X = 6(35/6) = 35 years
Mother = (70 - 7X) = 70 - 7(35/6) = 29 years and 2 months

Interview Puzzles-4

Ankit and Tejas divided a bag of Apples between them.
Tejas said, "It's not fair! You have 3 times as many Apples I have." Ankit said, "OK, I will give you one Apple for each year of your age." Tejas replied, "Still not fair. Now, you have twice as many Apples as I have." "Dear, that's fair enough as I am twice older than you.", said Ankit.
Ankit went to Kitchen to drink water. While Ankit was in Kitchen, Tejas took apples from Ankit's pile equal to Ankit's age.
Who have more apples now?

At the end, Ankit and Tejas, both have the same number of apples.
Let's assume that initially Tejas got N apples and his age is T years. Hence, initially Ankit got 3N apples and his age is 2T years.
Operation Ankit's Apples Tejas's Apples
Initially 3N N
Ankit gave T apples to Tejas
(equals age of Tejas) 3N - T N + T
Tejas took 2T apples from Ankit's pile
(equals age of Ankit) 3N - 3T N + 3T
It is given that after Ankit gave T apples to Tejas, Ankit had twice as many apples as Tejas had.
3N - T = 2*(N + T)
3N - T = 2N + 2T
N = 3T
From the table, at the end Ankit have (3N - 3T) apples and Tejas have (N + 3T) apples. Substituting N = 3T, we get
Ankit's apples = 3N - 3T = 9T - 3T = 6T
Tejas's apples = N + 3T = 3T + 3T = 6T
Thus, at the end Ankit and Tejas, both have the same number of apples.

Sample interview Puzzles-2

If a bear eats 65 pounds in fish every day EXCEPT every 6th day which it only eats 45 pounds of fish. If the bear continues this, how many pounds of fish will it eat in 200 days?
The bear will eat 12,340 pounds of fish in 200 days.
It is given that on every 6th day beareats 45 pounds of fish i.e. on day number 6, 12, 18, 24, .... 192, 198 the bear eats 45 pounds of fish.
Total number of 6th days = 200/6 = 33 (the bear eats 45 pounds)
Hence, the normal days are = 200 - 33 = 167 (the bear eats 65 pounds)
Thus, in 200 days, the bear will eat
= (167) * (65) + (33) * (45)
= 10855 + 1485
= 12,340 pounds

Sample interview Puzzles

A person travels on a cycle from home to church on a straight road with wind against him. He took 4 hours to reach there.
On the way back to the home, he took 3 hours to reach as wind was in the same direction. If there is no wind, how much time does he take to travel from home to church?

Let distance between home and church is D.
A person took 4 hours to reach church. So speed while travelling towards church is D/4.
Similarly, he took 3 hours to reach home. So speed while coming back is D/3.
There is a speed difference of 7*D/12, which is the wind helping person in 1 direction, & slowing him in the other direction. Average the 2 speeds, & you have the speed that person can travel in no wind, which is 7*D/24.
Hence, person will take D / (7*D/24) hours to travel distance D which is 24/7 hours.
Answer is 3 hours 25 minutes 42 seconds

Puzzles in Interview-4

There is a safe with a 5 digit number as the key. The 4th digit is 4 greater than the second digit, while the 3rd digit is 3 less than the 2nd digit. The 1st digit is thrice the last digit. There are 3 pairs whose sum is 11.

Find the number.
As per given conditions, there are three possible combinations for 2nd, 3rd and 4th digits. They are (3, 0, 7) or (4, 1, 8) or (5, 2, 9)
It is given that there are 3 pairs whose sum is 11. All possible pairs are (2, 9), (3, 8), (4, 7), (5, 6). Now required number is 5 digit number and it contains 3 pairs of 11. So it must not be having 0 and 1 in it. Hence, the only possible combination for 2nd, 3rd and 4th digits is (5, 2, 9)
Also, 1st digit is thrice the last digit. The possible combinations are (3, 1), (6, 2) and (9, 3), out of which only (6, 2) with (5, 2, 9) gives 3 pairs of 11. Hence, the answer is 65292.

Some interview Puzzles

You are locked inside a room with 6 doors - A, B, C, D, E, F. Out of which 3 are Entrances only and 3 are Exits only.
One person came in through door F and two minutes later second person came in through door A. He said, "You will be set free, if you pass through all 6 doors, each door once only and in correct order. Also, door A must be followed by door B or E, door B by C or E, door C by D or F, door D by A or F, door E by B or D and door F by C or D."
After saying that they both left through door B and unlocked all doors. In which order must you pass through the doors?

The correct order is CFDABE
It is given that one person came in through door F and second person came in through door A. It means that door A and door F are Entrances. Also, they both left through door B. Hence, door B is Exit.
As Exit and Entrance should alter each other and we know two Entrances, let's assume that the third Entrance is W. Thus, there are 6 possibilities with "_" indicating Exit.
(1) _W_A_F (2) _W_F_A (3) _F_W_A (4) _F_A_W (5) _A_W_F (6) _A_F_W
As door A must be followed by door B or E and none of them lead to the door F, (1) and (6) are not possible.
Also, door D must be the Exit as only door D leads to the door A and door A is the Entrance.
(2) _W_FDA (3) _F_WDA (4) _FDA_W (5) DA_W_F
Only door D and door C lead to the door F. But door D is used. Hence, door C must be the Exit and precede door F. Also, the third Exit is B and the W must be door E.
But only door B leads to the door C and both are Exits. Hence, (2) and (5) are not possible. Also, door F does not lead to door B - discard (3). Hence, the possible order is (4) i.e. CFDABE.

Interview Puzzles-3

Four friends - Arjan, Bhuvan, Guran and Lakha were comparing the number of sheep that they owned. It was found that Guran had ten more sheep than Lakha. If Arjan gave one-third to Bhuvan, and Bhuvan gave a quarter of what he then held to Guran, who then passed on a fifth of his holding to Lakha, they would all have an equal number of sheep.How many sheep did each of them possess? Give the minimal possible answer.

Arjan, Bhuvan, Guran and Lakha had 90, 50, 55 and 45 sheep respectively.
Assume that Arjan, Bhuvan, Guran and Lakha had A, B, G and L sheep respectively. As it is given that at the end each would have an equal number of sheep, comparing the final numbers from the above table.
Arjan's sheep = Bhuvan's sheep
2A/3 = A/4 + 3B/4
8A = 3A + 9B
5A = 9B
Arjan's sheep = Guran's sheep
2A/3 = A/15 + B/5 + 4G/5
2A/3 = A/15 + A/9 + 4G/5 (as B=5A/9)
30A = 3A + 5A + 36G
22A = 36G
11A = 18G
Arjan's sheep = Lakha's sheep
2A/3 = A/60 + B/20 + G/5 + L
2A/3 = A/60 + A/36 + 11A/90 + L (as B=5A/9 and G=11A/18)
2A/3 = A/6 + L
A/2 = L
A = 2L
Also, it is given that Guran had ten more sheep than Lakha.
G = L + 10
11A/18 = A/2 + 10
A/9 = 10
A = 90 sheep
Thus, Arjan had 90 sheep, Bhuvan had 5A/9 i.e. 50 sheep, Guran had 11A/18 i.e. 55 sheep and Lakha had A/2 i.e. 45 sheep.

Interview Puzzles-2

A contractor had employed 100 labourers for a flyover construction task. He did not allow any woman to work without her husband. Also, atleast half the men working came with their wives. He paid five rupees per day to each man, four ruppes to each woman and one rupee to each child. He gave out 200 rupees every evening. How many men, women and children were working with the constructor?

16 men, 12 women and 72 children were working with the constructor.
Let's assume that there were X men, Y women and Z children working with the constructor. Hence,
X + Y + Z = 100
5X + 4Y + Z = 200
Eliminating X and Y in turn from these equations, we get
X = 3Z - 200
Y = 300 - 4Z
As if woman works, her husband also works and atleast half the men working came with their wives; the value of Y lies between X and X/2. Substituting these limiting values in equations, we get
if Y = X,
300 - 4Z = 3Z - 200
7Z = 500
Z = 500/7 i.e. 71.428
if Y = X/2,
300 - 4Z = (3Z - 200)/2
600 - 8Z = 3Z - 200
11Z = 800
Z = 800/11 i.e. 72.727
But Z must be an integer, hence Z=72. Also, X=16 and Y=12
There were 16 men, 12 women and 72 children working with the constructor.

Interview Puzzles

There is a 50m long army platoon marching ahead. The last person in the platoon wants to give a letter to the first person leading the platoon. So while the platoon is marching he runs ahead, reaches the first person and hands over the letter to him and without stopping he runs and comes back to his original position. In the mean time the whole platoon has moved ahead by 50m. The question is how much distance did the last person cover in that time. Assuming that he ran the whole distance with uniform speed.
The last person covered 120.71 meters.
It is given that the platoon and the last person moved with uniform speed. Also, they both moved for the identical amount of time. Hence, the ratio of the distance they covered - while person moving forward and backword - are equal.

Let's assume that when the last person reached the first person, the platoon moved X meters forward.
Thus, while moving forward the last person moved (50+X) meters whereas the platoon moved X meters.
Similarly, while moving back the last person moved [50-(50-X)] X meters whereas the platoon moved (50-X) meters.
Now, as the ratios are equal,
(50+X)/X = X/(50-X)
(50+X)*(50-X) = X*X
Solving, X=35.355 meters
Thus, total distance covered by the last person
= (50+X) + X
= 2*X + 50
= 2*(35.355) + 50
= 120.71 meters
Note that at first glance, one might think that the total distance covered by the Last person is 100 meters, as he ran the total lenght of the platoon (50 meters) twice. TRUE, but that's the relative distance covered by the last person i.e. assuming that the platoon is stationary.

Use of getch() function

getch() is used to get a character from console but does not echo to the screen.


int getch(void);

Example Declaration:
char ch;
ch = getch(); (or ) getch();
getch reads a single character directly from the keyboard, without echoing to the screen.

Return Value:
This function return the character read from the keyboard.
Example Program:
void main()
char ch;
ch = getch();
printf("Input Char Is :%c",ch);
Program Explanation:
Here,declare the variable ch as char data type, and then get a value through getch() library function and store it in the variable ch.And then,print the value of variable ch.
During the program execution, a single character is get or read through the getch(). The given value is not displayed on the screen and the compiler does not wait for another character to be typed.And then,the given character is printed through the printf function.

Use of getche() function

Function : getche()
getche() is used to get a character from console, and echoes to the screen.


int getche(void);

Example Declaration:
char ch;
ch = getche();

getche reads a single character from the keyboard and echoes it to the current text window, using direct video or BIOS.

Return Value:
This function return the character read from the keyboard.

Example Program:
void main()
char ch;
ch = getche();
printf("Input Char Is :%c",ch);
Program Explanation:
Here,declare the variable ch as char data type, and then get a value through getche() library function and store it in the variable ch.And then,print the value of variable ch.
During the program execution, a single character is get or read through the getche(). The given value is displayed on the screen and the compiler does not wait for another character to be typed. Then,after wards the character is printed through the printf function.

Use of getchar() function in C

getchar() is used to get or read the input (i.e a single character) at run time.


int getchar(void);

Example Declaration:
char ch;
ch = getchar();

Return Value:
This function return the character read from the keyboard.

Example Program:
void main()
char ch;
ch = getchar();
printf("Input Char Is :%c",ch);
Program Explanation:
Here,declare the variable ch as char data type, and then get a value through getchar() library function and store it in the variable ch.And then,print the value of variable ch.
During the program execution, a single character is get or read through the getchar(). The given value is displayed on the screen and the compiler wait for another character to be typed. If you press the enter key/any other characters and then only the given character is printed through the printf function.

IBM Interview Questions and Answers

IBM Interview Questions and Answers
1 Draw a flowchart to find a number from an array.
2. What is vector processing Subscribe
Ans:A vector processor, or array processor, is a CPU design that is able to run mathematical operations on a large number of data elements very quickly. This is in contrast to a scalar processor which handles one element at a time – the vast majority of CPUs are scalar (or close to it)

3. Best sorting if elements are already sorted Subscribe
Ans:insertion sort is the best sort when the list is already sorted as the no of comparision reduces its complexity is n.quick sort is best when the pivot variable is in the middle of the list

4. Insertion sortSoftware configuration management

5.x-=y+1 is equivalent to..
x=x-y-1 because it is interpreted as x=x-(y+1)

6. What happens when we open a file in r+ mode Subscribe
- 'r+' opens the file for both reading and writing.
- 'r' should be used when the file will only be read.

7. If you get error in adapter which device will u use?

8. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next timeIf you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in . the output will be
a). in a file called list and the error will de typed in a file error out
b). there will be no file called list or error out
c). error will be logged in a file called list and o/p will be in error out
d). you will not be allowed to log in
e).none of the above
Ans: nohup is a Unix command that is used to run another command while suppressing the action of the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. It is most often used to run commands in background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
ans (a) chk it

9. In UNIX, What is files i-node
Ans:It is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.

10. The UNIX shell is....

a).does not come with the rest of the system
b).forms the interface between the user and kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
e) all of the above
Ans b
11 The command
grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile
b) searches for lines containing the pattern first in the files
second, third, and /usr/you/myfile and prints them
c) searches the files /usr/you/myfiel and third for lines containing
the words first or second and prints them
d) replaces the word first with the word second in the files third and /usr/you/myfile
e) None of the above
Ans) b
Q)class xx{
int getseg();
int segDet;
this class may create problem because: reasons are..

Ans: becoa getseg class is private.
Q)What is fork()?
Ans: fork() is a function that is used to create a child process from a parent process.
Q)What are the files in /etc directory?.
Ans: configuration files.
Example: /etc/lilo.conf, /etc/fstab , /etc/mtab , /etc/resolve.conf , /etc/profile, /etc/host.conf etc.
Q) What does the following statement mean?
int (*a)[4]

A. 'a' is a pointer to an array of 4 integers
B. 'a' is an array of pointers to integer
C. 'a' is a pointer to function returning an intege

Q)Which is not is not overloaded?
Ans:The only C operators that can't be are . and ?: (and sizeof, which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except :: and .*.
12 The redirection operators > and >>

a) do the same function
b) differ : > overwrites, while >> appends
c) differ : > is used for input while >> is used for output
d) differ : > write to any file while >> write only to standard output
e) None of these
Ans) b
Q)Read all the Below topics
1 What is the difference between OOP (Object Oriented Programming) and POP (Procedure Oriented Programming).
2 Example of Polymorphism.
3 Why paging, segmentation needed.
4 What is ADT (Abstract Data Type)?
Q)ARP is used for...........
A. map from MAC address to IP add.
B. map from IP addresses to MAC add.
C. to store the IP addresses.

Q) Which of the following API is used to hide a window
a) ShowWindow
b) EnableWindow
c) MoveWindow
d) SetWindowPlacement
e)None of the above
Q) what is pragma exception???
Ans:- Associating a PL/SQL Exception with a Number: Pragma EXCEPTION_INIT
To handle error conditions (typically ORA- messages) that have no predefined name, you must use the OTHERS handler or the pragma EXCEPTION_INIT. A pragma is a compiler directive that is processed at compile time, not at run time.In PL/SQL, the pragma EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That lets you refer to any internal exception by name and to write a specific handler for it. When you see an error stack, or sequence of error messages, the one on top is the one that you can trap and handle.You code the pragma EXCEPTION_INIT in the declarative part of a PL/SQL block, subprogram, or package using the syntaxPRAGMA EXCEPTION_INIT(exception_name, -Oracle_error_number);where exception_name is the name of a previously declared exception and the number is a negative value corresponding to an ORA- error number. The pragma must appear somewhere after the exception declaration in the same declarative section, as shown in the following example:
deadlock_detected EXCEPTION;
PRAGMA EXCEPTION_INIT(deadlock_detected, -60);
... -- Some operation that causes an ORA-00060 error
WHEN deadlock_detected THEN
-- handle the error
Q)Function entry for DLL in win3.1
Ans: WinMain

Q)What type of memory could be accessed in least time?
Ans:CPU registers. The top of the memory pyramid :)
Q)what is data integrity constants?
Ans Oracle uses integrity constraints to prevent invalid data entry into the database. It can be achieved using NOTNULL, Primary Key ,CHECK, Foreign Key etc..... constraints
Q)Paging is ------------------------
Paging is the technique of accessing memory ,larger than the maximum memory which can be addressed by a microprocessor.The interfaced memory is divided into pages such that the size of each page is equal to or less then the maximum memory which can be interfaced. Then whenever a specific address is to be accessed, the corresponding page is selected and the memory location is accessed.
Q) What is trigger in DBMS?
Ans:A Trigger is a PL/SQL block that executes whenever a particular event takes place.events in database like Insert,Update, Delete and combination of these three will cause the trigger to execute.Trigger is a technique to maintain integrity constraints
Q)What is the difference b/w 0123 and 123 in c?
Ans:0123 the number that can be start 0 it will be treated as a octal number that is base 8. 123 is the integer number representation base is 10.
Q) Nice command is used for?
ANS: This is used for change the priority
13 Which of the choices is true for the mentioned declaration ?
const char *p;
char * const p;
a) You can't change the character in both
b) First : You can't change the characterr &
Second : You can;t change the pointer
c) You can't change the pointer in both
d) First : You can't change the pointer &
Second : You can't chanage the character
e) None
Ans) b ( check it)
14) The standard source for standard input , standard output and standard error is
a) the terminal
b) /dev/null
c) /usr/you/input, /usr/you/output/, /usr/you/error respectively
d) NOne
Ans) a
Q The very first process created by the kernal that runs
till the kernal process is haltes is

(Ans is a)
15)which function is the entry point for a DLL in MS Windows 3.1
a) main
b) Winmain
c) Dllmain
d) Libmain
e) None
Ans) b
16)which of the following function is used to repaint a window immediately
a) Sendmessage(hWnd,WM_PAINt,......)
b) InvalidateRect(.......)
c) MoveWindow
e) None
Ans e
17What will be result of the following program?
void myalloc(char *x, int n)
x= (char *)malloc(n*sizeof(char));
char *g="String";
printf("The string is %s",g);
a) The string is : String
b) Run time error/Core dump
c) The string is : Oldstring
d) Syntax error during compilation
e) None of these
Ans) c ( check it )