[email protected] +91 9175287066
This website is always under updation with new contents
Top Companies Interview Questions
Top Companies
Google
Accenture
Adobe
Dinshaw
IBM
Infosys
Microsoft
TCS
Yahoo
Google
Q1) What is the value of i after execution of the following program.
Q2) s->AB A->a B->bbA
Which one is false for above grammer..

Q3) Write a fucntion to multiply 2 N*N matrix. Write test cases for ur code.

Q4) S contains the set of positive integer.Find the largest number c such that c=a+b where a,b,c are distinct number of the set

Q5) If the mean faliure hour is 10,000 and 20 is the mean repair hour.If the printer is used by 100 customer,then find the availability.
1) 80% 2) 90% 3) 98% 4) 99.8% 5) 100%

Q6)In a singly linked list if there is a pointer S on the first element and pointer L is on the last element.Then which operation will take more time based on the lenght of the list.
1)Adding element at the first.
2)adding element at the end of the list.
3)To exchange the fisrt 2 element.
4)Deleting the element from the end of the list.

1. Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeros are allowed.
WWWDOT - GOOGLE = DOTCOM


2. Write a haiku describing possible methods for predicting search traffic seasonality. MathWorld's search engine seemed slowed this May. Undergrads prepping for finals.

3.
1
1 1
2 1
1 2 1 1
1 1 1 2 2 1
What's the next line?
312211. This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on.
See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant.

4. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?
A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.
B) Use the laptop as a digging device to tunnel to the next level.
C) Play MPoRPG until the battery dies along with your hopes.
D) Use the computer to map the nodes of the maze and discover an exit path.
E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].
In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes .

5. What's broken with Unix?
Their reproductive capabilities. How would you fix it? [This exercise is left to the reader. 6. On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:
A) Fawn obsequiously and ask if you can have an autograph.
B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentration
C) Leave her daily offerings of granola and English toffee from the food bins.
D) Quote your favorite formula from the textbook and explain how it's now your mantra.
E) Show her how example 17b could have been solved with 34 fewer lines of code.
[This exercise is left to the reader.]

7. Which of the following expresses Google's over-arching philosophy?
A) "I'm feeling lucky"
B) "Don't be evil"
C) "Oh, I already fixed that"
D) "You should never be more than 50 feet from food"
E) All of the above
[This exercise is left to the reader.]

8. How many different ways can you color an icosahedron with one of three colors on each face?
For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation:
What colors would you choose?
[This exercise is left to the reader.]

9. This space left intentionally blank. Please fill it with something that improves upon emptiness. For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery .

10. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away?
This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks.

11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do?
[This exercise is left to the reader.]

12. In your opinion, what is the most beautiful math equation ever derived? There are obviously many candidates. The following list gives ten of the authors' favorites: 1. Archimedes' recurrence formula : , , ,
2. Euler formula :
3. Euler-Mascheroni constant :
4. Riemann hypothesis: and implies
5. Gaussian integral :
6. Ramanujan's prime product formula:
7. Zeta-regularized product :
8. Mandelbrot set recursion:
9. BBP formula :
10. Cauchy integral formula:
An excellent paper discussing the most beautiful equations in physics is Daniel Z. Freedman's " Some beautiful equations of mathematical physics ." Note that the physics view on beauty in equations is less uniform than the mathematical one. To quote the not necessarily-standard view of theoretical physicist P.A.M. Dirac, "It is more important to have beauty in one's equations than to have them fit experiment."

13. Which of the following is NOT an actual interest group formed by Google employees?
A. Women's basketball
B. Buffy fans
C. Cricketeers
D. Nobel winners
E. Wine club
[This exercise is left to the reader.]

14. What will be the next great improvement in search technology?

15. What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size?
A) 1
B) 3
C) 5
D) 11
E) 24
[This exercise is left to the reader.]

16. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.) This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius'
Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando.

17. Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. What is the next largest n such that f(n)=n?
The following Mathematica code computes the difference between [the cumulative number of 1s in the positive integers up to n] and [the value of n itself] as n ranges from 1 to 500,000:
The solution to the problem is then the first position greater than the first at which data equals 0:
which are the first few terms of sequence A014778 in the On-Line Encyclopedia of Integer Sequences. Checking by hand confirms that the numbers from 1 to 199981 contain a total of 199981 1s:

18. What is the coolest hack you've ever written? While there is no "correct" answer, a nice hack for solving the first problem in the SIAM hundred-dollar, hundred-digit challenge can be achieved by converting the limit into the strongly divergent series: and then using Mathematica's numerical function SequenceLimit to trivially get the correct answer (to six digits), You must tweak parameters a bit or write your own sequence limit to get all 10 digits. [Other hacks are left to the reader.]

19. 'Tis known in refined company, that choosing K things out of N can be done in ways as many as choosing N minus K from N: I pick K, you the remaining.
This simply states the binomial coefficient identity .
Find though a cooler bijection, where you show a knack uncanny, of making your choices contain all K of mine. Oh, for pedantry: let K be no more than half N.
'Tis more problematic to disentangle semantic meaning precise from the this paragraph of verbiage peculiar.

20. What number comes next in the sequence: 10, 9, 60, 90, 70, 66, ?
A) 96
B) 1000000000000000000000000000000000\ 0000000000000000000000000000000000\ 000000000000000000000000000000000
C) Either of the above
D) None of the above

