C - QUESTIONS


1. Difference between arrays and pointers?
- Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them

- Arrays use subscripted variables to access and manipulate data.Array variables can be equivalently written using pointer expression.

2. What are the advantages of the functions?

Answer – Debugging is easier

- It is easier to understand the logic involved in the program
- Testing is easier
- Recursive call is possible
- Irrelevant details in the user point of view are hidden in functions
- Functions are helpful in generalizing the program

3 How can I open a file so that other programs can update it at the same time?

Answer
Your C compiler library contains a low-level file function called sopen() that can be used to open a file in shared mode. Beginning with DOS 3.0, files could be opened in shared mode by loading a special program named SHARE.EXE. Shared mode, as the name implies, allows a file to be shared with other programs as well as your own.

Using this function, you can allow other programs that are running to update the same file you are updating.

The sopen() function takes four parameters: a pointer to the filename you want to open, the operational
mode you want to open the file in, the file sharing mode to use, and, if you are creating a file, the mode to create the file in. The second parameter of the sopen() function, usually referred to as the “operation flag”parameter, can have the following values assigned to it:

Constant Description O_APPEND Appends all writes to the end of the file

O_BINARY Opens the file in binary (untranslated) mode
O_CREAT If the file does not exist, it is created
O_EXCL If the O_CREAT flag is used and the file exists, returns an error
O_RDONLY Opens the file in read-only mode
O_RDWR Opens the file for reading and writing
O_TEXT Opens the file in text (translated) mode
O_TRUNC Opens an existing file and writes over its contents
O_WRONLY Opens the file in write-only mode

The third parameter of the sopen() function, usually referred to as the “sharing flag,” can have the following values assigned to it:

Constant Description
SH_COMPAT No other program can access the file
SH_DENYRW No other program can read from or write to the file
SH_DENYWR No other program can write to the file
SH_DENYRD No other program can read from the file
SH_DENYNO Any program can read from or write to the file

If the sopen() function is successful, it returns a non-negative number that is the file’s handle. If an error occurs, –1 is returned, and the global variable errno is set to one of the following values:

Constant Description
ENOENT File or path not found
EMFILE No more file handles are available
EACCES Permission denied to access file
EINVACC Invalid access code
Constant Description

4. Can static variables be declared in a header file?

You can’t declare a static variable without defining it as well (this is because the storage class modifiers static and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header file to have its own private copy of the variable, which is probably not what was intended.

6.How can you check to see whether a symbol is defined?

You can use the #ifdef and #ifndef preprocessor directives to check whether a symbol has been defined
(#ifdef) or whether it has not been defined (#ifndef).

7.How do you override a defined macro?

Answer
You can use the #undef preprocessor directive to undefine (override) a previously defined macro.

10. Can a variable be both const and volatile?
Yes. The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed by means outside this code. For instance, in the example in FAQ 8, the timer structure was accessed through a volatile const pointer. The function itself did not change the value of the timer, so it was declared const. However, the value was changed by hardware on the computer, so it was declared volatile. If a variable is both const and volatile, the two modifiers can appear in either order.
11. Can include files be nested?
Yes. Include files can be nested any number of times. As long as you use precautionary measures , you can avoid including the same file twice. In the past, nesting header files was seen as bad programming practice, because it complicates the dependency tracking function of the MAKE program and thus slows down compilation. Many of today’s popular compilers make up for this difficulty by implementing a concept called precompiled headers, in which all headers and associated dependencies are stored in
a precompiled state.
Many programmers like to create a custom header file that has #include statements for every header needed for each module. This is perfectly acceptable and can help avoid potential problems relating to #include files, such as accidentally omitting an #include file in a module.

12. Can static variables be declared in a header file?
Yes there is difference between declaring a static variable as global and local. If it is local, it can be accessed only in the function where it’s declared. But if it is global, all functions can access it. But, what ever be the case, its value will be retained between functions.

13. When does the compiler not implicitly generate the address of the first element of an array?

Whenever an array name appears in an expression such as

- array as an operand of the sizeof operator

- array as an operand of & operator

- array as a string literal initializer for a character array

Then the compiler does not implicitly generate the address of the address of the first element of an array.

14.What is the difference between #include and #include “file”?

When writing your C program, you can include files in two ways. The first way is to surround the file you
want to include with the angled brackets < and >. This method of inclusion tells the preprocessor to look for the file in the predefined default location. This predefined default location is often an INCLUDE environment variable that denotes the path to your include files. For instance, given the INCLUDE variable

INCLUDE=C:\COMPILER\INCLUDE;S:\SOURCE\HEADERS;

using the #include version of file inclusion, the compiler first checks the C:\COMPILER\INCLUDE
directory for the specified file. If the file is not found there, the compiler then checks the
S:\SOURCE\HEADERS directory. If the file is still not found, the preprocessor checks the current directory.

The second way to include files is to surround the file you want to include with double quotation marks. This method of inclusion tells the preprocessor to look for the file in the current directory first, then look for it in the predefined locations you have set up. Using the #include “file” version of file inclusion and applying it to the preceding example, the preprocessor first checks the current directory for the specified file. If the file is not found in the current directory, the C:COMPILERINCLUDE directory is searched. If the file is still not found, the preprocessor checks the S:SOURCEHEADERS directory.
The #include method of file inclusion is often used to include standard headers such as stdio.h or
stdlib.h. This is because these headers are rarely (if ever) modified, and they should always be read from your compiler’s standard include file directory.

The #include “file” method of file inclusion is often used to include nonstandard header files that you have created for use in your program. This is because these headers are often modified in the current directory, and you will want the preprocessor to use your newly modified version of the header rather than the older, unmodified version.

15.When function say abc() calls another function say xyz(), what happens in stack?
When some function xyz() calls function abc(). all the local variables, static links, dynamic links and function return value goes on the top of all elements of function xyz() in the stack. when abc() exit it’s return value has been assigned to xyz().

16.How do you print an address?
we can print the address of a variable or a function using the following specifiers %u,%p here %u prints address in decimal form and %p prints in hexa decimal form,but remember these two format specifiers print only offset adress but they doesn’t print code segment address

there is a another specifier %Fp which prints both the code segment and offset address

18.How to find entered number is EVEN or ODD without using conditional statement(not using if.. else,if.. , else if..,while, do… while…., for….)
We can find a number is odd or even by a simple programmain(){int a[2],i;a[0]=0; //0–means Even Numbera[1]=1; //1–means Odd numberscanf(”%d”,&i);printf(”%d”,a[i%2]);getch();}

19.How to break cycle in circular single link list?
we can delete an intermediate one

20.How can I convert a number to a string?
We can convert number to string using built in function itoa().

21.How to swap the content oftwo variables without a temporary variable
void swap(int a,int b)

{

a =a+b;

b=a-b;

a=a-b;

}

22. How can send unlimited no of arguments to a function, eg printf function can take any no of arguments

using va_list variables in stdarg.h headerfile

23.What is the benefit of using #define to declare a constant?
Using the #define method of declaring a constant enables you to declare a constant in one place and use it throughout your program. This helps make your programs more maintainable, because you need to maintain only the #define statement and not several instances of individual constants throughout your program.

For instance, if your program used the value of pi (approximately 3.14159) several times, you might want to declare a constant for pi as follows:

#define PI 3.14159

Using the #define method of declaring a constant is probably the most familiar way of declaring constants to traditional C programmers. Besides being the most common method of declaring constants, it also takes up the least memory. Constants defined in this manner are simply placed directly into your source code, with no variable space allocated in memory. Unfortunately, this is one reason why most debuggers cannot inspect constants created using the #define method.

24.How do you write a C program which can calculate lines of code but not counting comments?

Using file concept with Command line arguments.declare a variable (lcnt) used to count the no of lines.Open a file in read made and then using while loop check the condition for not equal to EOF.Later using if condition check check for new line and increment the variable for counting the lines.

Then using while,check for the character ‘/’,'*’ (as the comments start with these characters) and end with (’*’ and ‘/’).if condition of this is true then break and come out of the block else increment the line.

25.How can I search for data in a linked list?

Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient.

26.How to write a C program to find the power of 2 in a normal way and in single step?

U can take logarithm base 2, and check the result is in interger form or floating point form, u can check whether it is power of 2 or not.

27.What is hashing?
To hash means to grind up, and that’s essentially what hashing is all about. The heart of a hashing algorithm is a hash function that takes your nice, neat data and grinds it into some random-looking integer.

The idea behind hashing is that some data either has no inherent ordering (such as images) or is expensive to compare (such as images). If the data has no inherent ordering, you can’t perform comparison searches.

If the data is expensive to compare, the number of comparisons used even by a binary search might be too many. So instead of looking at the data themselves, you’ll condense (hash) the data to an integer (its hash value) and keep all the data with the same hash value in the same place. This task is carried out by using the hash value as an index into an array.

To search for an item, you simply hash it and look at all the data whose hash values match that of the data you’re looking for. This technique greatly lessens the number of items you have to look at. If the parameters are set up with care and enough storage is available for the hash table, the number of comparisons needed to find an item can be made arbitrarily close to one.

One aspect that affects the efficiency of a hashing implementation is the hash function itself. It should ideally distribute data randomly throughout the entire hash table, to reduce the likelihood of collisions. Collisions occur when two different keys have the same hash value. There are two ways to resolve this problem. In “open addressing,” the collision is resolved by the choosing of another position in the hash table for the element inserted later. When the hash table is searched, if the entry is not found at its
hashed position in the table, the search continues checking until either the element is found or an empty position in the table is found

The second method of resolving a hash collision is called “chaining.” In this method, a “bucket” or linked list holds all the elements whose keys hash to the same value.

When the hash table is searched, the list must be searched linearly.

28.Diffence arrays and pointers?

To access data using pointers we use the *.

to access data stored in array we use indexes such as a[0].

30.Can a variable be both const and volatile?

This is possible and mostly used in embedded system.The example is Interrupt Status Register.As it is a status register , in the program we should not modify this variable.So it should be a constant.But this variable can be changed by the processor or hardware based on the interrupt condition.So when in the program ,we want to read the value of this varible , it should read the actual value with out any optimisation.For this reason ,the variable can be declared as volatile too

31.Why should we assign NULL to the elements (pointer) after freeing them?

Answer
This is paranoia based on long experience. After a pointer has been freed, you can no longer use the pointed-to data. The pointer is said to “dangle”; it doesn’t point at anything useful. If you “NULL out” or “zero out” a pointer immediately after freeing it, your program can no longer get in trouble by using that pointer. True, you might go indirect on the null pointer instead, but that’s something your debugger might be able to help you with immediately. Also, there still might be copies of the pointer that refer
to the memory that has been deallocated; that’s the nature of C. Zeroing out pointers after freeing them won’t solve all problems;

32.What is a “null pointer assignment” error? What are bus errors, memory faults, and core dumps?
These are all serious errors, symptoms of a wild pointer or subscript.

Null pointer assignment is a message you might get when an MS-DOS program finishes executing. Some
such programs can arrange for a small amount of memory to be available “where the NULL pointer points to” (so to speak). If the program tries to write to that area, it will overwrite the data put there by the compiler.

When the program is done, code generated by the compiler examines that area. If that data has been changed, the compiler-generated code complains with null pointer assignment.

This message carries only enough information to get you worried. There’s no way to tell, just from a null
pointer assignment message, what part of your program is responsible for the error. Some debuggers, and some compilers, can give you more help in finding the problem.

Bus error: core dumped and Memory fault: core dumped are messages you might see from a program running under UNIX. They’re more programmer friendly. Both mean that a pointer or an array subscript was wildly out of bounds. You can get these messages on a read or on a write. They aren’t restricted to null pointer problems.

The core dumped part of the message is telling you about a file, called core, that has just been written in your current directory. This is a dump of everything on the stack and in the heap at the time the program was running. With the help of a debugger, you can use the core dump to find where the bad pointer was used.

That might not tell you why the pointer was bad, but it’s a step in the right direction. If you don’t have write permission in the current directory, you won’t get a core file, or the core dumped message.

33.What are storage class in c

Answer
There r of 4 type of storage class in C

static

auto

register

extern

34.Following declarations are different from one another
const char *const s;
char const *const s;

Answer
There is no difference between the two declarations.

35.When should a type cast be used?
There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly.

The second case is to cast pointer types to and from void * in order to interface with functions that expect or return void pointers. For example, the following line type casts the return value of the call to malloc() to be a pointer to a foo structure.

struct foo *p = (struct foo *) malloc(sizeof(struct foo));

36.What is a null pointer?

There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in , has a value that’s guaranteed to be different from any valid pointer. NULL is a literal zero, possibly cast to void* or char*. Some people, notably C++ programmers, prefer to use 0 rather than NULL.

The null pointer is used in three ways:

1) To stop indirection in a recursive data structure

2) As an error value

3) As a sentinel value

