Saturday 17 September 2011

C Ques & Ans

What does static variable mean ?
Static variables are the variables which retain their values between the function call initialized only once their scope is within the function in which they are defined.
What is a pointer ?
Pointers are variables which stores the address of another variable. That variable may scalar (including another pointer), or an aggregate (array or structure). The pointed-to ob may be part of a larger object, such as a field of a structure or an element in an array.
What is a structure ?
Structure constitutes a super data type which represents several different data types unit. A structure can be initialized if it is static or global.
What are the differences between structures and arrays ?
Structure is a collection of heterogeneous data type but array is a collection of homo data types. Array Structure 1-It is a collection of data items of same data type. 2-It has declaration only 3-.There is no keyword. 4- array name represent the address of the starting element. 1-It is a collection of data items of different data type. 2- It has declaration and definition 3- keyword struct is used 4-Structure name is known as tag it is the short hand notation of the declaration.
In header files whether functions are declared or defined?
Functions are declared within header file. That is function prototypes exist in a heade not function bodies. They are defined in library (lib).
What are the differences between malloc () and calloc () ?
Malloc Calloc 1-Malloc takes one argument Malloc(a);where a number of bytes 2-memory allocated contains garbage values 1-Calloc takes two arguments Calloc(b,c) where b no of object and c size of object2-It initializes the contains of block of memory to zerosMalloc takes one argument, memory allocated contains garbage values allocates contiguous memory locations. Calloc takes two arguments, memory allocated contains zeros, and the memory allocated is not contiguous.
What are macros? What are its advantages and disadvantages ?
Macros are abbreviations for lengthy and frequently used statements. When a macro is ca entire code is substituted by a single line though the macro definition is of several lines The advantages of macro is that it reduces the time taken for control transfer as in case o function. The disadvantage of it is here the entire code is substituted so the program beco lengthy if a macro is called several times.
Difference between pass by reference and pass by value ?
Pass by reference passes a pointer to the value. This allows the callee to modify the directly.Pass by value gives a copy of the value to the callee. This allows the callee to m the value without modifying the variable. (In other words, the callee simply cannot modify variable, since it lacks a reference to it.)
What is static identifier ?
A file-scope variable that is declared static is visible only to functions within that function-scope or block-scope variable that is declared as static is visible only within th scope. Furthermore, static variables only have a single instance. In the case of functionblock-scope variables, this means that the variable is not “automatic” and thus retains its across function invocations.
Where is the auto variables stored ?
Auto variables can be stored anywhere, so long as recursion works. Practically, they’r the stack. It is not necessary that always a stack exist. You could theoretically allocate function invocation records from the heap.
Where does global, static, and local, register variables, free memory and C Program instructions get stored ?
Global: Wherever the linker puts them. Typically the “BSS segment” on many platforms. Static: Again, wherever the linker puts them. Often, they’re intermixed with the globals. T only difference between globals and statics is whether the linker will resolve the symbols compilation units. Local: Typically on the stack, unless the variable gets register allocate never spills. Register: Nowadays, these are equivalent to “Local” variables. They live on the stack unless they get register-allocated.
Difference between arrays and linked list ?
An array is a repeated pattern of variables in contiguous storage. A linked list is a structure scattered through memory, held together by pointers in each element that point t next element. With an array, we can (on most architectures) move from one element to the nex adding a fixed constant to the integer value of the pointer. With a linked list, there is a “next” pointer in each structure which says what element comes next.
What are enumerations ?
They are a list of named integer-valued constants. Example:enum color { black , orange yellow, green, blue, violet };This declaration defines the symbols “black", “orange", “yell etc.to have the values “1,” “4,” “5,” … etc. The difference between an enumeration and a ma that the enum actually declares a type, and therefore can be type checked.
Describe about storage allocation and scope of global, extern, static, local and register variables.
Globals have application-scope. They’re available in any compilation unit that include appropriate declaration (usually brought from a header file). They’re stored wherever the l puts them, usually a place called the “BSS segment.” Extern? This is essentially “global.” Static: Stored the same place as globals, typically, but only available to the compilation that contains them. If they are block-scope global, only available within that block and it subblocks.Local: Stored on the stack, typically. Only available in that block and its subbl (Although pointers to locals can be passed to functions invoked from within a scope where t local is valid.)Register: See tirade above on “local” vs. “register.” The only difference i the C compiler will not let you take the address of something you’ve declared as “register.
What are register variables ? What are the advantages of using register variables ?
If a variable is declared with a register storage class,it is known as register variable register variable is stored in the cpu register instead of main memory. Frequently used variable are declared as register variable as it’s access time is faster.
What is the use of typedef ?
The typedef help in easier modification when the programs are ported to another machine. A descriptive new name given to the existing data type may be easier to understand the code.
Can we specify variable field width in a scanf() format string ? If possible how ?
All field widths are variable with scanf(). You can specify a maximum field width for field by placing an integer value between the ‘%’ and the field type specifier. (e.g. %64s) a specifier will still accept a narrower field width. The one exception is %#c (where # is an integer). This reads EXACTLY # characters, and it i only way to specify a fixed field width with scanf().
Out of fgets() and gets() which function is safe to use and why ?
fgets() is safer than gets(), because we can specify a maximum input length. Neither o completely safe, because the compiler can’t prove that programmer won’t overflow the buffer pass to fgets ().
Difference between strdup and strcpy ?
Both copy a string. strcpy wants a buffer to copy into. strdup allocates a buffer usin Unlike strcpy(), strdup() is not specified by ANSI .
What is recursion ?
A recursion function is one which call itself either directly or indirectly.It must have definite point to avoid infinite recursion.
Differentiate between a for loop and a while loop ? What are it uses ?
For executing a set of statements fixed number of times we use for loop while when the iterations to be performed is not known in advance we use while loop.
What is storage class ? What are the different storage classes in C ?
Storage class is an attribute that changes the behavior of a variable. It controls the scope and linkage. The storage classes in c are auto, register, and extern, static, typedef.
Write down the equivalent pointer expression for referring the same element a[i][j][k][l] ?
*(*(*(*(a+i)+j)+k)l)
What is difference between Structure and Unions ?
The Main diff is Structure is Allocate the memory in asper the Data type.But Union is Allocate the Memory in max size of Declare the vari to all. The instance of unions can access one member at a time. The memory allocated for the instance is the size of largest member. But instance of a structure has memory for all members separately and all the members can be accessed independently. a structure is basically a collection of hetrogeneous(dissimilar in nature) elements which r stored contiguously in memory.&in. unions they r user defined data types .A union is a data type that allows different types of variables to share same space in memmory
What the advantages of using Unions ?
When the C compiler is allocating memory for unions it will always reserve enough room largest member.
What are the advantages of using pointers in a program ?
The main advantages of using pointers are:

1.) Function cannot return more than one value. But when the same function can modify many pointer variables and function as if it is returning more than one variable. 
2.) In the case of arrays, we can decide the size of the array at runtime by allocating the necessary space.
3. If you want to access a variable quickly or efficiently without wasting CPU time you have only 2 ways: one is declare it as a register variable and other one is declare it with a pointer.because a CPU  has less registers in it ( approximately 6 i.e. A,B,C,D,E,F,G,H), when no register are freely available then you CAN DO THAT TASK WITH ONLY POINTERS.
4. By using pointers you can improve the CPU’s throughput time.
(Throughput time refers to no of jobs done by the CPU in unit amount of time). These are the advantages that can be acquired from pointers.
What is the difference between Strings and Arrays ?
String is a sequence of characters ending with NULL .it can be treated as a one dimensional array of characters terminated by a NULL character.
In a header file whether functions are declared or defined ?
see Q (5)

Go to page  1 , 2 , 3  

Friday 16 September 2011

Others story books

SARATCHANDRA CHATTOPADHYAI
BUDHDHADEB GUHA
SOMORESH MAJUMDER
NARAYAN SANYAL
 BANI BASU


TCS HR QUESTIONS

Tata consultancy services interview questions & answers ( Demo )


Can you tell me about TCS?
Tata Consultancy Services is an IT services, business solutions and outsourcing organization that delivers real results to global businesses, ensuring a level of certainty no other firm can match. TCS offers a consulting-led, integrated portfolio of IT and IT-enabled services delivered through its unique Global Network Delivery Model, recognized as the benchmark of excellence in software development.  A part of the Tata Group, India’s largest industrial conglomerate, TCS has over 116,000 of the world’s best trained IT consultants in 50 countries. The company generated consolidated revenues of US $5.7 billion for fiscal year ended 31 March 2008 and is listed on the National Stock Exchange and Bombay Stock Exchange in India.
WHY U WANT TO JOIN IN OUR COMPANY?
Well it was always my dream that join a company like this. I always wanted to work for a company where i could get many opportunities to learn a lot of things that could help me alround development and make flexible.
This is one of the leading organisation in this industry and one of the best in city.
I am fresher so, if ur organisation offers to start my carrer its a dream come true to me. 
What do u want to become in the next 3 years?
In next 3 years (short term goal), I want to acquire as many technical skills as possible. I want to become perfect in at least one/two technologies. I want to excel to the next level of 'Senior Programmer' / 'Module Lead' position. But my primary aim is to acquire technical skills. That is because - I believe that a (project) manager will not be respected much by his teammates unless he has good command over technology. He might be a good manager, but if he wants get more respect & get his work done, he should know the technical things in a better way. Then only, he will be in commanding position. Then only he will be able to judge the project timelines & task allocation perfectly. So I believe it is very importat to acquire technical skills in the initial stages of one's career.
OR
In long term (6 or 7 years down the line), I will try to become a good manager. Because it's very difficult task to manage a set of people from various cultural backgrounds, various technical skills, various interests and get the work (project) done. I want to take up that challenging task.
OR
Its very difficult to predict it right now as i dont have any real industry experience....still, i hope to have a position with some independent decision making power to utilize and explore my skills by that time.
How do you think is tcs different from Wipro and Infy(or others)?
To be honest, I am not in a position to compare these companies as I dont have enough knowledge about the internal details of these.... one thing, I am quite sure about is that TCS is one of the companies that is very good for a fresher to start with and that is enough for me to make a try for it.
How long can you work in our company without any break--1,6,8,12 hours or intire day ?
It depends upon the many things such as the nature of the work, the deadlines, the importance, the responsiblities, and not to forget my physical and mental condition on that particular day.
In your view what is an ideal job?
For me an ideal job is the one that utilizes and explores my skills and abilities to the fullest and the one I m having interest in. 
Why ur grade is so low?
The answer depends whether you are having average marks in the past or better..if, you are an average performer since the beginning then the obvious answer will be " sir, i have not been an excellent student since my childhood..initially, i could not concentrate on my studies that hard because of sports (or some other reason that suits you... education in rural areas, lack of guidance, etc.. can be a few god ones)..now, i have got a competitive environment and i m sure to improve my grades in future.
Are you confident that you have got this job?
I m not pretty confident of being considered for the selection.
Assurance that u will not leave tcs?
To be honest, noone can assure you at any stage....though, there is a formal agreement for the first 2 years..but, it all depends upon the satisfaction and future growth of the individual who makes a decision to switch to some other company..one thing I can assure you is that till the time I will be getting prospects for future growth, recognition, and satisfactory working condition... I wont leave it.
Why do you think u will get this job?
Well, I think I am having a sound analytical and reasoning skills. i think i m having basic technical knowledge required to enter in this industry and the last but not the least I have performed well throughout your selection process.
Market yourself.
A prospective technocrat who is having enough skills and abilities to attain great success in this field. The only thing he requires is a suitable platform to utilize his skills which offer ample learning opportunities.
What your expectation from us?
Getting an offer letter.
Your plan of professional life.
There is no long term plan as yet...since, i dont have any real experience.
Good format to say about yourself.
Try to say what you are, what you want to be in the near future, your interests, your hobbies..... dont emphasis on what you were in the past and there is no need to go deep into family details...rather it must be avoided.
All the Best For TCS 

Tutorial Books

Story Books of Rabindranath Thakur

COMPETITIVE EXAM

Story Books of Satyajit Roy

Story Books of Tintin & Harry Potter

Story Books of Sharadindu Bandyopadhyay ( Bomkesh Bokshi )

Exercise Books




SCIENCE E-BOOKS IN BENGALI


    Sherlock Holmes

    Sherlock Holmes : Sherlock Holmes Sherlock Holmes : Sherlock Holmes Sherlock Holmes Stories : Sherlock Holmes Stories ...