This can be looked up and found to be sequence A052196 in the On-Line Encyclopedia of Integer Sequences, which gives the largest positive integer whose English name has n letters.
For example, the first few terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six, ….
A more correct sequence might be ten, nine, sixty, googol, seventy, sixtysix, ninety-six, googolplex. And also note, incidentally, that the correct spelling of the mathematical term " googol" differs from the name of the company that made up this aptitude test.
The first few can be computed using the NumberName function in Eric Weisstein's
MathWorld packages:
A mathematical solution could also be found by fitting a Lagrange interpolating
Accenture
1) Which is the parameter that is added to every non-static member function when it is called?
Answer: 'this' pointer
2) What is a binary semaphore? What is its use?
Answer: A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.
3) What is thrashing?
Answer: It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.
4) What are turnaround time and response time?
Answer: Turnaround time is the interval between the submission of a job and its completion. Response time is the interval between submission of a request, and the first response to that request.
5) What is data structure?
Answer: A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.
6) List out the areas in which data structures are applied extensively?
Answer: The name of areas are:
Compiler Design,
Operating System,
Database Management System,
Statistical analysis package,
Numerical Analysis,
Graphics,
Artificial Intelligence,
Simulation
7) What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model.
Answer: The major data structures used are as follows:
RDBMS - Array (i.e. Array of structures)
Network data model - Graph
Hierarchical data model - Trees
8) What is the data structures used to perform recursion?
Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
9) Predict the output or error(s) for the following:
void main()
{
int const * p=5;
printf("%d",++(*p));
}
Answer: Compiler error: Cannot modify a constant value.
Explanation: p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
10) main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
Answer:
mmmm
aaaa
nnnn
Explanation:s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally array name is the base address for that array. Here s is the base address. i is the index number/displacement from the base address. So, indirecting it with * is same as s[i]. i[s] may be surprising. But in the case of C it is same as s[i].
11) main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I love U");
else
printf("I hate U");
}
Answer: I hate U
Explanation: For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.
Rule of Thumb: Never compare or at-least be cautious when using floating point numbers with relational operators (== , >, <, <=, >=,!= ).
12) List out few of the Application of tree data-structure?
Answer: The list is as follows:
The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.
13) List out few of the applications that make use of Multi linked Structures?
Answer: The applications are listed below:
Sparse matrix,
Index generation.
14) In tree construction which is the suitable efficient data structure?
Answer: Linked list is the efficient data structure.
15) What is the type of the algorithm used in solving the 8 Queens problem?
Answer: Backtracking
16) In RDBMS, what is the efficient data structure used in the internal storage representation?
Answer: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes.
17) Whether Linked List is linear or Non-linear data structure?
Answer: According to Access strategies Linked list is a linear one.
Adobe
1. What is the difference between Char a[ ]="string" and char *a="String"
2. What is wrong with the code? The code was for conversion from Celsius to Fahrenheit
degF =5/9*(c+32)
3. What are Data breakpoints? Give two scenarios where we make the use of this
4. What do you mean by Bit fields? Give example
5. Write the function for changing a number from hexadecimal to integer htoi(s
6. Compare two binary trees they are same or not.
7. You have N computers and [Ca, Cb] means a is connected to b and this connectivity is symmetric and transitive. then write a program which checks that all computers are interconnected and talk two each other
8. WAP to find Depth of tree program. We were given the structure of the node using that we need to write the code.
9. In binary search we have two comparisons one for greater than and other for less than the mid value. Optimize so that we need to check only once
10. Write the function so that we get the two dimensional array and memory is assigned to it using malloc function.
11) Wap to reverse a linked list and sort the same.
12) Given two integers A & B. Determine how many bits required to convert A to B. Write a function int BitSwapReqd(int A, int B);
13) Write an algorithm to insert a node into sorted linked list. After inserting, the list must be sorted.
14) Without using /,% and * operators. write a function to divide a number by 3. itoa() function is available.
15) Wap to swap two integer pointers.
16) Write a funcn int round (float x) to round off a floating point num to int.
De Shaw
1. what does nodeptr stand for?
2. supposing thaty each integer occupies 4 bytes and each charactrer 1 byte , what is the output of the following programme? ans : 3 3
3. what is the output of the program? ans: nothing (error)
expl: diff struct variables should not assigned using "=" operator.
4.what is the output of the program? ans : 9 6 3 8 5 2 7 4 1
5. howmany times is the printf statement executed for n=10?
ans: zero
expl: Befire reaching to printf statement it will goes to infinite loop.
6.what is the output of the program?
7. output of the program? ans: none
expl: infiniteloop in main ends with ";" . so loop will not reach end; and the DONE also will not print.
8. output of the program? ans:5
expl: here it evaluates as a++ + b.
9. output of the program? ans: 3 4 2
10. which of the following is the correct declaration for the function main() ?
ans: main( int , char *[])
11. if ptr is defined as
int *ptr[][100];
which of the following correctly allocates memory for ptr?
ans: ptr = (int *)(malloc(100* sizeof(int));
1.while((*p++=*q++)!=0){} is equal to
expl: while((*p++=*q++)!='\0'){}
2.the function strcmp(str1,str2) returns
ans: int
3. int *x[](); means
expl: Elments of an array can't be functions.
4.#define PRINT(int) printf("int=%d",int); expl: 0,8,-1 (if second is z)
5. expl: Before using the ptr type struct variable we have to give memory to that . And also when ever the struct variable is ptr then we access the members by "->" operator.
6. o/p =?
ans: 45 ( i.e it takes first argument in
7. ans: 4
8. ans: c
9. ans: no error. But It will over writes on same file.
10. ans: d . Because ";" indicates completion of that statement. so It give error. * Imp: And in above program " a=c/*pointer " statement it considering as starting of comment statement. So , It also causing for syntax error.
11. o/p=?
ans: prints " A "
13. ans: If we take n=5 then ans is 15.
14. when a function is recursively called all , automatic variables are a. stored in stack b . c. d
ans: (a)
15)
16)
19.
20. if the following program (my prog)
21.what is o/p
22)what is the o/p of the program
Write the programs for the following problems in C.
1. swapping two variables x,y without using a temporary variable.
2. a program has been given asking to find the output
ans. it is algorithm for finding G.C.D
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. idea. 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 find whether it is correct from syntax point of view. and if it is correct explain what it will do.(around 15 bits).
ANSWER AS MANY AS POSSIBLE.
6. write a c program to find whether a stack is progressing in forward or reverse direction.
7. write a c program that reverses the linked list.
IBM
1.What is the difference between C and Java?
Ans:
1.JAVA is Object-Oriented while C is procedural.
2.Java is an Interpreted language while C is a compiled language.
3.C is a low-level language while JAVA is a high-level language.
4.C uses the top-down approach while JAVA uses the bottom-up approach.
5.Pointer go backstage in JAVA while C requires explicit handling of pointers.
2.What is the difference between array and pointer?
Ans: Pointer is a variable in a program is something with a name, the value of which can vary. The way the compiler and linker handles this is that it assigns a specific block of memory within the computer to hold the value of that variable.
An array is a conceptual data representation consisting of a list of more than one item of a particular scalar type (int, float, char, structure, etc.) where each element is accessed by its index.3.What is the difference between Strings and Arrays?
- String can hold only char data. Where as an array can hold any data type.
- An array size can not be changed. Where as a string size can be changed if it is a char pointer
- The last element of an array is an element of the specific type. The last character of a string is a null – ‘\0’ character.
- The length of an array is to specified in [] at the time of declaration (except char[]). The length of the string is the number of characters + one (null character).
3.What is Recursion Function?
Ans:
a) A recursive function is a function which calls itself.
b) The speed of a recursive program is slower because of stack overheads. (This attribute is evident if you run above C program.
c) A recursive function must have recursive conditions, terminating conditions, and recursive expressions.
5.Diffrence between default and copy constructor?
4.What are abstract class?
Ans: An abstract class is a class which does not fully represent an object. Instead, it represents a broad range of different classes of objects. However, this representation extends only to the features that those classes of objects have in common. Thus, an abstract class provides only a partial description of its objects
5.Define Deadlock?
Ans: In an operating system, a deadlock is a situation which occurs when a process enters a waiting state because a resource requested by it is being held by another waiting process, which in turn is waiting for another resource. If a process is unable to change its state indefinitely because the resources requested by it are being used by other waiting process, then the system is said to be in a deadlock.
6.What is linked list?
Ans : Linked list is one of the fundamental data structures, and can be used to implement other data structures. In a linked list there are different numbers of nodes. Each node is consists of two fields. The first field holds the value or data and the second field holds the reference to the next node or null if the linked list is empty.
7.What is the difference bet do loop & do while loop?
Ans: The difference between a "do ...while" loop and a "while {} " loop is that the while loop tests its condition before execution of the contents of the loop begins; the "do" loop tests its condition after it's been executed at least once. As noted above, if the test condition is false as the while loop is entered the block of code is never executed. Since the condition is tested at the bottom of a do loop, its block of code is always executed at least once.10.What is polymorphism & inheritance property? Polymorphism is the ability to use an operator or function in different ways. Polymorphism gives different meanings or functions to the operators or functions. Poly, referring to many, signifies the many uses of these operators and functions. A single function usage or an operator functioning in many ways can be called polymorphism. Polymorphism refers to codes, operations or objects that behave differently in different contexts.
8.What is OOPS concept?
Ans: Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance. Many modern programming languages now support OOP, at least as an option.
9.What are dynamic and static memory location?
Ans: The allocation of memory for the specific fixed purposes of a program in a predetermined fashion controlled by the compiler is said to be static memory allocation. The allocation of memory (and possibly its later deallocation) during the running of a program and under the control of the program is said to be dynamic memory allocation.
10.Write a program in C to sort a list of numbers in ascending order?
11.Write a program in java to print the odd no. between 1 to 100?
12.What is the differentiate b/w analog and digital communication?
13.What is the difference between Truncate and Delete?
14.What is the difference between DBMS and RDBMS?
15.What are the advantages of SQL?
These are the advantages of PL/SQL.
* Block Structures: PL SQL consists of blocks of code, which can be nested within each other. Each block forms a unit of a task or a logical module. PL/SQL Blocks can be stored in the database and reused.
*Procedural Language Capability: PL SQL consists of procedural language constructs such as conditional statements (if else statements) and loops like (FOR loops).
*Better Performance: PL SQL engine processes multiple SQL statements simultaneously as a single block, thereby reducing network traffic.
* Error Handling: PL/SQL handles errors or exceptions effectively during the execution of a PL/SQL program. Once an exception is caught, specific actions can be taken depending upon the type of the exception or it can be displayed to the user with a message. Hide data complexity
16.What is the difference between Dbms and OODbms?
17.Difference between SQL and PL /SQL?
18.Difference between DBMS and File System
19.What is the basic difference between a Join and a Union?
* Union:
It combines the results of two or more queries into a single result set consisting of all the rows belonging to all queries in the union. Basic Rules:
The number and the order of the columns must be the same in all queries.
The data types must be compatible.
*Join:
To retrieve data from two tables or more than two tables then use joins.
Types: Inner Join, Outer Join(Right outer join, left outer join), cross join, Equi join, Self join.
The number and the order of the columns need not be the same in all queries.
20.what is a root?
"root" refers to the top-level directory of a file system. The word is derived from a tree root, since it represents the starting point of a hierarchical tree structure. The folders within the tree represent the branches, while the actual files are considered the leaves. However, unlike a real life tree, a data tree can be visualized upside down, with the root at the top and directories and subdirectories spanning downward.
The root node of a file system is also called the root directory. On a Windows-based PC, "C:\" represents the root directory of the C drive.
If you ever use a terminal program to view files and folders on a computer, you can use the command "cd /" (change directory to root) to navigate to the root directory. "Root" is also the name of the user who has administrative privleges on a Unix or Linux server.
Infosys
1.What are the 4 basics of OOP?
Abstraction, Inheritance, Encapsulation, and Polymorphism.
2.What you mean by Object Relational DBMS?
An object-relational database (ORD), or object-relational database management system (ORDBMS), is a database management system (DBMS) similar to a relational database, but with an object-oriented database model: objects, classes and inheritance are directly supported in database schemas and in the query language. In addition, just as with proper relational systems, it supports extension of the data model with custom data-types and methods.
3. Structural difference between bitmap and b-tree index ?
4.what is database Schema?
The formal definition of database schema is a set of formulas (sentences) called integrity constraints imposed on a database.
5.what are the different levels of database schema?
Conceptual schema- a map of concepts and their relationships.
Logical schema- a map of entities and their attributes and relations
Physical schema- a particular implementation of a logical schema
Schema object- Oracle database object
6. what is difference between foreign key and reference key ?
Reference Key is the primary key that is referenced in the other table (linked via the other tables Foreign Key). Foreign Key is how you link the second table to the primary tables Primary Key (or Reference Key).
7. Tell me about DSN?
A Data Source Name (DSN) is the logical name that is used by Open Database Connectivity (ODBC) to refer to the drive and other information that is required to access data. The name is used by Internet Information Services (IIS) for a connection to an ODBC data source, such as a Microsoft SQL Server database. To set this name, use the ODBC tool in Control Panel.
click->start in control panel->double click Administative Tool->click ODBC data source->click System DSN tab->click Add
8.Difference between Clustered index and non clustered index ?
Clustered Index
Only one per table
Faster to read than non clustered as data is physically stored in index order
Non Clustered Index
Can be used many times per table
Quicker for insert and update operations than a clustered index
9 What is the difference between an EXE and a DLL?
The term EXE is a shortened version of the word executable as it identifies the file as a program. On the other hand, DLL stands for Dynamic Link Library, which commonly contains functions and procedures that can be used by other programs.
10.Scenarios in which web application should be used and desktop application should be used?
11.Tell how to check whether a linked list is circular.
Create two pointers, each set to the start of the list. Update each as follows:
while (pointer1) {
pointer1 = pointer1->next;
pointer2 = pointer2->next;
if (pointer2) pointer2=pointer2->next;
if (pointer1 == pointer2) {
print ("circular\n");
}
}
12.Why is it difficult to store linked list in an array?
13.what is the difference between socket and session?
14.What is a default gateway?
15.What is SMTP?
16.What is an interrupt?
17.What is debugger?
18.What port does telnet use?
19.Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions.
20.Define Data Abstraction. What is its importance?
Microsoft
1.What is the difference between a class and object?
2.Find the intersection of two linked lists.
3.How do you sort a linked list using the most efficient algorithm?
4. What is stored procedure? What are its advantages and disavantages?
5. Which is better trigger or stored procedure?
6.How to test a calculator?
7.Write a procedure to shuffle cards, and also mention strengths and shortcomings of your approach
8. Differnce between interfaces and abstract classes?
9.Validate a Binary search tree? ( as in the left- right child follow the property )
10.Print the binary tree in zig-zag order.
11.Sorting problem. About array
12.Whats the difference b/w a thread and a process? are Word and PowerPoint different processes or threads of a single process?
13.How does a spell checker routine (common to both, word and PowerPoint) used?
14.Design Memory Management System
15.Give all possible test cases to test the basic features of a mobile.
16. In unix there is a command called "tail". Implement that command in C.
17. Some questions about race condition (OS)
18. Questions related to semaphores.
19. Questions related to mutex. Applications of mutex. How to implement mutex in OS?
20. What is difference between data set and data reader?(.net)
21. Write a querry for accesing unique rows from emp(Ename,Age) sorted by age?
22. What is the difference between Function overloading, Function Overriding and Virtual Functions?
23. Difference between multiple and multilevel inheritence?
24. Questions about Critical region (OS).
25. Problem to find median of two shorted arrays
26. How to ensure that race condition doesn't occur. Give your view as you are OS designer.
27. How to ensure that each process lock the critical region before they enter in it. As OS designer How will you force the process to do this?
28. Questions on IPC
29. Questions on Shared memory and Message passing mechanism.
30. Difference between system call and API call
31. How system call works? What happens when system call is invoked?
32. Remove a node from Linked list when address of same node is given
33. Different types of system calls?
34. Some questions from microprocessor. About Interrupts
35. Types of Interrupts. What happened when interrupt is called?
36. Given a set of strings. Check if a new string is equal to any of them. Here equal means the letters are the same, like abbc=bacb
37. You are given a hard copy of a program which contains some errors. Your job is to find all types of errors from it. And discuss why is it an error. Write correct program for the same.
38. You are given a linked list and a number n. You also have a function to delete all nodes from that list which are at position which multiple of n in the list.
39. Given a string, search it in a set of strings (say among 1000s of string). What data structure would you use to store those 1000 strings and get the results fastest?
40. Reverse a linked list?
41. Find if there is a loop in a linked List?
42. Given two arrays of numbers, find if each of the two arrays have the same set of integers ? Suggest an algo which can run faster than NlogN ?
43. Questions on Java. Exception handling
44. Need of catch and finally block in Java exception handling.
45. How will you create your own exception.. Explain with example.
46. Some questions on compiler construction. What is parser? What is input to the parser and what is output of parser? Difference between top down and bottom up parser.
47. Write an algorithm to find the depth of a binary tree
48. Develop recursive program.
F(1) = 1.
F(2n) = F (n) and F(2n+1) = F(n) + F(n+1).
49.Write an algorithm to separate all zeroes and ones in an array
50.How to detect the starting point of loop in a linked list which has a loop
TCS
1. The C language terminator is
(a) semicolon
(b) colon
(c) period
(d) exclamation mark
2. What is false about the following -- A compound statement is
(a) A set of simple statements
(b) Demarcated on either side by curlybrackets
(c) Can be used in place of simple statement
(d) A C function is not a compound statement.
3. What is true about the following C Functions
(a) Need not return any value
(b) Should always return an integer
(c) Should always return a float
(d) Should always return more than one value
4. Main must be written as
(a) The first function in the program
(b) Second function in the program
(c) Last function in the program
(d) Any where in the program
5. Which of the following about automatic variables within a function is correct ?
(a) Its type must be declared before using the variable
(b) They are local
(c) They are not initialized to zero
(d) They are global
6. Write one statement equivalent to the following two statements: x=sqr(a);return(x); Choose from one of the alternatives
(a) return(sqr(a));
(b) printf("sqr(a)");
(c) return(a*a*a);
(d) printf("%d",sqr(a));
7. Which of the following about the C comments is incorrect ?
(a) Comments can go over multiple lines
(b) Comments can start any where in the line
(c) A line can contain comments with out any language statements
(d) Comments can occur within comments
8. What is the value of y in the following code?
x=7;
y=0;
if(x=6) y=7;
else y=1;
(a) 7 (b) 0 (c) 1 (d) 6
9. Read the function conv() given below
conv(int t)
{
int u;
u=5/9 * (t-32);
return(u);
}
What is returned
(a) 15 (b) 0 (c) 16.1 (d) 29
10. Which of the following represents true statement either x is in the range of 10 and 50 or y is zero
(a) x >= 10 && x <= 50 || y = = 0
(b) x<50
(c) y!=10 && x>=50
(d) None of these
11. Which of the following is not an infinite loop ?
(a) while(1)\{ ....} (b) for(;;){...}
(c) x=0;
(d) # define TRUE 0
do{
/*x unaltered within the loop*/
}while(x = = 0);
while(TRUE){ ....}
12. What does the following function print?
func(int i)
{
if(i%2)return 0;
else return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);
} (a) 3 (b) 1 (c) 0 (d) 2
13. How does the C compiler interpret the following two statements
p=p+x;
q=q+y;
(a) p= p+x;
(b) p=p+xq=q+y;
(c) p= p+xq;
(d) p=p+x/q=q+y; q=q+y; q=q+y;
18. Read the following code
# define MAX 100
# define MIN 100
if(x>MAX)
x=1;
else if(x x=-1;
x=50;
if the initial value of x=200,what is the value after executing this code?
(a) 200 (b) 1 (c) -1 (d) 50
19. A memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed:
s="Entrance"
l=strlen(s);
what is the value of l ?
(a)20 (b)8 (c)9 (d)21
20. Given the piece of code
int a[50];
int *pa;
pa=a;
To access the 6th element of the array which of the following is incorrect?
(a) *(a+5) (b) a[5] (c) pa[5] (d) *(*pa + 5}
21. Consider the following structure:
struct num nam
{
int no;
char name[25];
}
struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};
printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);
What does the above statement print?
(a) 8,9 (b) 9,9 (c) 8,8 (d) 8, unpredictable value
22. Identify the in correct expression
(a)a=b=3=4;
(b)a=b=c=d=0;
(c)float a=int b= 3.5;
(d)int a; floatb;a=b=3.5;
23. Regarding the scope of the varibles;identify the incorrect statement:
(a) automatic variables are automatically initialized to 0
(b) static variables are areautomatically initialized to 0
(c) the address of a register variable is not accessible
(d) static variables cannot be initialized with any expression
24. cond 1?cond 2?cond 3?:exp 1:exp 2:exp 3:exp 4; is equivalent to which of the following?
25. The operator for exponentiation is
(a) ** (b) ^ (c) % (d) not available
26. Which of the following is invalid
(a) a+=b (b) a*=b (c) a>>=b (d) a**=b
27. What is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
else y=8;
(a)9 (b)8 (c)6 (d)7
28. What does the following code do?
fn(int n, int p, int r)
{
static int a=p;
switch(n)
{
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
(a) computes simple interest for one year
(b) computes amount on compoundinterest for 1 to 4 years
(c) computes simple interest for four year
(d) computes compound interest for 1year
29.
a=0;
while(a<5)
printf("%d\n",a++);
How many times does the loop occurs?
(a) infinite (b)5 (c)4 (d)6
30. How many times does the loop iterated ?
for(i=0;i=10;i+=2)
printf("Hi\n");
(a)10 (b) 2 (c) 5 (d) None of these
31. What is incorrect among the following A recursive function
(a) calls itself
(b) is equivalent to a loop
(c) has a termination condition
(d) does not have a return value at all
32. Which of the following go out of the loop if expn 2 becoming false
(a) while(expn 1)\{...if(expn 2)continue;}
(b) while(!expn 1)\{if(expn 2)continue;...}
(c) do{..if(expn 1)continue;..}while(expn 2); (d) while(!expn 2)\{if(expn 1)continue;..\}
33. Consider the following program
34.Pick out the odd one out
(a) malloc() (b) calloc() (c) free() (d) realloc()
35.Consider the following program
36.
37.Consider the following program segment
38. Identify the incorrect one
39. The format specified for hexa decimal is (a) %d (b) %o (c) %x (d) %u
40. Find the output of the following program
41.Consider the following C code
42. Int *a[5] refers to
(a) array of pointers
(b) pointer to an array
(c) pointer to apointer
(d) none of these
Yahoo
1. How to call a C++ function which is compiled with C++ compiler in C code?
2. When you deliver your C++ headers and C++ library of a class (what all can you change in the
class so that application using your class does not need to recompile the code)
3. How do you initialize a static member of a class with return value of some function?
4. How can one application use same API provided by different vendors at the same time?
5. If you are given the name of the function at run time how will you invoke the function?
6. When will you use shell script/Perl ahead of C/C++?
7. How does yahoo handles billions of requests, does it create a thread per request or a rocess?
8. How does HTTP works?
9. How to count number of unique music titles downloaded from a log file which
contains an entry of all music title downloaded?
10. What is the difference between COM and CORBA?
11. What is web service?
12. Design classes for the following problem. (C++)
A Customer Can have multiple bank accounts A Bank account can be owned by multiple customers When customer logs in he sees list of account, on clicking on an account he sees list of transactions.
13. Algorithm to partition set of numbers into two s.t. diff bw their sum is min and they hav equal num of elements
14. Prog: given Numerator & Denominator.... print 0.3333333333 as .(3) 0.123123 as .(123)
15. What is the output of the following code?
x=0;y=1;
for( j=1;j<4;j++){
x=x+j;
y*=j;
}
16. There is a 200 miles long tunnel. one train enters the tunnel at a speed of 200mph while the other trains enter the tunnel in the opposite direction at a speed of 1000 mph. A bee travels at a speed of 1500 mph enters the tunnel goes to and back until it reaches the train. What is the distance covered by the bee when the two train collides (the bee survives)
17. List the two advantages of views.
18. Which layer is encryption and decryption done
19. What are the various modes used to send data over the network
20. Write a query to display the name of the students whose total marks is divisible by 25(total marks may be 175,200,150 ….)
21. How do you find the port number of the remote host?
22. (Date; who)>logfile
Date; who>logfile
What is the difference between the two statements.
23. How do you find the machine MAC address
24. Write the set operators that are used for select.
25. Write a single command to find and delete all the files that are older than 1 day(modification time)
26. A is a 3*4 matrix and B is 4*5 matrix. What is the number of additions and multiplications performed to obtain the resultant matrix
27. What is the output
#!/bin/perl
kill -0 pid
28. #!/bin/perl
echo $_
29. #!/bin/perl
kill $$
echo "hello world"
30. List different schema/database objects
31. Randomization is good for which algorithm(quick sort, heap sort, selection sort, hashed table, ….)
32. Descride the language in the following regular expression (a*a) b+b
33. In an I‐node what is not there (file type, file name, size, owner)
34. If the probability of work done by three persons are 1/3, 2/5, 5/12. Then what is the probability that the work is completed.
35. Given Id, author, creation time, size, links, web page, description Bring it in 2nd normal form
36. Consider a heap containing numbers 10, 20, 30, 40, 80, 60, 70 such that numbers are in ascending order from the leaf to the root. If 25 is to be inserted what is the position.(A[1], A[2], A[3], A[4])
For accessing computer programs go to TECHNOLOGY