36.What is a const pointer?
There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from unintended modifications such as assignment of new address, pointer arithmetic, etc. In fact, an object’s this is a constpointer. A constant pointer is declared:

37.when should the volatile modifier be used?
The volatile modifier is a directive to the compiler’s optimizer that operations involving this variable should not be optimized in certain ways. There are two special cases in which use of the volatile modifier is desirable. The first case involves memory-mapped hardware (a device such as a graphics adaptor that appears to the computer’s hardware as if it were part of the computer’s memory), and the second involves shared memory (memory used by two or more programs running simultaneously).

Most computers have a set of registers that can be accessed faster than the computer’s main memory. A good compiler will perform a kind of optimization called “redundant load and store removal.” The compiler looks for places in the code where it can either remove an instruction to load data from memory because the value is already in a register, or remove an instruction to store data to memory because the value can stay in a register until it is changed again anyway.

If a variable is a pointer to something other than normal memory, such as memory-mapped ports on a
peripheral, redundant load and store optimizations might be detrimental. For instance, here’s a piece of code that might be used to time some operation:

time_t time_addition(volatile const struct timer *t, int a)
{
int n;
int x;
time_t then;
x = 0;
then = t->value;
for (n = 0; n < 1000; n++) { x = x + a; } return t->value – then;
}

In this code, the variable t->value is actually a hardware counter that is being incremented as time passes. The function adds the value of a to x 1000 times, and it returns the amount the timer was incremented by while the 1000 additions were being performed. Without the volatile modifier, a clever optimizer might assume that the value of t does not change during the execution of the function, because there is no statement that explicitly changes it. In that case, there’s no need to read it from memory a second time and subtract it, because the answer will always be 0. The compiler might therefore “optimize” the function by making it always return 0.

If a variable points to data in shared memory, you also don’t want the compiler to perform redundant load and store optimizations. Shared memory is normally used to enable two programs to communicate with each other by having one program store data in the shared portion of memory and the other program read the same portion of memory. If the compiler optimizes away a load or store of shared memory, communication between the two programs will be affected.

38.What is the benefit of using an enum rather than a #define constant?

The use of an enumeration constant (enum) has many advantages over using the traditional symbolic constant style of #define. These advantages include a lower maintenance requirement, improved program readability, and better debugging capability.

1) The first advantage is that enumerated constants are generated automatically by the compiler. Conversely, symbolic constants must be manually assigned values by the programmer.

For instance, if you had an enumerated constant type for error codes that could occur in your program, your enum definition could look something like this:

enum Error_Code
{
OUT_OF_MEMORY,
INSUFFICIENT_DISK_SPACE,
LOGIC_ERROR,
FILE_NOT_FOUND
};

In the preceding example, OUT_OF_MEMORY is automatically assigned the value of 0 (zero) by the compiler because it appears first in the definition. The compiler then continues to automatically assign numbers to the enumerated constants, making INSUFFICIENT_DISK_SPACE equal to 1, LOGIC_ERROR equal to 2, and FILE_NOT_FOUND equal to 3, so on.

If you were to approach the same example by using symbolic constants, your code would look something like this:

#define OUT_OF_MEMORY 0
#define INSUFFICIENT_DISK_SPACE 1
#define LOGIC_ERROR 2
#define FILE_NOT_FOUND 3

values by the programmer. Each of the two methods arrives at the same result: four constants assigned numeric values to represent error codes. Consider the maintenance required, however, if you were to add two constants to represent the error codes DRIVE_NOT_READY and CORRUPT_FILE. Using the enumeration constant method, you simply would put these two constants anywhere in the enum definition. The compiler would generate two unique values for these constants. Using the symbolic constant method, you would have to manually assign two new numbers to these constants. Additionally, you would want to ensure that the numbers you assign to these constants are unique.

2) Another advantage of using the enumeration constant method is that your programs are more readable and thus can be understood better by others who might have to update your program later.

3) A third advantage to using enumeration constants is that some symbolic debuggers can print the value of an enumeration constant. Conversely, most symbolic debuggers cannot print the value of a symbolic constant. This can be an enormous help in debugging your program, because if your program is stopped at a line that uses an enum, you can simply inspect that constant and instantly know its value. On the other hand, because most debuggers cannot print #define values, you would most likely have to search for that value by manually looking it up in a header file.

39.When is a switch statement better than multiple if statements?

The switch statement is better than multiple if statements when there are more than two alternatives to be selected whether the case value matches to the variable of either character or integer type.

40.What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
The strcpy() function is designed to work exclusively with strings. It copies each byte of the source string to the destination string and stops when the terminating null character () has been moved. On the other hand, the memcpy() function is designed to work with any type of data. Because not all data ends with a null character, you must provide the memcpy() function with the number of bytes you want to copy from the source to the destination.

41.How can I convert a string to a number?
The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa.

The following functions can be used to convert strings to numbers:

Function Name Purpose

atof() Converts a string to a double-precision floating-point value.

atoi() Converts a string to an integer.

atol() Converts a string to a long integer.

strtod() Converts a string to a double-precision floating-point value and reports any “leftover” numbers that could not be converted.

strtol() Converts a string to a long integer and reports any “leftover” numbers that could not be converted.

strtoul() Converts a string to an unsigned long integer and reports any “leftover” numbers that could not be converted.

41.How can I convert a number to a string?
The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa The following functions can be used to convert integers to strings:

Function Name Purpose

itoa() Converts an integer value to a string.

ltoa() Converts a long integer value to a string.

ultoa() Converts an unsigned long integer value to a string.

The following functions can be used to convert floating-point values to strings:

Function Name Purpose

ecvt() Converts a double-precision floating-point value to a string without an embedded decimal point.

fcvt() Same as ecvt(), but forces the precision to a specified number of digits.

gcvt() Converts a double-precision floating-point value to a string with an embedded decimal point.

42.Is it possible to execute code even after the program exits the main() function?

The standard C library provides a function named atexit() that can be used to perform “cleanup” operations when your program terminates. You can set up a set of functions you want to perform automatically when your program exits by passing function pointers to the atexit() function.

What is the stack?
The stack is where all the functions’ local (auto) variables are created. The stack also contains some
information used to call and return from functions.

A “stack trace” is a list of which functions have been called, based on this information. When you start using a debugger, one of the first things you should learn is how to get a stack trace.

The stack is very inflexible about allocating memory; everything must be deallocated in exactly the reverse order it was allocated in. For implementing function calls, that is all that’s needed. Allocating memory off the stack is extremely efficient. One of the reasons C compilers generate such good code is their heavy use of a simple stack.

There used to be a C function that any programmer could use for allocating memory off the stack. The
memory was automatically deallocated when the calling function returned. This was a dangerous function to call; it’s not available anymore.

How do you print an address?
The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void
pointer (void*). Different compilers might print a pointer with different formats. Your compiler will pick
a format that’s right for your environment.

If you have some other kind of pointer (not a void*) and you want to be very safe, cast the pointer to a void*:

printf( “%Pn”, (void*) buffer );

45.When should the register modifier be used? Does it really help?

The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU’s registers, if possible, so that it can be accessed faster.

There are several restrictions on the use of the register modifier.

First, the variable must be of a type that can be held in the CPU’s register. This usually means a single value of a size less than or equal to the size of an integer. Some machines have registers that can hold floating-point numbers as well.

Second, because the variable might not be stored in memory, its address cannot be taken with the unary & operator. An attempt to do so is flagged as an error by the compiler. Some additional rules affect how useful the register modifier is. Because the number of registers is limited, and because some registers can hold only certain types of data (such as pointers or floating-point numbers), the number and types of register modifiers that will actually have any effect are dependent on what machine the
program will run on. Any additional register modifiers are silently ignored by the compiler.

Also, in some cases, it might actually be slower to keep a variable in a register because that register
then becomes unavailable for other purposes or because the variable isn’t used enough to justify the overhead of loading and storing it.

So when should the register modifier be used? The answer is never, with most modern compilers. Early C compilers did not keep any variables in registers unless directed to do so, and the register modifier was a valuable addition to the language. C compiler design has advanced to the point, however, where the compiler will usually make better decisions than the programmer about which variables should be stored in registers.

In fact, many compilers actually ignore the register modifier, which is perfectly legal, because it is only a hint and not a directive.

46.Can a file other than a .h file be included with #include?

The preprocessor will include whatever file you specify in your #include statement. Therefore, if you have the line

#include

in your program, the file macros.inc will be included in your precompiled program. It is, however, unusual programming practice to put any file that does not have a .h or .hpp extension in an #include statement.

You should always put a .h extension on any of your C files you are going to include. This method makes it easier for you and others to identify which files are being used for preprocessing purposes. For instance, someone modifying or debugging your program might not know to look at the macros.inc file for macro definitions. That person might try in vain by searching all files with .h extensions and come up empty. If your file had been named macros.h, the search would have included the macros.h file, and the searcher would have been able to see what macros you defined in it.

47.What is Preprocessor?

The preprocessor is used to modify your program according to the preprocessor directives in your source code. Preprocessor directives (such as #define) give the preprocessor specific instructions on how to modify your source code. The preprocessor reads in all of your include files and the source code you are compiling and creates a preprocessed version of your source code. This preprocessed version has all of its macros and constant symbols replaced by their corresponding code and value assignments. If your source code contains any conditional preprocessor directives (such as #if), the preprocessor evaluates the condition and modifies your source code accordingly.

The preprocessor contains many features that are powerful to use, such as creating macros, performing conditional compilation, inserting predefined environment variables into your code, and turning compiler features on and off. For the professional programmer, in-depth knowledge of the features of the preprocessor can be one of the keys to creating fast, efficient programs.

48.How can you restore a redirected standard stream?
The preceding example showed how you can redirect a standard stream from within your program. But what if later in your program you wanted to restore the standard stream to its original state? By using the standard C library functions named dup() and fdopen(), you can restore a standard stream such as stdout to its original state.

The dup() function duplicates a file handle. You can use the dup() function to save the file handle
corresponding to the stdout standard stream. The fdopen() function opens a stream that has been
duplicated with the dup() function.

53.What is the heap?
The heap is where malloc(), calloc(), and realloc() get memory.

Getting memory from the heap is much slower than getting it from the stack. On the other hand, the heap is much more flexible than the stack. Memory can be allocated at any time and deallocated in any order. Such memory isn’t deallocated automatically; you have to call free().

Recursive data structures are almost always implemented with memory from the heap. Strings often come from there too, especially strings that could be very long at runtime. If you can keep data in a local variable (and allocate it from the stack), your code will run faster than if you put the data on the heap. Sometimes you can use a better algorithm if you use the heap—faster, or more robust, or more flexible. It’s a tradeoff.

If memory is allocated from the heap, it’s available until the program ends. That’s great if you remember to deallocate it when you’re done. If you forget, it’s a problem. A “memory leak” is some allocated memory that’s no longer needed but isn’t deallocated. If you have a memory leak inside a loop, you can use up all the memory on the heap and not be able to get any more. (When that happens, the allocation functions return a null pointer.) In some environments, if a program doesn’t deallocate everything it allocated, memory stays unavailable even after the program ends.


54.How do you use a pointer to a function?
The hardest part about using a pointer-to-function is declaring it.

Consider an example. You want to create a pointer, pf, that points to the strcmp() function.

The strcmp() function is declared in this way:

int strcmp(const char *, const char * )

To set up pf to point to the strcmp() function, you want a declaration that looks just like the strcmp() function’s declaration, but that has *pf rather than strcmp:

int (*pf)( const char *, const char * );

After you’ve gotten the declaration of pf, you can #include and assign the address of strcmp() to pf: pf = strcmp;

55.What is the purpose of realloc( )?
The function realloc(ptr,n) uses two arguments.the first argument ptr is a pointer to a block of memory for which the size is to be altered.The second argument n specifies the
new size.The size may be increased or decreased.If n is greater than the old size and if sufficient space is not available subsequent to the old region, the function realloc( )
may create a new region and all the old data are moved to the new region.

56.What is the purpose of main( ) function?
The function main( ) invokes other functions within it.It is the first function to be called when the program starts execution.

- It is the starting function

- It returns an int value to the environment that called the program

- Recursive call is allowed for main( ) also.

- It is a user-defined function

- Program execution ends when the closing brace of the function main( ) is reached.

- It has two arguments 1)argument count and 2) argument vector (represents strings passed).

