Company Name Starts with ...
#  A  B  C  D  E   F  G  H  I  J   K  L  M  N  O   P  Q  R  S  T   U  V  W  X  Y  Z

TCS Interview Questions
Questions Answers Views Company eMail

C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

6 21868

BPO means?

21 101325

Virtual memory size depends on [a] address lines [b] data bus [c] disc space [d] a & c [e] none

15 30871

The C language terminator is a.semicolon b.colon c.period d.exclamation mark

6 12960

What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.

5 19744

What is true about the following C Functions a.Need not return any value b.Should always return an integer c.Should always return a float d.Should always return more than one value.

11 23248

Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program

19 29456

Which of the following about automatic variables within a function is correct ? a.its type must be declared before using the variable b.they are local c.they are not initialised to zero d.they are global.

6 18474

Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));

6 10609

Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments

6 13211

What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;

12 24687

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }

7 23355

what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);}

9 18317

how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y

4 19479

read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x 4 18457


Post New TCS Interview Questions


TCS Interview Questions


Un-Answered Questions

What are scalar functions in sql?

603


What do you know about telecommunications?

589


Which is better tomcat or glassfish?

441


DATA STRUCTURE QUESTIONS What is a data structure? What does abstract data type means? Evaluate the following prefix expression " ++ 26 + - 1324" (Similar types can be asked) Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1 (Similar types can be asked) How is it possible to insert different type of elements in stack? Stack can be described as a pointer. Explain. Write a Binary Search program Write programs for Bubble Sort, Quick sort Explain about the types of linked lists How would you sort a linked list? Write the programs for Linked List (Insertion and Deletion) operations What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm? What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion? Explain quick sort and merge sort algorithms and derive the time-constraint relation for these. Explain binary searching, Fibinocci search. What is the maximum total number of nodes in a tree that has N levels? Note that the root is level (zero) How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3? A list is ordered from smaller to largest when a sort is called. Which sort would take the longest time to execute? A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute? When will you sort an array of pointers to list elements, rather than sorting the elements themselves? The element being searched for is not found in an array of 100 elements. What is the average number of comparisons needed in a sequential search to determine that the element is not there, if the elements are completely unordered? What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest? Which sort show the best average behavior? What is the average number of comparisons in a sequential search? Which data structure is needed to convert infix notations to post fix notations? What do you mean by: • Syntax Error • Logical Error • Runtime Error How can you correct these errors? In which data structure, elements can be added or removed at either end, but not in the middle? How will inorder, preorder and postorder traversals print the elements of a tree? Parenthesis are never needed in prefix or postfix expressions. Why? Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements. Data Structure Questions 1. What is data structure? 2. List out the areas in which data structures are applied extensively? 3. What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model. 4. If you are using C language to implement the heterogeneous linked list, what pointer type will you use? 5. Minimum number of queues needed to implement the priority queue? 6. What is the data structures used to perform recursion? 7. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms? 8. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations. 9. Sorting is not possible by using which of the following methods? 10. A binary tree with 20 nodes has null branches? 21 Let us take a tree with 5 nodes (n=5) 11. What are the methods available in storing sequential files ? 12. How many different trees are possible with 10 nodes ? 1014 For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees. i ii iii iv v 13. List out few of the Application of tree data-structure? 14. List out few of the applications that make use of Multilinked Structures? 15. In tree construction which is the suitable efficient data structure? (a) Array (b) Linked list (c) Stack (d) Queue (e) none 16. What is the type of the algorithm used in solving the 8 Queens problem? 17. In an AVL tree, at what condition the balancing is to be done? 18. What is the bucket size, when the overlapping and collision occur at same time? 19. Traverse the given tree using Inorder, Preorder and Postorder traversals. 20. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree? 21. In the given binary tree, using array you can store the node 4 at which location? At location 6 1 2 3 - - 4 - - 5 Root LC1 RC1 LC2 RC2 LC3 RC3 LC4 RC4 where LCn means Left Child of node n and RCn means Right Child of node n 22. Sort the given values using Quick Sort? 65 70 75 80 85 60 55 50 45 23. For the given graph, draw the DFS and BFS?  BFS: A X G H P E M Y J  DFS: A X H P E Y M J G 24. Classify the Hashing Functions based on the various methods by which the key value is found. 25. What are the types of Collision Resolution Techniques and the methods used in each of the type? 26. In RDBMS, what is the efficient data structure used in the internal storage representation? 27. Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78 28. Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree 29. What is a spanning Tree? 30. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? 31. Convert the given graph with weighted edges to minimal spanning tree. 32. Which is the simplest file structure? (d) Sequential (e) Indexed (f) Random 33. Whether Linked List is linear or Non-linear data structure? 34. Draw a binary Tree for the expression : A * B - (C + D) * (P / Q) 35. For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX. Data Structure Questions 1. What is data structure? 2. List out the areas in which data structures are applied extensively? 3. What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model. 4. If you are using C language to implement the heterogeneous linked list, what pointer type will you use? 5. Minimum number of queues needed to implement the priority queue? 6. What is the data structures used to perform recursion? 7. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms? 8. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations. 9. Sorting is not possible by using which of the following methods? 10. A binary tree with 20 nodes has null branches? 21 Let us take a tree with 5 nodes (n=5) 11. What are the methods available in storing sequential files ? 12. How many different trees are possible with 10 nodes ? 1014 For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees. i ii iii iv v 13. List out few of the Application of tree data-structure? 14. List out few of the applications that make use of Multilinked Structures? 15. In tree construction which is the suitable efficient data structure? (a) Array (b) Linked list (c) Stack (d) Queue (e) none 16. What is the type of the algorithm used in solving the 8 Queens problem? 17. In an AVL tree, at what condition the balancing is to be done? 18. What is the bucket size, when the overlapping and collision occur at same time? 19. Traverse the given tree using Inorder, Preorder and Postorder traversals. 20. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree? 21. In the given binary tree, using array you can store the node 4 at which location? At location 6 1 2 3 - - 4 - - 5 Root LC1 RC1 LC2 RC2 LC3 RC3 LC4 RC4 where LCn means Left Child of node n and RCn means Right Child of node n 22. Sort the given values using Quick Sort? 65 70 75 80 85 60 55 50 45 23. For the given graph, draw the DFS and BFS?  BFS: A X G H P E M Y J  DFS: A X H P E Y M J G 24. Classify the Hashing Functions based on the various methods by which the key value is found. 25. What are the types of Collision Resolution Techniques and the methods used in each of the type? 26. In RDBMS, what is the efficient data structure used in the internal storage representation? 27. Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78 28. Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree 29. What is a spanning Tree? 30. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? 31. Convert the given graph with weighted edges to minimal spanning tree. 32. Which is the simplest file structure? (d) Sequential (e) Indexed (f) Random 33. Whether Linked List is linear or Non-linear data structure? 34. Draw a binary Tree for the expression : A * B - (C + D) * (P / Q) 35. For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX. Data Structure Questions 1. What is data structure? 2. List out the areas in which data structures are applied extensively? 3. What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model. 4. If you are using C language to implement the heterogeneous linked list, what pointer type will you use? 5. Minimum number of queues needed to implement the priority queue? 6. What is the data structures used to perform recursion? 7. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms? 8. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations. 9. Sorting is not possible by using which of the following methods? 10. A binary tree with 20 nodes has null branches? 21 Let us take a tree with 5 nodes (n=5) 11. What are the methods available in storing sequential files ? 12. How many different trees are possible with 10 nodes ? 1014 For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees. i ii iii iv v 13. List out few of the Application of tree data-structure? 14. List out few of the applications that make use of Multilinked Structures? 15. In tree construction which is the suitable efficient data structure? (a) Array (b) Linked list (c) Stack (d) Queue (e) none 16. What is the type of the algorithm used in solving the 8 Queens problem? 17. In an AVL tree, at what condition the balancing is to be done? 18. What is the bucket size, when the overlapping and collision occur at same time? 19. Traverse the given tree using Inorder, Preorder and Postorder traversals. 20. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree? 21. In the given binary tree, using array you can store the node 4 at which location? At location 6 1 2 3 - - 4 - - 5 Root LC1 RC1 LC2 RC2 LC3 RC3 LC4 RC4 where LCn means Left Child of node n and RCn means Right Child of node n 22. Sort the given values using Quick Sort? 65 70 75 80 85 60 55 50 45 23. For the given graph, draw the DFS and BFS?  BFS: A X G H P E M Y J  DFS: A X H P E Y M J G 24. Classify the Hashing Functions based on the various methods by which the key value is found. 25. What are the types of Collision Resolution Techniques and the methods used in each of the type? 26. In RDBMS, what is the efficient data structure used in the internal storage representation? 27. Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78 28. Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree 29. What is a spanning Tree? 30. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? 31. Convert the given graph with weighted edges to minimal spanning tree. 32. Which is the simplest file structure? (d) Sequential (e) Indexed (f) Random 33. Whether Linked List is linear or Non-linear data structure? 34. Draw a binary Tree for the expression : A * B - (C + D) * (P / Q) 35. For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX.

5225


What are the core functionalities of the sap system?

687






Where does the data of a Hive table gets stored?

416


What are Important things to remember for ggplot?

116


Explain retroactive accounting. When is it used?

514


Define what are the difference between jbehave and cucumber?

224


What is global namespace in c#?

482


What is external variable in c?

607


Explain singly linked list in short.

545


If i pay for general expense (and party provide me gst details) through credit card then how i can enter party details

946


What is a $1 in excel?

310


What is latest linux version?

447