- Any user-defined name can also be used as parameters for main( ) instead of argc and argv

All banglore software companies list

All banglore software companies list

Lifetree Convergence Ltd # 3540, HAL IInd Stage,

Doopanahalli,

Indiranagar,

Bangalore-560038 ,

Website: www.lifetreeindia.com +91 80 41254084 / 41254110 /40140600



Linc Software Services Pvt. Ltd. 309/1, 1st Cross, Industrial Main Road, 5th Block, Koramangala

Bangalore 560 095 5533495, 5521523, 5520890, 5533700.





Liqwid Krystal India Pvt Ltd 'Pearl House',

9/3, Museum Road,

Bangalore - 560 001,

Website: www.liqwidkrystal.com + 91 80 2509 1790 Logica 310/2, 1st Main Road,

5th Block, Koramangala, Bangalore 560 095 5538281



Login Infotech Private Limited #63, 1st Main Road,

Seshadripuram,

Bangalore - 560 020

Karnataka ,

Website: www.login2it.com +91-80-23349809, 23563500-02.



Logix Microsystems Ltd 177/2C, Bannerghatta Road,

Bangalore 560 076 NA Manipal Control Data Electronic Commerce Ltd. 512, 6th Cross, 6th Block, Koramangala

Bangalore 560 095 ,

Website: www.mcdecom.net 5521250



Mindtree Consulting Pvt. Ltd. Mindtree House, 88 Gandhi Bazar Main Road, Basavangudi

Bangalore 560 004 ,

Website: www.mindtreeconsulting.com 6528333



Mistral Solutions Pvt. Ltd. 126, 1st Main Road, Domlur 2nd Stage

Bangalore 560 071 ,

Website: www.mistralsolutions.com 5272171, 5273061, 5273062, 5273063



Navayuga Infotech Pvt. Ltd. A.S. Meridian, # 25/5c, 1st Floor,

Outer Ring Road, Marathalli, Bangalore 560037,

Website: www.navayuga.com +91-80-65615053 / 54



Nelito Systems Limited 104 Mota Chamber

Corporation No 9/18

Sampangi Ramaswami Temple Road

Bangalore 560 052 ,

Website: www.nelito.com (+91-80) 2225 4424



neoIT.Com Pvt Ltd No. 16 & 16/1, 5th Floor

Phoenix Towers, Museum Road

Bangalore 560 025 ,

Website: www.neoit.com +91.80.4018 2000



Neosoft Technologies Pvt Ltd # 1, 5th 'A' Block

Koramangala,

Bangalore - 560 034,

Website: www.neosoft-tec.com +91-80-25526347, 25503227 - 30 Netgalactic 418, 80 feet Road, 4th Block, Koramangala,

Bangalore 560 034 5522996





Network Appliance Systems (India) Pvt Ltd Survey No. 10/03, Challaghatta Village

Varthur Hobli, Mahadevapura

Bangalore East Taluk

(Off Intermediate Ring Road)

Bangalore - 560071 ,

Website: www.netapp.com +91.80.4184.3000



Newgen Software Technologies Ltd FF-2, Alpine Arch,

10 Langford Road,

Bangalore - 560025, Karnataka ,

Website: www.newgensoft.com +91-80-22237765, 22273614, 51245445 Next Link (P) Ltd NEXT

23/24, 2nd Floor

Infantry Road

Bangalore - 560 001 ,

Website: www.nextindia.net 080-41132600



Nich - In Software Solutions Pvt. Ltd. 1060, "Lalithadri" 25th Main, 15th Cross, BSK II Stag

Bangalore 560 070 6710882, 6710884

Nirvana Business Solutions Pvt Ltd Nirvana Tower One,

Sigma Tech Park,

7 Whitefield Main Road,

Bangalore 560066,

Website: www.nirvanabpo.com +91 80 4110 3300



Nous Infosystems Pvt Ltd #1, 1 Main Road, 1 Block, Koramangala, Bangalore - 560 034 ,

Website: www.nousinfosystems.com +91 80 41939400



Novell Software Development (I) Ltd 49/1 &49/3, Garvebhavipalya, 7th Mile, Hosur Road

Bangalore 560 068 ,

Website: www.novell.com NA



Novell Software Development (India) Ltd 49/1 & 49/3 Garvebhavi Palya

7th Mile, Hosur Road

Bangalore, India 560 068 (91) 80 2573 1856 / 858



Nt5 Software Solutions (India) Pvt. Ltd. #623, 80 Feet Road

Koramangala

4th Block

Bangalore 560034,

Website: www.nt5solutions.com +91 80 4115 4223



NuMark Software Pvt. Ltd. #49 Rama Arcade

Bowring Hospital Road, Shivajinagar,

Bangalore 560 001 ,

Website: www.numarksoftware.com +91 80 5585526



NVIDIA Graphics Pvt Ltd Brigade South Parade

#10, M.G. Road

Bangalore 560 001 ,

Website: www.nvidia.com/ (91) 80-56948400 ObjectWin Technology India Pvt Ltd 120A, Elephant Rock Road, 3rd Block, Jayanagar, Bangalore 560011 ,

Website: www.objectwin.com Tel: (91)-80-4130-4599



Omnesys Technologies Pvt Ltd Omnesys House,

No. 55/B, 1st Main Road,

Electronic City, Hosur Road,

Bangalore-560 100, NDIA ,

Website: www.omnesysindia.com +91 80 28521464/65/66/67/68



Optimus Outsourcing Company Ltd 218, Sampige Road, Malleswaram,

Bangalore -560003 ,

Website: www.optimus.co.in 91- 080- 23467517

Oracle India Pvt Ltd Commerce@Mantri

Level 4, No. 12/1 & 2, N S Palya

Banerghatta Road

Bangalore 560 076 ,

Website: www.oracle.com/ +91 80 51084700/51084300



Paragon Solutions (India) Pvt. Ltd 607-610, East Wing, 26-27, Raheja Towers

M.G. Road, Bangalore 560 001 ,

Website: www.paragonsolutionsindia.com 5596308/09, 5581423/24





Perot Systems TSI (India) Ltd Plot No.123, "Shivalaya"

EPIP Phase 2

Whitefield Industrial Area

Bangalore 560 066,

Website: www.perotsystems.com +91 80 28413000



Persistent Systems Pvt. Ltd. Unit No. 3A & B, 3rd Floor,

Shobha Alexander Plaza, 16/2, Commissariate Road,

Near Bangalore Central Mall,

Bangalore - 560001 ,

Website: www.persistent.co.in +91 (80) 5112 4203



PharmARC Analytic Solutions Pvt Ltd 2/2, Union Street, 3rd & 4th Floor,

Bangalore 560 001 ,

Website: www.pharmarc.com +91 (80) 4123 8900



Phoenix Global Solutions India Pvt. Ltd. 5, Vani Vilas Road, Basavangudi,

Bangalore 560 004 6674516, 6674517, 6674518, 6674519

Picopeta Simputers Pvt Ltd 146, 5th Cross

RMV Extension

Bangalore 560080 ,

Website: www.picopeta.com 91-80- 2361 0567, 91-80- 2361 8184, 91-80- 2361 8185, 91-80- 2361 8186



Pramati Technologies (P) Limited Golden Square, 102, Eden Park

20, Vittal Mallya Road

Bangalore 560 001,

Website: www.pramati.com +91 (80) 299 6510, +91 (80) 224 3860 PricewaterhouseCoopers Pvt Ltd



Lovelock & LewesPrice Waterhouse

Mittal Tower, 10th Floor C Wing

47/6 MG Road

Bangalore, Karnataka 560001,

Website: www.pwc.com [91] (80) 2558 6362/6365, (80) 2532 5265, (80) 2555 0399 Progress Software Development Pvt Ltd #14, 1st Floor,



St. Patricks Shopping Arcade, Brigade Road

Bangalore, 560 025,

Website: www.progress.com/ 91-80-4112-6999 or 91-80-2559-8547



Proteans Software Solutions Pvt Ltd Proteans Software Solutions

#30/3, Jakkasandra 1st Block

Sarjapur Main Road

Bangalore 560 034 ,

Website: www.proteans.com +91 - 80 - 2563 5259



Prudente Solution Pvt Ltd SF1, Alpine Arch Apartments

10 Langford Road,

Bangalore-560025 ,

Website: www.prudente.co.in (+91 - 80 ) 32767171 PSI Data Systems Ltd. 2nd Floor, Fairwinds

Embassy Golf Links Business Park

Intermediate Ring Road

Bangalore - 560 071 ,

Website: www.psidata.com +91-80-6616-8000



PTC Software (India) Pvt Ltd Embassy Classic, 4th Floor

#11, Vittal Mallya Road

Bangalore

India

560 001 ,

Website: www.ptc.com +91 80 22129741/42/43



Pyramid IT Consulting Pvt Ltd Pyramid IT Consulting

#102 B, Museum Terraces

29, Museum Road

Opp: Raheja Chambers

Bangalore - 560001 ,

Website: www.pyramidci.com 080 - 41120653/9986202650



Quadra Software Solutions Pvt Ltd #104 (122), Ground Floor,

Wheeler Road, Cox Town,

Bangalore - 560 005 ,

Website: www.skylineetech.com +91 8025425256



Quality Engineering and Software Technologies Pvt Ltd

QuEST Towers

No. 55 Whitefield Main Road

Mahadevpura

Bangalore 560 048 ,

Website: www.quest-global.com +91 (80) 411 90900

Quantum-Link Communications Pvt Ltd # 7, 1st Floor, 1st Cross, Cambridge Cross Road, Cambridge Layout,

Ulsoor, Bangalore - 560008 ,

Website: www.qlc.in +91-80-4115-2792/3



Quintegra Solutions Ltd. No.11, Second Floor, Adam Chambers,

Richmond Road, Bangalore - 560 025

Karnataka ,

Website: www.quintegrasolutions.com (+91 80) 30520996 / 7 Radiant Infosystems (P) Ltd 1206, 16th Main, BTM Layout,

Bangalore 560 076 ,

Website: www.radiantinfo.com/ 6683865



Ram Informatics Ltd. I Floor, 52/34, R.V.Road

Opp. Vijaya College

Bangalore 560 004 ,

Website: www.raminfo.com +91-080-26572261 / 26563884 Rapidigm (India) Limited 787, 1st Cross, 12th Main,

HAL 2nd Stage, Indiranagar,

Bangalore 560038 ,

Website: www.rapidigm.com (+91)-80-51267171



Rational Software Corporation (India) Pvt. Ltd. No.40, 100 Feet Road, 4th Block, Koramangala,

Bangalore 560 034,

Website:www-306.ibm.com/software/ 5538082, 5539864



Reach Sewn Technologies & Consulting Pvt. Ltd. 49, First Main, Third Phase, JP Nagar,

Bangalore- 560 078 ,

Website: www.reach-tech.com 91-80- 65996111, 65996112, 65996113 Real Soft (Intl) Pvt Ltd 227/70, Level-1, Sigma Arcade,

Airport Road, Marathahalli,

Bangalore - 560 037, Karnataka ,

Website: www.realsoftinc.com/RSI/ +91-80-2523 4448/ 49/ 50



Realtime Techsolutions Pvt Ltd # 59, Lavanya Tower, III Floor, 4th Main,

18th Cross, Malleshwaram,

Bangalore-560 055 ,

Website: www.rttsindia.com +91 80 23448610, +91 80 23448611,



Red Hat India Pvt Ltd I Floor, West Wing,

Nagarjuna Castle,

No. 1, Castle Street,

Ashok Nagar,

Bangalore 560 025 ,

Website: www.redhat.in/ +91 80 2554 3422/23/24



Regus Business Centre (Bangalore) Pvt Ltd Level 2, No 148 EPIP Zone

Whitefield

Bangalore 560066 +91 981 971 9001



RelQ Software Pvt Ltd #47/1, 9th Cross, "Sri Krishna Arcade"

1st Main, Sarakki Industrial Area

J.P.Nagar 3rd Phase

BANGALORE - 560 078 +91-804-184-0000



Repcol (India) Pvt Ltd Unit 2, First floor, Innovator Block, International Technology Park, Whitefield Road, Bangalore-560066 (91-80) 28411800/03/04 Robert Bosch India Ltd 123, Industrial Layout,

Bangalore 560 095 2992192 Rolta India Ltd. SNS Arcade, "A" Block, 309, HAL Airport Road, Bangalore 560 017 ,

Website: www.rolta.com +91-98450 66458



S R Nova Pvt Ltd R.K. Jalan / Saibal Mitra

Lakshmi Complex, 40, KR Road, ,

Bangalore - 560 002 ,

Website: www.srnova.com +91 80 2670 7112/3



S7 Software Solutions Pvt Ltd #09 3RD Floor , 100 ft Ring Road

27 th Main Road

B.T.M 1 st phase, Madiwala Post

Bangalore - 560068 ,

Website: www.s7solutions.com +91-80-41526777



Saastha Infotech Pvt Ltd #6, 8th Main, Friends Colony

ST Bed, Koramangala

Bangalore - 560047

Karnataka ,

Website: www.sasthatech.com +91 (80) 3290 6747, +91 (80) 2563 4351, +1 (972) 499-4698



Sage Design Systems (India) Pvt Ltd George Thangiah Complex (E), 2nd Floor

80 Feet Road, Jeevan Bhima Nagar,

Bangalore 560 075 ,

Website: www.gnss.com (91) 80-2526-3878



Sampoorna Matchjobs.com Pvt Ltd Sampoorna Computer People

#482, 2nd Floor, 2nd Main,

Behind Bakson's Homeo Clinic,

Near BDA Complex,

Indiranagar-2nd Stage,

Bangalore - 560 038 ,

Website: www.sampoorna.com 080-2528 2200 / 2528 6400



Samsung Electronics India Software Operations (SISO) Bagmane Lake View, 'Block - B',

66/1, Bagmane Tech Park, Byrasandra,

C.V. Raman Nagar,

Bangalore - 560093 ,

Website: www.samsungindiasoft.com 91-80-41819999



Samsung SDS Co Ltd. 1A, Frontline Grandeur, No. 14, Walton Road, Bangalore, INDIA - 560 001 ,

Website: www.sds.samsung.com 91-80-2222-3913



Sanyo LSI Technology India Pvt. Ltd. Unit 03, Level 08, Discoverer Block, International Tech Park, Whitefield Road,

Bangalore 560 066 8410600 - 603 SAP India Pvt. Ltd



Vaswani Victoria

No.30, Victoria Road

Bangalore 560 047 ,

Website: www.sap.com/india/ +91 80 4136 5555



Sapient Corporation Pvt Ltd Bangalore

Salarpuria GR Tech Park

6th Floor, "VAYU" Block

#137, Bangalore South Taluk

Whitefield Main Road

Bangalore 560066,

Website: www.sapient.com/Home.htm tel: +91 080 41047000



Sarnoff Innovative Technologies Pvt Ltd Asha arch,

Magrath Road,

Bangalore-560025 ,

Website: www.sitpl.com 91-80-51999555



Sasken Communication Technologies Limited 139/25, Ring Road, Domlur

Bangalore 560 071 ,

Website: www.sasken.com + 91 80 2535 5501, 6694 3000



Satellite Infotech Services Pvt Ltd "Vidya Shree" Bungalow No. 1, 1st Main Road,

Kodihalli BDA Layout,

HAL II stage, Side lane of Hotel Leela Palace, Near Manipal Hospital, Bangalore - 560 008,

Website: www.goelganga.com +91 080 51269486



Science Applications International Corporation (SAIC) - India Branch Office #14 2ND MAIN, SANKEY ROAD

SADHASHIVANAGAR

BANGALORE, INDIA 560003 ,

Website: www.saic.com



NA SCT Software Solutions (India) Pvt Ltd Divyasree Chambers, A-Block, 1st Floor

Langford Road

City: Bangalore ,

Website: www.sungard.com/sungard/ +91 80 2222 0501



Seaton India IT Pvt Ltd 1305, 13th Upper floor

Raheja Towers East Wing

26-27 M.G.Road

Bangalore 560001 ,

Website: www.seatonindia.com 91-80-41232000



Sequoia Capital India Advisors Pvt Ltd Divyasree Chambers

7th Floor, 'A' Wing

#11, O'Shaugnessy Road

(Off Langford Road)

Bangalore 560 025,

Website: www.sequoiacap.com/india/ +91 80 41245880



Silver Software Pvt Ltd Plot No 23 & 24

EPIP Ist Phase

KIADB, White Field

Bangalore 560 066,

Website: www.silver-software.com + 91 (0) 80 2841 6386 Simplex Solutions 985, 80 feet Perpheral Road,

4th Block, Koramangala, Bangalore 560 034 5539293/4/5, 5520971



Siri Technologies Pvt Ltd #38/C - 23, South End Road

Basavanagudi

Bangalore 560 004,

Website: www.siritech.com +91.80.2244 0050



Skelta Software Pvt Ltd Skelta Software

80 Ft Road, 4th Block

Koramangala,

Bangalore 560 034 ,

Website: www.skelta.com +91 80 2552 7799



SLK Software Services Pvt Ltd "Niran Arcade"

#563-564, New BEL Road,

Sanjaynagar, Bangalore - 560094 ,

Website: www.slk-soft.com +91-80-2351 5721



Sobha Renaissance Information Technology Pvt Ltd SRIT House, #113/1B, ITPL Main Road,

Kundalahalli, Bangalore - 560 037, Karnataka ,

Website: www.renaissance-it.com +91 80 41951999



Societe Generale Global Solution Centre Pvt Ltd Units 3 & 5, 5th Floor,

Creator Building, ITPL, Whitefield Road, Bangalore ,

Website: www.socgensolutions.com/ +91-80-28095000 SoftPro Systems Ltd First Floor, No.55, NTI Layout

RMV IInd Stage, Boopasandra Main Road

Bangalore - 560 094 ,

Website: www.softprosys.com 9845962090



Software Data (India) Ltd #803, 7th Main, 1st Cross

H.A.L. 2nd Stage

Indira Nagar

Bangalore - 560 038 ,

Website: www.dataincindia.com (91) 80 - 4126 1707/08



Software Quality Center Pvt Ltd #697 8th B Main Road,

Vijaya Bank Layout

Behind IIM, Bannerghatta Road

Bangalore - 560076,

Website: www.sqcglobal.com +91 80 2648 4913

SolutionNET India Pvt Ltd Flat No.16, 3rd Floor,

Royal Park Apartments

34 Park Road, Tasker Town

Shivajinagar, Bangalore 560051 ,

Website: www.solutionnet.net +91-80 2286 5940 / 2286 7073



Sonata Software Limited 1/4 APS Trust Building

Bull Temple Road, N.R. Colony,

Bangalore - 560 019 ,

Website: www.sonata-software.com +91-80-26610330



Sonata Software Ltd. 1/4 APS Trust Building, 1st Floor, Bull Temple Road, N.R. Colony, Basavangudi,

Bangalore 560 019 6610330, 6610862, 6613224, 6619153 Speck Systems Limited 15, Basappa Road

Shantinagar

Bangalore-560 027 ,

Website: www.specksystems.com +91-80-2233596



Spheris India Pvt Ltd one Spheris Plaza,

Kormangala Block 8, Bangalore ,

Website: www.spherisindia.com 91 80 25715715



Spike Technologies India Pvt. Ltd 951, 2nd Floor, 24th Main,

J.P. Nagar II Phase, Bangalore 560 078



Srishti Software Private Limited L-174, 6th Sector,

HSR Layout,

Bangalore-560 034,

Website: www.srishtisoft.com +91-80-41109060-63



STAG Software Pvt Ltd #192 Airport Road,

Domlur,

Bangalore - 560071,

Website: www.stagsoftware.com +91 80 25357161/62



Strategic Career Networks Pvt Ltd #98, 3rd Floor, Skylark Palazzo, Airport Road,

next to Kemp Fort,

Bangalore- 560 017 ,

Website: www.e-scn.com +91.80.25236075/23/65, +91-80-25236075



Subex Systems Ltd 721, 7th Main, Mahalaxmi Layout,

Bangalore 560 086 ,

Website: www.subexgroup.com 3497581



Subex Systems Ltd 372, Koramangala III Block, Sarjapur Road,

Bangalore 560 034 ,

Website: www.subexsystems.com +91 80 6659 8700



Sun Microsystems India Pvt. Ltd. 11th Floor, Du Parc Trinity, 17 M.G. Road,

Bangalore 560 001

Website: www.sg.sun.com/ 5599595



SupportSoft India Pvt Ltd APAC Headquarters

Tower B, 5th Floor,

Diamond District,

Airport Road

Bangalore - 560 008 ,

Website: www.supportsoft.com +91 80 4115-0781/0782



SVB India Advisors Pvt Ltd 3rd Floor, Prestige Loka

Brunton Road

Bangalore 560 025,

Website: www.svbank.com 011 91.80.4112 8282



Swiss Re Shared Services (India) Pvt Ltd 1st Floor, Leela Galleria

Leela Palace

23 Airport Road

Bangalore - 560 008,

Website: www.swissre.com +91 80 25217334



Sybase Software (India) Pvt Ltd

DBS Business Center

26, Cunningham Road

Bangalore 560052

IND ,

Website: www.sybase.com +91 80 2226 7272



Sykes Enterprises (India) Private Limited 802, 7th Cross Mico Layout

HBCS BTM 2nd Stage

Bangalore 560 076 ,

Website: www.sykes.com +91 (80) 51374500



Symbol Technologies India Pvt Ltd RMZ Ecospace, Block 3B, 4th Floor

Sarjapura Outer Ring Road, Devaradisana Halli

Bangalore East Taluk

560087 ,

Website: www.motorola.com/business/ +91.80.5109.2000



Symphony Services Corp. (I) Pvt Ltd Symphony Innovation and Excellence Center

Outer Ring Road, Varthur Hobli

Bangalore, 560 087 ,

Website: www.symphonysv.com 91.80. 3027.1000



Synergia Consultants Pvt Ltd Synergia Life Sciences

Embassy Diamante

34, Vittal Mallya Road

Bangalore - 560 001 ,

Website: www.synergiaindia.com +91- 80- 4197 1000



Synopsys (India) Private Limited Tower A, 4th & 5th Floor

Municipal #3, Old Madras Road

Benniganahalli

Bangalore, India 560016 ,

Website: www.synopsys.com 9180 40188000 and 9180 30788000



Syntax Soft-Tech India Pvt Ltd #147, 3 rd Block

8th Main, Koramangala

Bangalore - 560 034,

Website: www.syntaxsoft.com +91-80-41380700



Syntel India Ltd 1st Floor, Unit No. 3, No. 34, 11th Cross,

Indiranagar 1st Stage, Bangalore 560 038 ,

Website: www.syntelinc.com



Syntel Ltd Sanata Clara, 3rd Floor, 18th Main, 1st Cross, Unit No 301

178 HAL Second A Stage

Indiranagar

Bangalore 560 038 91-80-41480271 / 2



Systime Computer Systems (I) Pvt. Ltd. 9/2, Dhondusa Complex Residency Road, 1st Floor

Richmond Circle

Bangalore 560025 ,

Website: www.systime.net



Talisma Corporation Pvt Ltd 214/6, Ramanamaharishi Road Sadashivanagar, Bangalore

560 080 Karnataka ,

Website: www.talisma.com +91 80 2361 3377

Tally Solutions Pvt Ltd Level 2, Commerce@Mantri,

Bannerghatta Road,

Bangalore - 560076,

Website: www.tallysolutions.com +91 80-66282559 / 25732559



Tally Solutions Pvt. Ltd. 331-336, Raheja Arcade, Koramangala, Bangalore 560 095 ,

Website: www.peutronics.com 5533156



Tandon Information Solutions Pvt. Ltd. No. 111, 3rd Floor, Hafeeza Chambers KH Road (Double Road)

Bangalore 560 027 ,

Website: www.tandoninfo.com/ 91 80 4112 0551



Tarang Software Technologies Pvt Ltd Tarang Towers #400/2, Whitefield Road,

Hoody, Bangalore - 560048,

Website: www.tarangtech.com 91-80- 4115 7777



Tata Consultancy Services Ltd TATA Consultancy Services Abhilash Building, Plot No. 96

EP-IP Industrial Area, Whitefield Road,

Bangalore 560 066 ,

Website: www.tcs.com +91 (080) 6660 8400



Tata Elxsi Limited Whitefield Road, Mahadevapura Post,

Hoody, Bangalore 560 048 ,

Website: www.tataelxsi.com 8410148/49/50, 8410230 Tata Elxsi Ltd. ITPL Road, Whitefield,

Bangalore - 560 048 (080) 22979123



Tata Technologies Limited George Thangiah Complex (West) 80 Feet Road

Indiranagar, Bangalore - 560 038 ,

Website: www.tatatechnologies.com +91 80 55333608



Tavant Technologies India Pvt Ltd No.12, CSRIE-II, Guava Garden, 5th Block, Koramangala,

Bangalore 560 095,

Website: www.tavant.com +91-80-4119 0300



TCGIvega Information Technologies Pvt Ltd TCGIvega ,

Website: www.ivega.com



TCS Business Transformation Solutions Ltd (TCS-BTS) TATA Consultancy Services Abhilash Building, Plot No. 96

EP-IP Industrial Area, Whitefield Road,

Bangalore 560 066 +91 (080) 6660 8400



TeamLease Services Pvt Ltd TeamLease House # 26, Palm Grove Road

Off. Victoria Road

Bangalore - 560047 ,

Website: www.teamlease.com 91-80-25575660



Tech Mahindra Ltd 9/7 Hosur Road

Bangalore, Karnataka 560 029 ,

Website: www.mahindrabt.com +91 80 2553 9232 Techspan Prestige Meridien I, Unit No. 404, 4th Floor, 29 M.G. Road

Bangalore 560 052 ,

Website: www.techspan.com 5098040



TechSpan India Ltd. JP Techno Park

No 3/1, Millers Road

Bangalore - 560 025 ,

Website: www.headstrong.com +91.80.41981000



TekEdge 809, Prestige Meridian I, 30 M.G. Road, Bangalore 560 001 ,

Website: www.tekedge.com 5095930/31



TeleDNA Communications Pvt Ltd No. 10, 3rd Floor, 100 Feet Ring Road,

BTM 1st Stage,

Bangalore - 560 068,

Website: www.teledna.com +91 80 66661130, 66661131



Telelogic India Pvt Ltd No. 72, "Salarpuria Pearl" Civil Station

Residency Road Cross

Bangalore

IN-560 025,

Website: www.telelogic.com +91 (80) 4112 4441



Texas Instruments India Ltd. Bagmane Tech Park, # 66 / 3, Byrasandra,

C V Raman Nagar,

Bangalore - 560 093 ,

Website: www.ti.com/in/ +91 80 25345454-55



Texas Instruments India Pvt. Ltd. Golf View Campus, Wind Tunnel Road, Murugeshpalya, Bangalore 560 017 ,

Website: www.ti.com 5269451, 5269452



Think Ahead Advisory Services Pvt Ltd #54, 1st Cross Residency Road

Bangalore-560025 ,

Website: www.thinkahead.net 91 - 80 - 25321797



Thinksoft Global Services (P) Ltd 264 / 265, 18th E Main, HAL 2nd Stage,

Bangalore 560 008 ,

Website: www.thinksoftglobal.com +91 80 4115 1744/ 45



Thirdware Solution Ltd. Appek building - First Floor

Large Wing 93/A, 4th B Cross,

5th Block, Industrial Area, Koramangala, Bangalore 560 095 ,

Website: www.tspl.com +91-80-25500004/5



Tholons Knowledge Management Pvt Ltd #10, 2nd Floor 80 ft Road, RMV 2nd Stage

Bangalore 560 094 ,

Website: www.tholons.com +91-80-2351-9760 Thomson Corporation (International) Pvt Ltd Pinnacle, 15, Bahai's Bhavan Road, Bangalore ,



Website: www.thomson.com +91 80 25550333

ThoughtWorks Technologies India Pvt Ltd 2nd Floor, Tower C, Corporate Block,

Diamond District, Airport Road,

Bangalore - 560 008 ,

Website: www.thoughtworks.com 91 80 2508 9572, 3, 4



TIBCO Software India Pvt Ltd #6, VI Block, 80 Ft. Road Koramangala

Bangalore 560 095,

Website: www.tibco.com +91 80 2206 2222 Timken Engineering and Research India Pvt Ltd The Timken Company ,

Website: www.timken.com 91-657-2210 293



TPI Advisory Services India Pvt Ltd G 01 - G 02, Prestige Garnet 36 Ulsoor Road

Bangalore 560042,

Website: www.tpi.net +91 80 4151 8450



TQM International Pvt Ltd AIMIL- Naimex House 88/1, Outer Ring Road

Nagawara

Bangalore - 560045 ,

Website: www.tqmi.com 093430 88907 (M)



Transfleet Global Services Pvt Ltd (TESCO India) # 81 & 82, EPIP Area Whitefield

Bangalore 560 066

Karnataka 0091- 80- 66588000



Trianz Consulting Pvt Ltd Embassy Icon

No. 3, Infantry Road

Bangalore - 560 001,

Website: www.trianz.com 91.80.2238.8000



Tricon Infotech Pvt. Ltd 319/3, 80 feet Road, 8th Block,

Koramangala, Bangalore 560 095 ,

Website: www.triconinfotech.com 5713264/5716073-75



Trigent Software Ltd. Khanija Bhavan

First Floor

49, Race Course Road

Bangalore 560 001 ,

Website: www.trigent.com +91 (80) 2226 3000



Trilogy E-business Software India Ltd No.5, Salarpuria Infinity, Bannerghatta Road,

Bangalore 560 029,

Website: www.trilogy.com 91.80.4132.2000



Trimentus Technologies Pvt Ltd No. 27/7, Professional Court,

15th Cross, 3rd Block, Jayanagar,

Bangalore - 560 011,

Website: www.trimentus.com +91 80 57683264



TriVium iCOPE Technologies Pvt Ltd 111/112, 3rd Cross, 1st Main, 7th Block,

Koramangala, Bangalore 560 095 ,

Website: www.icope.com +91 80 25716909



TRRS Imaging Ltd Indecomm Global Services

East Land Chambers

#30, Laskar Hosur Road

Bangalore - 560 030 ,

Website: www.indecommglobal.com 91-80-22489260



TRRS Imaging Ltd Indecomm Global Services

Ganesh Building

#5, Michael Palya

80 Feet Road, HAL II Stage

Bangalore - 560 038 91-80-25274373



TTK Healthcare Services Pvt Ltd No. 7, Jeevan Bima Nagar Main Road, HAL 3rd Stage, Bangalore 560075 ,

Website: www.ttkhealthcareservices.com 080-4012 5678 / 31



U&I Scotty Computers Ltd 3, 11th Cross, 3rd Main,

West of Chord Road, Bangalore 5650 086 ,

Website: www.uiscpl.com 3491641/42



UBICS Technologies Pvt Ltd UB Anchorage,

5th Floor, 100 / 1 Richmond Road,

Bangalore - 560 025 ,

Website: www.ubics.com 91- 080- 41531711 / 41531712 / 41531713



UL India Pvt Ltd Titanium, # 135, 1st Floor, Airport Road

Kodihalli, Bangalore - 560 017 ,

Website: www.ul-asia.com +91-80-4138-4500



Unisys Global Services - India (STP Division of Unisys India Pvt Ltd) Unisys Global Services - India Unisys Global Service - India

135/1, Residency Road

Bangalore 560025,

Website: www.unisys.com/index.htm +91 80 4159 4000



Universal Legal UNIVERSAL LEGAL

# 302, Regency Enclave 4,

Magrath Road

Bangalore 560-025 ,

Website: www.chugh.com +91-80-4123-3140, (408) 705 2762



USi Internetworking Services Pvt Ltd #137, 8th and 9th Floor H M G Ambassador

Residency Road.

Bangalore - 560 025 ,

Website: www.usi.com/ 91 80 41318000



UTL Technologies Ltd. 18A/19, Doddanekundi Industrial Area,

II Phase, Mahadevapura Post,

Bangalore - 560 048 ,

Website: www.utlindia.com 91.80.28524032 / 28524050 / 28524088



Utopia India Pvt Ltd 1431 3rd Floor 22nd Cross

Banashankari 2nd Stage

Bangalore, 560070 ,

Website: www.utopiainc.com NA



Valtech India Technology Solutions Pvt Ltd Maas Unique - 30/A, 1st Main Road Industrial Suburb, 3rd Phase

J.P. Nagar

Bangalore - 560078 ,

Website: www.valtech.com/com/index.html +91 80 26079000



Vee Technologies Pvt Ltd Vee Technologies

Sona Towers, 71, Millers Road,

Bangalore - 560 052 ,

Website: www.veetechnologies.com +91-80-2228 1131 Vinciti Networks Pvt Ltd 1109, 24th Main Road, 1st Phase J.P.Nagar, Bangalore 26556830



Vinpack India pvt. Ltd 114, Raheja Arcade,

1/1, Koramangala Industrial Area, Bangalore 560 095 5534999

Viteos Capital Market Services Ltd 43, Electronics City Phase-2 Hosur Road,

Bangalore 560 100 ,

Website: www.viteos.com +91 80 55145612, 55145623



vMoksha Technologies Pvt Ltd 6th Floor, Tower C, Corporate Block

Diamond District, Airport Road

Bangalore - 560008 ,

Website: www.vmoksha.com +91 - 80 - 25053500



VXL eTech Ltd No.17, Electronics City,

Off Hosur Road,

Bangalore - 560 100,

Website: www.vxletech.com/ 91(80) 41102785 Wind River Systems, Inc Wind River International

#19/1 Vittal Mallya Road, 1st Floor

Bangalore 560001,

Website: www.windriver.com +91-80-6630-0400/01 (Board Numbers)



Winfoware Technologies Pvt Ltd Knowledge Towers, #1/B, 1st Main, 3rd Stage, 2nd Block, Basaveshwaranagar, Bangalore - 560 079

Karnataka,

Website: www.winfoware.com +91 80 23223210, 23224418, 23224420



Wipro Global R&D Solutions 30 Mission Road, 1st Main, S.R. Nagar, Bangalore 560 027 ,

Website: www.wipro.com NA



Wipro Group of Companies Du Parc Trinity, 17 M.G. Road,

Bangalore 560 001 NA Wipro Infotech 88 M.G. Road, Bangalore 560 001 5588422 Wipro Technologies (Wipro Ltd) Wipro Technologies Doddakannelli, Sarjapur Road

Bangalore - 560 035 +91 (80) 28440011



Wisdomleaf IT Technologies Pvt Ltd # 71/1, 17th Cross, Margosa Road Opp. ICICI Bank ATM

Malleswaram, Bangalore - 560 055

Karnataka ,

Website: www.wisdomleaf.com +91 (080) 23447403 / 23447702



WYSE Technology Sales & Marketing India Pvt Ltd Sigma Soft Tech Park Gamma Tower 8th Floor

7 Whitefield Main Road

Bangalore - 560 066,

Website: www.wyse.com +91 80 4154 8888



XSYSYS Technologies Pvt Ltd 92/1A Doddathogur,

EC Entrance No.2 / HP Entrance,

Electronics City Post,

Bangalore - 560 100 ,

Website: www.xsysys.com +91-80-2852 32 32



Xyka Software Pvt Ltd # 133/1, 2nd Floor,

Janardhan Towers,

Residency Road,

Bangalore - 560 025,

Website: www.xyka.com +91 80 4112 5775, +91 80 4112 5775



Zenith Software Limited Zenith House, No. 4, Industrial Layout, Koramangala, Bangalore 560 095 ,

Website: www.zenithsoft.com 5522861, 5522862, 5522863

TECH MAHINDRA PLACEMENT PAPERS

Questions from a previous placement exam test paper - techmahindra / axes it technologies company recruitment - employment test.
1. There are total 15 people. 7 speaks french and 8 speaks spanish. 3 do not speak any language. Which part of total people speaks both languages.
Ans: 1/5
2. A jogger wants to save ?th of his jogging time. He should increase his speed by how much %age.
Ans: 33.33 %
3. A is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find a ?
Ans: 17
4. In a office work is distribute between p persons. If 1/8 members are absent then work increased for each person.
5. Question based on cubes. In which fill the blank box.
6. 120, 315, 300, 345, ? ?- 390
7. 2,1, 4, 3, 6, 6, 8, 10, 10, ?, ? ? 12, 15
8. Questions based on figure rotation
9. Questions based on figure rotation
10. A Child is saying numbers 1, 2, 3, 4. When he says 1 Another child puts white marble in a box. On saying 2 he puts Blue marble and on saying 3 he puts red ma rble. When child says 4 other child take out white and blue marble. Child says some no. in a sequence then questions are based on the no. of marbles in the box. Like this
1,1,2,3,1, 4, 1,1,3,2,2,4,111?
a) Find the no. of Blue marble in the box ? 2
b) Find the no. of White-2
c) No. of red marbles - 7
11. Questions based on logical reasoning (R. S. Agrawal)
a) all pens are hens. All hens are doctor.
(I) all pens are doctor.
(II) all doctors are pen.
Ans: Only first conclusion is correct
12. if M person r buying a thing costing D$ each,, if 3 person get away, how much each person has to spend so that total expenditure is same ???
13. which is smallest?
a. 1/7
b 1/8
c 2/9
d 3/13 or something similar having denominations as 11 and 13 in option ?d? and ?e?
14. f Rix can collect 45 pieces in 1 min.. and Rax take 1 and half minute for same,, what is time require d to collect 300 pieces when both working together??
15. One long quiz followed by 5 questions 3 cages having 3 tags on them, sum of digit of cage num not to exceed 10, and other cond.
16. one quest of grandfather-father-son type quest.
17. A is shorter than B but taller than E, D is tallest, C is just shorter than A, who is shortest or similar questions?
18. Rectangular box, 25*20*2 converted in to cylinder of dia 10? what is height in terms of ?pai?
Company Name : Tech Mahindra
Type : Fresher, Job Interview
Hi, guys I am from Punjabi University, Patiala doing B. Tech in the stream of CSE.

Selection Procedure:
1) Written Test
2) Technical Round
3) HR Round
1) Written Test: Around 270 peoples attended for written test, total 51 were furthered to technical
round den 37 furthered to hr round nd finally 27 are selected.
- Online test consist of two parts
- Aptitude (easy time mgmt nedded)
- English (very easy)
- NO NEGATIVE marking

Aptitude consists of 3 parts comprising of 70 questions to b done in 40 mins (time
management needed here)
1. Non verbal reasoning(35 questions)
2. Verbal reasoning(20 questions)
3.Quantitative (15 questions)

RS Aggarwal is sufficient for aptitude but try to do fast and so all questions as there is no negative
marking.

Second part is English it has 8 sections and 100 questions to b done in 40 minutes
1. Tenses(10 questions)
2. Articles(10 questions)
3. Verbiage (synonymms 10 questions)
4. Confusing words (similar sound words typ principle/principal etc 10 questions)
5. Reading comprehension(10 questions very easy 1)
6. Subject verb agreement(20 questions do this from cat material or simmilar)
7. Prepositions(20 questions easy one)
8. One more section of 10 questions i cant remember but easy one

English is easy almost all students complete this section in half an hour. Do this from any good
English book this is very easy part. Each section has different cut of may b 60% in English and 70% in
Aptitude
which can be increased or decreased by Tech Mahindra.

Out of 270 students 51 cleared test, Huge reduction here so b careful. Then interviews -

Technical Interview: this went for 40-45 min for me:
Interviewer: tell me about your project
me: told projects plus what difficulties i faced
he: tell me about your strengths
me: told
with each strength I told he asked for example
this take 15 -20 min
then he see my resume and certificates n asked few more questions on my hobby
then few puzzles as i was topper in maths.
and then so on hobbies
he: how you rate your communication skills

me: 8-9 out of 10
he: what is client for you
me: told
And few questions to elaborate this and interview end after 45 minutes. It was good exp for me and I
have shortlisted for HR. There are few more panels. From few they ask puzzles like water jug problem
etc. From few they ask about c/c++, Data Structures, DBMS, subjects u have good marks in your
dmc. 37 are shortlisted for HR
HR interview: it went for 20 min for me:
he: why you want to join Tech Mahindra
me: told.....
he: why we select you?
me: told i m technically sound....
he: what are area of interest?
me: told
then ask few question about my fav subject
I told operating system so few quetion on operating system
he: why you not selected in infy(few days before infy come at our college)
me: told......
he: how many times do you lie during a day?
me: told....
he: do you have gf?
me: told....
he: how many times ou lie to her?
me: told......
and few more questions related to this
he: do u want to ask any question?
me: ask few questions.....

Try to ask question this shows your interest in company. From my friends HR asked about movies
from some ask to speak for 5 min on some topic from some ask about what you know about Tech
Mahindra and so on. 27 are placed in Tech Mahindra try to be natural in interview.

Best of Luck Guys!

Exam/Interview Date : 06-Dec-2010
No of Rounds : Aptitude Test, Techincal Round-1, Client/Manager Interview
Tech Mahindra | Placement Paper (Aptitude, Technical) - 21.01.10
Company Name : Tech Mahindra
Type : Fresher
Exam/Interview Date : 21-Jan-2010
No of Rounds : Aptitude Test, Techincal Round-1, Techincal Round-2
Location : Chennai
Job Interview, Question Paper Writeup. : Hi friends i attended the tech mahindra recruitment
process on 21-01-2010. It consist of four rounds

On line Test

Technical Interview-1

Technical Interview-2

HR
Online Test consist of 100 questions

35 Q's from logical reasoning-Non verbal

20 Q,s from logical reasoning-Verbal






15
10
10
10

The tech-1 interview was very easy the hr's tried to get some answers from us they asked only basic
and your technical strengths and project and paper presentation .. all the persons who attended this
interview were forwarded to next round...

In Tech-2 he asked me the technical strengths(he expects more than three) i told ds,os,c,c++ then he
asked me rated myself in those subjects after that he shoot out the following questions

DS











what is spanning tree
did you heard about Travelling sales man problem
what is shortest path
what is BFS DFS
explain prim's algorithm
what is linked list and doubly linked list
What is the advantage and disadvantage of doubly linked list
write the code for finding no of elements in a circular linked list
what are the types of traversals

OS








what is shell
what schedulling algorithm is used in Unix
how will you avoid dead lock(Banker's algorithm)
what is the difffernce between an interupt and function call
differ between multi user and multitasking
there are two programs one is os and another one is an application, in a single processor
system what will be executed only the os or only the application or both the os and application..
and how?
Is there any chance of deadlock in C



C



is it possible to store different type of variables in a single array?
int a=10;
int b;
b=(&a);
will it show an error

what are the stoge class in C and tel the scope and life time of it?
Finally in hr Round

Intriduce urself

read this bond after that sign it.......

By : Gowtham KS

Tech Mahindra Placement Paper on 8th Jan 2010 at Nagpur

Campus Recruitment By Tech Mahindra At Priyadarshini college of Engineering, Nagpur On
8th January, 2010.
Hi friends, I am sharing my experience with Tech Mahindra with you. I am Sanket, final
yr. IT student of Priyadarshini Institute of Engg. & Tech.,Nagpur, 2010 batch. I got placed at
Tech Mahindra with the blessings of God, My family & well wishers. And yes
Discussionsworld helped me a lot...

q's from quantitative apps
Q's from reading comprehension
Q's Englsh-1
Q's English-2

It was a 3 stage procedure
1.Online Aptitude Test
2.Technical Interview
3. GD + HR

They gave nice presentation & explained the procedure for online apti.They will give unique
username & password to you to access the online test paper.Different paper sets are there,
so don't peep into neighbor's PC.

1. Aptitude Test
Apti had 100 questions to be solved in 60 mins. Questions were divided into 6 sections
1. Verbal reasoning
2. Non-verbal reasoning
3 Quantitative Aptitude
4 English I
5 English II
6 English III

There was sectional cut-off. They told us there was no negative marking. But after results
were out for Apti, many of the students who solved whole paper could not cleared the Apti.
No. of candidates clearing the apti was less, so there must be a negative marking.

Solve English Section first, they were so easy. Synonyms, antonyms, reading
comprehension, filling blanks with proper verbs, adjectives, prepositions, etc. Above average
student can also solve it in 15-20 mins. No need to go through Barrons.
Verbal reasoning & non-verbal reasoning were easy. R.S. Aggarwal is more than enough.
Go through it. Practice all type of questions from it. Different sets had different problems. so
don't left any part of R.S A.

Quantitative part had 12 questions. Some were very easy, some were easy but lengthy, 1-2
were really tough. Try to give them at least 15-20 mins.
Results were out in 20 mins. My friends told me i cleared the apti. Since i had little doubt
abt my Quantitative & sectional cut-off was there, i didn't believe them. But then I heard my
name, WOW, What a moment!!! a cleared most difficult hurdle of my way. Though TechM
apti was easy but sectional cut-off(& probable negative marking) makes it difficult Only 10-
25% can clear such an EASY Aptitude Test.
Then they give a form to fill to us. They asked for general information such as Educational
details, passport details, family details,languages known, career objective for next 3 years
(be specific such as system analyst, software testing, etc.)Future educational plans(eg, M.
Tech. DON'T WRITE MBA IN HRM particular, You may jeopardize your selection in HR Round)
Mine was 2nd no. for Technical Interview.

He was a nice & friendly. I asked him for permission to come in.He let me in & asked me to
take my sit. Thanking him, I sat & interview started.

T.I.: Tell me about Yourself & Family Background.
Me : Blah... blah...blah...Told him about my strengths & related them with my achievements.
T.I.: Your brothers works as software engineers? where?
Me.: Told.
T.I. : Which brach in .......?
Me. : Sir, I don't know the exact address, but it's near ...........
T.I.: (Smiling). Okkay.I got it.
T.I. : Your place of birth is "Yerli"! Where is it?

Me: told.
T.I.: Is there any lake near Tumsar?
Me: Yes sir, There is Chandpur lake. It's a famous tourist attraction.
T.I.: So, You are maharashtrian?
Me.: No sir,basically I am Hindi-sider.
T.I. : But born & brought up in Maharashtra.
Me. : Yes sir.
T.I: You can read Bengali???
Me: Yes Sir.
T.I.: How?
Me: Many of my college friends are Bengali. I learned from them.
T.I.: You are from I.T. Good. You learned C ,C++, Java, isn't it??
Me: Yes Sir.
T.I.: What is polymorphism?
Me.: Answered.
T.I. : What are classes in C++ ?
Me.: Thought for 5 seconds & then "SORRY SIR, I DON'T KNOW". I didn't get his question.I
was confused whether he's asking for different classes in C++ or Definition. & instead of
telling him that, I simply said SORRY Sir, I ....
T.I.: What is difference between Windows & Unix.
Me.: Told 2-3 differences..
T.I. : What is basic technical difference between Windows & Linux?
Me. : .......
T.I. : What is RDBMS.
Me: I didn't rembered it & I told him I don't know firmly.
T.I. You know DBMS?
Me: Yes sir.
T.I. : what is it?
Me: told.
T.I: Then, what is RDBMS.
Me : Still not clicked, I was blank & told I never heard of it.(!!!!!!!! :-) )
T.I. : Strange, You are from IT & you never heard of RDBMS.
T.I.: What is Waterfall Model?
Me: Explained with diagram.
T.I.: Strengths?
Me: Sir, I am a keen learner, always ready to learn new things. I am productive & a team
worker.
T.I.: Weakness?
Me: Sir, I go into much details of something, though it is not needed.
T.I.: Biggest achievements till date?
Me: I was District second in Scholarship Exam in school days. In case of college years, I am
Technical committee head of Intech i.e student's forum of my department.
T.I.: If you are placed, any preference for location, India or abroad?
Me : I am ready to work anywhere.
T.I.: Plans about Further studies??
Me : (Told exactly what I had written on their form). M. Tech but after 4 years.
T.I: Ok Sanket, You may go now.
Me: Thank you sir.

It lasted for abt 20 mins
I was really disappointed with my interview. I knew the answers of the questions
but didn't remembered those & I was angry on myself, shouting , yelling & really scared that

i wuold not get through the TI. I wanted to answer all the questions & those 2 "DON'T
KNOW"s were really hard to me to digest. I was waiting for TI result keeping my fingers
crossed.
I was confident, loud & clear while answering his questions. Even I said Don't Know
Loud & clear. Always gave answers after taking a small pause. Kept eye contact with him &
shows eagerness in my eyes while listening to him.
That worked for me.
Some guys were asked for their favrt subject & que based on it., abt project,
DBMS, ckts(ET students).Some guys were asked for only 1-2 technical questions, rest were
all HR questions.
It was TI + HR in fact.
Results were declared at around 9 pm.
I was overjoyed. I knew now I can easily clear GD+HR round. I was confident
about my selection. They gave us declaration form to fill & told to be ready with self-
attested documents (college ID+ previous mark-sheets, 10, 10+2 mark-sheets photocopies)
At 10pm, they announced that further round would be held on tomorrow. we
returned.
Next morning, HR took GD+HR.
He told some groups to choose the topics themselves, to some he gave the topic.
In my case, he gave us topic "whether marriage is necessary in Indian society."
Total 6 were there in my group
He grouped us & placed me in Against marriage.
It was easy for me & I was confident about my selection. One guy had written MBA
in HRM as his future career. HR shouted at him," If you want to be HR, why are you here.
Go & do your MBA. We want Technical People" That guy gave him some lame reason. So,
Don't try to fool HR, he is smart & know more thank you.

Do speak something in GD, you will get selected. HR didn't ask me anything, but he asked
some candidates about some significant people of India, Mogul Empire, hobbies, abt
attitude, latest issues, etc.
Other topics in GD were Separation of states, Capital Punishment to Kasab, Divorce
laws, such current issues.
Final Results were declared after an 1:30 hrs. My name was there. Package was 2.9lpa
That was the greatest moment of happiness of my life. I've got a job!!!! Only 3
from my branch were selected including me. One was my best friend. Total 18 were finally
placed from about 135 students of my college who sat for apti.
Very few candidates were rejected during TI & then during HR. Almost 90% guys
who cracked the Apti got placed.

Remember, if you cleared the Apti, rest will be much easier to you. For TechM, go through
R.S. Aggarwal thoroughly.It's sufficient. Remember Time Limit.Solve all the sections. At
least 60% questions from each section first to clear sectional cut-off & then try to attempt
others. Complete English Sections first, they are easy. In skill set, write about only those
languages where u are really confident & perfect. Better you write only C & prepare
thoroughly & clear all the concepts abt C. Refer Let Us C by Kanetkar for C. Be ready to
answer about your project, many question are based on your resume & form you fill before
entering TI. So think before writing something there.
I thank Discussionsworld, it was immensely helpful to me. It was my first online apti,TI &
GD, & I got placed. I got idea for Tech Mahindra preps from Discussionsworld & things
became easy for me. Pattern was similar to that discussed
here.

BEST OF LUCK!!!

ARITHMETIC SECTION

This section consists of 29 problems. The questions are simple though time consuming.

1. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is

the speed of the stream ?

(a) 13 km/hr

(b) 26 km/hr

(c) 34 km/hr

(d) none of these

Ans. A

2. Find the value of ( 0.75 * 0.75 * 0.75 - 0.001 ) / ( 0.75 * 0.75 - 0.075 + 0.01)

(a) 0.845

(b) 1.908

(c) 2.312

(d) 0.001

Ans. A

3. A can have a piece of work done in 8 days, B can work three times faster than the A, C can work five times faster than A.

How many days will they take to do the work together ?

(a) 3 days

(b) 8/9 days

(c) 4 days

(d) can't say

Ans. B

4. A car travels a certain distance taking 7 hrs in forward journey, during the return journey increased speed 12km/hr takes

the times 5 hrs.What is the distance travelled

(a) 210 kms

(b) 30 kms

(c) 20 kms

(c) none of these

Ans. B

5. Instead of multiplying a number by 7, the number is divided by 7. What is the percentage of error obtained ?

6. Find (7x + 4y ) / (x-2y) if x/2y = 3/2 ?

(a) 6

(b) 8

(c) 7

(d) data insufficient

Ans. C

7. A man buys 12 lts of liquid which contains 20% of the liquid and the rest is water. He then mixes it with 10 lts of another

mixture with 30% of liquid.What is the % of water in the new mixture?

8. If a man buys 1 lt of milk for Rs.12 and mixes it with 20% water and sells it for Rs.15, then what is the percentage of

gain?

9. Pipe A can fill a tank in 30 mins and Pipe B can fill it in 28 mins.If 3/4th of the tank is filled by Pipe B alone and both are

opened, how much time is required by both the pipes to fill the tank completely ?

10. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount then what is the

profit percentage.

(a) 40%

(b) 55%

(c) 35%

(d) 30%

Ans. D

11. A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days

more for the work to be finished. How many men were there originally?

(a) 110 men

(b) 130 men

(c) 100 men

(d) none of these

Ans. A

12. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years ?

(a) Rs. 500

(b) Rs. 600

(c) Rs. 800

(d) Rs. 900

Ans. C

13. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years

will it become 9 times itself.

(a) 6

(b) 8

(c) 10

(d) 12

Ans A

14. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train

observes the 15 seconds elapse before the faster train completely passes by him.

What is the length of faster train ?

(a) 100m

(b) 75m

(c) 120m

(d) 50m

Ans B

15. How many mashes are there in 1 squrare meter of wire gauge if each mesh

is 8mm long and 5mm wide ?

(a) 2500

(b) 25000

(c) 250

(d) 250000

Ans B

16. x% of y is y% of ?

(a) x/y

(b) 2y

(c) x

(d) can't be determined

Ans. C

17. The price of sugar increases by 20%, by what % should a housewife reduce the consumption of sugar so that

expenditure on sugar can be same as before ?

(a) 15%

(b) 16.66%

(c) 12%

(d) 9%

Ans B

18. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the

rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?

(a) Rs.500

(b) Rs.1500

(c) Rs.1000

(d) Rs. 900

Ans C

20. The population of a city increases @ 4% p.a. There is an additional annual increase of 4% of the population due to the

influx of job seekers, find the % increase in population after 2 years ?

21. The ratio of the number of boys and girls in a school is 3:2 Out of these 10% the boys and 25% of girls are scholarship

holders. % of students who are not scholarship holders.?

22. 15 men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would it take for 21 women if

3 women do as much work as 2 men?

(a) 30

(b) 20

(c) 19

(d) 29

Ans. A

23. A cylinder is 6 cms in diameter and 6 cms in height. If spheres of the same size are made from the material obtained,

what is the diameter of each sphere?

(a) 5 cms

(b) 2 cms

(c) 3 cms

(d) 4 cms
Ans C

24. A rectangular plank (2)1/2 meters wide can be placed so that it is on either side of the diagonal of a square shown

below.(Figure is not available)What is the area of the plank?

Ans :7*(2)1/2

25. The difference b/w the compound interest payble half yearly and the simple interest on a

certain sum lent out at 10% p.a for 1 year is Rs 25. What is the sum?

(a) Rs. 15000

(b) Rs. 12000

(c) Rs. 10000

(d) none of these

Ans C

26. What is the smallest number by which 2880 must be divided in order to make it into a

perfect square ?

(a) 3

(b) 4

(c) 5

(d) 6

Ans. C

27. A father is 30 years older than his son however he will be only thrice as old as the son after 5 years

what is father's present age ?

(a) 40 yrs

(b) 30 yrs

(c) 50 yrs

(d) none of these

Ans. A

28. An article sold at a profit of 20% if both the cost price and selling price would be Rs.20/- the profit would be 10% more.

What is the cost price of that article?

29. If an item costs Rs.3 in '99 and Rs.203 in '00.What is the % increase in price?

(a) 200/3 %

(b) 200/6 %

(c) 100%

(d) none of these

Ans. A

LOGICAL SECTION

Directions: For questions 30-39 fill the missing number or letter in the given series

30. a, c, e, g, _

(a) h

(b) i

(c) d

(d) j

Ans. B

31. a, e, i, m, q, u, _, _

(a) y,c

(b) b,f

(c) g,i

(d) none

Ans. A

32. ay , bz , cw , dx ,__

(a) gu

(b) ev

(c) fv

(d) eu

Ans. D

33. 1, 2, 3, 5, 7, 11, __

(a) 15

(b) 9

(c) 13

(d) 12

Ans. C (series of prime numbers)

34. kp , lo , mn , __

(a) nm

(b) np

(c) op

(d) pq

Ans. A

35. R,M,__,F,D,__

(a) I, C

(b) A, Q

(c) L, N

(d) B, Q

Ans. A

36. ___, ayw, gec, mki, sqo

(a) awx

(b) usq

(c) prs

(d) lmn

Ans. B

37. 1, 3, 4, 8, 15, 27, __

(a) 60

(b) 59

(c) 43

(d) 50

Ans D

38. 0, 2, 3, 5, 8, 10, 15, 17, 24, 26,__

(a) 45

(b) 55

(c) 35

(d) 48

Ans. C

39. 2, 5, 9, 19, 37,__

(a) 64

(b) 55

(c) 75

(d) 40

Ans C

Directions for questions 40 to 45: Select the alternative that logically follows form the two given statements.

40. All scientists are fools. All fools are literates.

(a)All literates are scientists

(b) All scientists are literates

(c) No scientists are literates

(d) Both (a) and (b) are correct

Ans. B

41. No apple is an orange. All bananas are oranges.

(a) All apples are oranges

(b) Some apples are oranges

(c) No apple is a banana

(d) None of the above

Ans. A

42. All pens are elephants. Some elephants are cats.

(a) Some pens are cats

(b) No pens are cats

(c) All pens are cats

(d) None of the above

Ans. D

43. All shares are debentures.No debentures are deposits.

(a) All shares are deposits

(b) Some shares are deposits

(c) No shares are deposits

(d) None of the above

Ans. C

44. Many fathers are brothers. All brothers are priests.

(a) No father is a priest

(b) Many fathers are not priests

(c) Many fathers are priests

(d) Both (b) and (c)

Ans. B

45. Some green are blue. No blue are white.

(a) No green are white

(b) Some green are white

(c) No green are white

(d) None of the above

Ans. B

46. If the word "CODING" is represented as DPEJOH , then the word "CURFEW" can be represented?

(a) dvsgfx

(b) dvshfx

(c) dgshfx

(d) dtsgfy

Ans. A

47. If in a certain code "RANGE" is coded as 12345 and "RANDOM" is coded as 123678, then the code for the

word "MANGO" would be

(a) 82357

(b) 84563

(c) 82346

(d) 82543

Ans. D

Directions for questions 48-50:The questions are based on the following data

In a class of 150 students 55 speak English;85 speak Telugu and 30 speak neither English nor Telugu

48. How many speak both English and Telugu?

(a) 10

(b) 15

(c) 20

(d) 12

Ans. C

49.How many speak only Telugu?

(a) 55

(b) 45

(c) 65

(d) none of the above

Ans.C

50.How many speak at least one of the two languages?

(a) 120

(b) 100

(c) 250

(d) 50

Ans. A

Refer R.S Agarwal books for more questions of the same kind

Verbal -- Page 254 problems 53 to56

Nonverbal -- Pages 5,41,54,108,145,158

Page 354-355 8,13,

Read more: http://www.ittestpapers.com/articles/techmahindra(mbt)---paper----general---other-.html#ixzz17yNzE1uW

C-Test Paper

1. #include

* What is wrong in the following problem

main() {

int i,j;

j = 10;

i = j++ - j++;

printf("%d %d", i,j); }

ans: 0, 12

2.#include * What is the output of the following problem

main() {

int j;

for(j=0;j<3;j++)

foo();

}

foo() {

static int i = 10;

i+=10;

printf("%d\n",i); }

/* Out put is (***since static int is used i value is retained between

* 20 function calls )

* 30

* 40

*

/

3.#include #include #include /* This is asked in PCS Bombay walk-in-interview

* What is wrong in the following code

*/

main()

{

char *c;

c = "Hello";

printf("%s\n", c); }

/*ans:- Hello, The code is successfully running */

4. #include /* This problem is given in PCS BOMBAY walk-in-interview.

* What is the final value of i and how many times loop is

* Executed ?

*/

main()

{

int i,j,k,l,lc=0;

/* the input is given as 1234 567 */

printf("Enter the number string:<1234 567 \n");

scanf("%2d%d%1d",&i,&j,&k);

for(;k;k--,i++)

for(l=0;lprintf("%d %d\n",i,l);}

printf("LOOPS= %d\n", lc-1);

/* Ans: i = 16, and loop is executed for 169 times */

5.#include /* This is given in PCS Bombay walk-in-interview */

/* What is the output of the following program */

main() {

union {

int a;

int b;

int c;

} u,v;

u.a = 10;

u.b = 20;

printf("%d %d \n",u.a,u.b); }

/* Ans : The latest value assigned to any of the union member

will be present in the union members so answer is

20 20

*/

6.#include main()

{

float i, j;

scanf("%f %f", &i, &j);

printf("%.2f %.3f", i, j); }

/Ans:- 123.34 3. 234 */

7.#include /* This is given in PCS Bombay walk-in-interview

* What is the out put of the following problem ?

*/

main()

{

char *str = "12345";

printf("%c %c %c\n", *str, *(str++), *(str++));

}

/* Ans: It is not 1 2 3

* But it is 3 2 1 Why ??

*/

8.#include /* This problem is asked in PCS Bombay Walk-in-interview

* Write a macro statement to find maximum of a,b

*/

#define max(a,b) (ab)?a:b

main()

{

int a,b;

a=3;

b=4;

printf("%d",max(a,b)); }

/* Ans is very simple the coding is just for testing it

and output is 4 */

~

9.#include /* This problem is asked in PCS Bombay

* What is the output of the following coding

*/

main()

{

int len=4;

char *st="12345678";

st = st -len;

printf("%c\n",*st); }

/* Ans : It will print some junk value */

~

10.#include main()

{

func(1); }

func(int i){

static char *str ={ "One","Two","Three","Four"};

printf("%s\n",str[i++]);

return;

}

/* Ans:- it will give warning because str is pointer to the char but

it is initialized with more values

if it is not considered then the answer is Two */

11.

#include main()

{

int i;

for (i=1;i<100; i++)

printf("%d %0x\n",i,i); }

/* Ans:- i is from 1 to 99 for the first format,

for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc */

12.#include /* This problem is asked in PCS Bombay walk-in-interview

* In the following code please write the syntax for

* assing a value of 10 to field x of s and id_no 101 of s

*/

struct {

int x;

int y;

union {

int id_no;

char *name; }b;

main()

{

st = &s;

st-x=10;

st-b.id_no = 101;

printf("%d %d\n",s..x,s.b.id_no); }

/* Ans: The answer is st-x=10;

* st-b.id_no=101;

*/

13.#include /* This problem was asked in PCS Bombay in a walk-in-interview

* Write a recursive function that calculates

* n * (n-1) * (n-2) * ....... 2 * 1

*/

main() {

int factorial(int n);

int i,ans;

printf("\n Enter a Number:");

scanf("%d",&i);

ans = factorial(i);

printf("\nFactorial by recursion = %d\n", ans);

int factorial(int n)

{

if (n <= 1) return (1);

else

return ( n * factorial(n-1)); }

~

14.#include /* This problem is asked in PCS Bombay walk-in-interview

* What is the output of the following problem

*/

main(){

int j,ans;

j = 4;

ans = count(4);

printf("%d\n",ans);

}s,*st;

}int count(int i)

{

if ( i < 0) return(i);

else

return( count(i-2) + count(i-1)); }

/* It is showing -18 as an answer */

15.#includemain()

{

int i=4;

if(i=0)

printf("statement 1");

else

printf("statement 2");

/* statement 2 */

This is pcsb paper.

1. #include * What is wrong in the following problem

main() {

int i,j;

j = 10;

i = j++ - j++;

printf("%d %d", i,j); }

ans: 0, 12

2.#include * What is the output of the following problem

main() {

int j;

for(j=0;j<3;j++)

foo();

}

foo() {

static int i = 10;

i+=10;

printf("%d\n",i); }

/* Out put is (***since static int is used i value is retained between

* 20 function calls )

* 30

* 40

*

/

3.#include #include #include /* This is asked in PCS Bombay walk-in-interview

* What is wrong in the following code

*/

main()

{

char *c;

}

c = "Hello";

printf("%s\n", c); }

/*ans:- Hello, The code is successfully running */

4. #include /* This problem is given in PCS BOMBAY walk-in-interview.

* What is the final value of i and how many times loop is

* Executed ?

*/

main()

{

int i,j,k,l,lc=0;

/* the input is given as 1234 567 */

printf("Enter the number string:<1234 567 \n");

scanf("%2d%d%1d",&i,&j,&k);

for(;k;k--,i++)

for(l=0;lprintf("%d %d\n",i,l);}

printf("LOOPS= %d\n", lc-1);

/* Ans: i = 16, and loop is executed for 169 times */

5.#include /* This is given in PCS Bombay walk-in-interview */

/* What is the output of the following program */

main() {

union {

int a;

int b;

int c;

} u,v;

u.a = 10;

u.b = 20;

printf("%d %d \n",u.a,u.b); }

/* Ans : The latest value assigned to any of the union member

will be present in the union members so answer is

20 20

*/

6.#include main()

{

float i, j;

scanf("%f %f", &i, &j);

printf("%.2f %.3f", i, j); }

/Ans:- 123.34 3. 234 */

7.#include /* This is given in PCS Bombay walk-in-interview

* What is the out put of the following problem ?

*/

main()

{

char *str = "12345";

printf("%c %c %c\n", *str, *(str++), *(str++));

}

}

/* Ans: It is not 1 2 3

* But it is 3 2 1 Why ??

*/

8.#include /* This problem is asked in PCS Bombay Walk-in-interview

* Write a macro statement to find maximum of a,b

*/

#define max(a,b) (ab)?a:b

main()

{

int a,b;

a=3;

b=4;

printf("%d",max(a,b)); }

/* Ans is very simple the coding is just for testing it

and output is 4 */

~

9.#include /* This problem is asked in PCS Bombay

* What is the output of the following coding

*/

main()

{

int len=4;

char *st="12345678";

for(i=0; i<6; i++)

st = st -len;

printf("%c\n",*st); }

/* Ans : It will print some junk value */

~

10.#include main()

{

func(1); }

func(int i){

static char *str ={ "One","Two","Three","Four"};

printf("%s\n",str[i++]);

return;

}

/* Ans:- it will give warning because str is pointer to the char but

it is initialized with more values

if it is not considered then the answer is Two */

11.

#include main()

{

int i;

for (i=1;i<100; i++)

printf("%d %0x\n",i,i); }

/* Ans:- i is from 1 to 99 for the first format,

for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc */

12.#include /* This problem is asked in PCS Bombay walk-in-interview

* In the following code please write the syntax for

* assing a value of 10 to field x of s and id_no 101 of s

*/

struct {

int x;

int y;

union {

int id_no;

char *name; }b;

main()

{

st = &s;

st-x=10;

st-b.id_no = 101;

printf("%d %d\n",s.x,s.b.id_no);

/* Ans: The answer is st-x=10;

* st-b.id_no=101;

*/

13.#include /* This problem was asked in PCS Bombay in a walk-in-interview

* Write a recursive function that calculates

* n * (n-1) * (n-2) * ....... 2 * 1

*/

main() {

int factorial(int n);

int i,ans;

printf("\n Enter a Number:");

scanf("%d",&i);

ans = factorial(i);

printf("\nFactorial by recursion = %d\n", ans);

int factorial(int n)

{

if (n <= 1) return (1);

else

return ( n * factorial(n-1)); }

~

14.#include /* This problem is asked in PCS Bombay walk-in-interview

* What is the output of the following problem

*/

main(){

int j,ans;

j = 4;

ans = count(4);

}s,*st;

}

}

printf("%d\n",ans);

int count(int i)

{

if ( i < 0) return(i);

else

return( count(i-2) + count(i-1)); }

/* It is showing -18 as an answer */

15.#includemain()

{

int i=4;

if(i=0)

printf("statement 1");

else

printf("statement 2");

/* statement 2 */

Read more: http://www.ittestpapers.com/articles/techmahindra(mbt)---paper----technical---c--c----2.html#ixzz17yO6i2Hs

}

}