Friday 1 March 2013

Interview questions




                                C Interview questions

1.     Difference between arrays and pointers?
2.     What is the purpose of realloc( )?
3.     What is static memory allocation and dynamic memory allocation?
4.     How are pointer variables initialized?
5.     Are pointers integers?
6.     What is a pointer variable?
7.     What is a pointer value and address?
8.     What is a method?
9.     What are the advantages of the functions?
10.                        What is the purpose of main( ) function?
11.                        What is an argument? differentiate between formal arguments and actual arguments?
12.                        What is a function and built-in function?
13.                        What is modular programming?
14.                        When does the compiler not implicitly generate the address of the first element of an array?
15.                        What are the characteristics of arrays in C?
16.                        Differentiate between a linker and linkage?
17.                        What are advantages and disadvantages of external storage class?
18.                        Diffenentiate between an internal static and external static variable?
19.                        What are the advantages of auto variables?
20.                        What is storage class and what are storage variable?
21.                        Which expression always return true? Which always return false?
22.                        Write the equivalent expression for x%8?
23.                        Why n++ executes faster than n+1?
24.                        What is a modulus operator? What are the restrictions of a modulus operator?
25.                        What is the difference between a string and an array?
26.                        Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?
27.                        Can the sizeof operator be used to tell the size of an array passed to a function?
28.                        Is using exit() the same as using return?
29.                        Is it possible to execute code even after the program exits the main() function?
30.                        What is a static function?
31.                        Why should I prototype a function?
32.                        How do you print an address?
33.                        Can math operations be performed on a void pointer?
34.                        How can you determine the size of an allocated portion of memory?
35.                        What is a “null pointer assignment” error? What are bus errors, memory faults, and core dumps?
36.                        What is the difference between NULL and NUL?
37.                        What is the heap?
38.                        Can the size of an array be declared at runtime?
39.                        What is the stack?
40.                        When should a far pointer be used?
41.                        What is the difference between far and near?
42.                        Is it better to use malloc() or calloc()?
43.                        Why should we assign NULL to the elements (pointer) after freeing them?
44.                        When would you use a pointer to a function?
45.                        How do you use a pointer to a function?
46.                        Can you add pointers together? Why would you?
47.                        What does it mean when a pointer is used in an if statement?
48.                        Is NULL always defined as 0?
49.                        What is a void pointer?
50.                        What is a null pointer?
51.                        How many levels of pointers can you have?
52.                        What is indirection?
53.                        How do you print only part of a string?
54.                        How can I convert a string to a number?
55.                        How can I convert a number to a string?
56.                        What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
57.                        How can you check to see whether a symbol is defined?
58.                        How do you override a defined macro?
59.                        What is #line used for?
60.                        What is a pragma?
61.                        What are the standard predefined macros?
62.                        How can type-insensitive macros be created?
63.                        How many levels deep can include files be nested?
64.                        Can include files be nested?
65.                        Can you define which header file to include at compile time?
66.                        What is the difference between #include and #include “file”?
67.                        Is it better to use a macro or a function?
68.                        How are portions of a program disabled in demo versions?
69.                        What is the benefit of using an enum rather than a #define constant?
70.                        What is the benefit of using #define to declare a constant?
71.                        Can a file other than a .h file be included with #include?
72.                        How can you avoid including a header more than once?
73.                        What will the preprocessor do for a program?
74.                        What is a macro, and how do you use it?
75.                        What is Preprocessor?
76.                        How can I make sure that my program is the only one accessing a file?
77.                        How can I open a file so that other programs can update it at the same time?
78.                        How do you determine whether to use a stream function or a low-level function?
79.                        What is the difference between text and binary modes?
80.                        How can you restore a redirected standard stream?
81.                        How do you redirect a standard stream?
82.                        How can I search for data in a linked list?
83.                        How can I sort a linked list?
84.                        What is hashing?
85.                        What is the quickest searching method to use?
86.                        What is the easiest searching method to use?
87.                        How can I sort things that are too large to bring into memory?
88.                        What is the quickest sorting method to use?
89.                        What is the easiest sorting method to use?
90.                        What is the benefit of using const for declaring constants?
91.                        Can static variables be declared in a header file?
92.                        What is the difference between declaring a variable and defining a variable?
93.                        Is it acceptable to declare/define a variable in a C header?
94.                        When should a type cast not be used?
95.                        When should a type cast be used?
96.                        How can you determine the maximum value that a numeric variable can hold?
97.                        How reliable are floating-point comparisons?
98.                        Can a variable be both const and volatile?
99.                        When should the volatile modifier be used?
100.                   When should the register modifier be used? Does it really help?













                   Networking interview questions




  1. What are 10Base2, 10Base5 and 10BaseT Ethernet LANs ?
  2. What is the difference between an unspecified passive open and a fully specified passive open
  3. Explain the function of Transmission Control Block
  4. What is a Management Information Base (MIB)
  5. What is anonymous FTP and why would you use it?
  6. What is a pseudo tty?
  7. What is REX?
  8. What does the Mount protocol do ?
  9. What is External Data Representation?
  10. What is the Network Time Protocol?
  11. What is a DNS resource record?
  12. What protocol is used by DNS name servers?
  13. What is the difference between interior and exterior neighbor gateways?
  14. What is the HELLO protocol used for?
  15. What are the advantages and disadvantages of the three types of routing tables?
  16. What is source route?
  17. What is RIP (Routing Information Protocol)?
  18. What is SLIP (Serial Line Interface Protocol)?
  19. What is Proxy ARP?
  20. What is OSPF?
  21. What is Kerberos?
  22. What is a Multi-homed Host?
  23. What is NVT (Network Virtual Terminal)?
  24. What is Gateway-to-Gateway protocol?
  25. What is BGP (Border Gateway Protocol)?
  26. What is autonomous system?
  27. What is EGP (Exterior Gateway Protocol)?
  28. What is IGP (Interior Gateway Protocol)?
  29. What is Mail Gateway?
  30. What is wide-mouth frog?
  31. What are Digrams and Trigrams?
  32. What is silly window syndrome?
  33. What is region?
  34. What is multicast routing?
  35. What is traffic shaping?
  36. What is packet filter?
  37. What is virtual path?
  38. What is virtual channel?
  39. What is logical link control?
  40. Why should you care about the OSI Reference Model?
  41. What is the difference between routable and non- routable protocols?
  42. What is MAU?
  43. Explain 5-4-3 rule.
  44. What is the difference between TFTP and FTP application layer protocols?
  45. What is the range of addresses in the classes of internet addresses?
  46. What is the minimum and maximum length of the header in the TCP segment and IP datagram?
  47. What is difference between ARP and RARP?
  48. What is ICMP?
  49. What are the data units at different layers of the TCP / IP protocol suite?
  50. What is Project 802?
  51. What is Bandwidth?
  52. Difference between bit rate and baud rate?
  53. What is MAC address?
  54. What is attenuation?
  55. What is cladding?
  56. What is RAID?
  57. What is NETBIOS and NETBEUI?
  58. What is redirector?
  59. What is Beaconing?
  60. What is terminal emulation, in which layer it comes?
  61. What is frame relay, in which layer it comes?
  62. What do you meant by “triple X” in Networks?
  63. What is SAP?
  64. What is subnet?
  65. What is Brouter?
  66. How Gateway is different from Routers?
  67. What are the different type of networking / internetworking devices?
  68. What is mesh network?
  69. What is passive topology?
  70. What are the important topologies for networks?
  71. What are major types of networks and explain?
  72. What is Protocol Data Unit?
  73. What is difference between baseband and broadband transmission?
  74. What are the possible ways of data exchange?
  75. What are the types of Transmission media?
  76. What are the types of Transmission media?
  77. What is point-to-point protocol?
  78. What are the two types of transmission technology available?
  79. Difference between the communication and transmission?
  80. What is a different between switch and Hub?
  81. What are the Advantages and Disadvantages of DHCP?
  82. What is Recovery Console?
  83. What is ERD(Emergency Repair Disk)?
  84. What is the difference between POP3 and IMAP Mail Server?
  85. what is .ost file?
  86. Whatz the difference between DNS and WINS?
  87. How can we create VPN to connect to branch office of the same office.what would be the priliminary requirment?
  88. Why should we care about the OSI Reference Model ? What is the main purpose for creating this osi model? why it is a layered model?
  89. What is layer-3 switch?
  90. What is an email client? what is differnce between email client and web mail?
  91. what is the vlan ? how it is work?
  92. Name three network tools used to determine where a network connectivity is lost between two sites A&B.
  93. Which protocol is used for retrieving mails?
  94. What is piggy backing?
  95. What is the default subnet mask for an ipv6 address ?
  96. What is fragmentation of a packet ?
  97. What is MTU of a link ?
  98. Name any field of IP header that can prevent a packet to loop infinitely ?
  99. Under what situations a packet can go into infinite loop in a network ?
  100. Describe a 3-way TCP/IP Handshake.

                    8085 Microprocessor questions


  1. What are the various registers in 8085? - Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085 .
  2. In 8085 name the 16 bit registers? - Stack pointer and Program counter all have 16 bits.
  3. What are the various flags used in 8085? - Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag.
  4. What is Stack Pointer? - Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack.
  5. What is Program counter? - Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.
  6. Which Stack is used in 8085? - LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored information can be retrieved first.
  7. What happens when HLT instruction is executed in processor? - The Micro Processor enters into Halt-State and the buses are tri-stated.
  8. What is meant by a bus? - A bus is a group of conducting lines that carriers data, address, & control signals.
  9. What is Tri-state logic? - Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri-state logic has a third line called enable line.
  10. Give an example of one address microprocessor? - 8085 is a one address microprocessor.
  11. In what way interrupts are classified in 8085? - In 8085 the interrupts are classified as Hardware and Software interrupts.
  12. What are Hardware interrupts? - TRAP, RST7.5, RST6.5, RST5.5, INTR.
  13. What are Software interrupts? - RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7.
  14. Which interrupt has the highest priority? - TRAP has the highest priority.
  15. Name 5 different addressing modes? - Immediate, Direct, Register, Register indirect, Implied addressing modes.
  16. How many interrupts are there in 8085? - There are 12 interrupts in 8085.
  17. What is clock frequency for 8085? - 3 MHz is the maximum clock frequency for 8085.
  18. What is the RST for the TRAP? - RST 4.5 is called as TRAP.
  19. In 8085 which is called as High order / Low order Register? - Flag is called as Low order register & Accumulator is called as High order Register.
  20. What are input & output devices? - Keyboards, Floppy disk are the examples of input devices. Printer, LED / LCD display, CRT Monitor are the examples of output devices.
  21. Can an RC circuit be used as clock source for 8085? - Yes, it can be used, if an accurate clock frequency is not required. Also, the component cost is low compared to LC or Crystal.
  22. Why crystal is a preferred clock source? - Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source most of the times.
  23. Which interrupt is not level-sensitive in 8085? - RST 7.5 is a raising edge-triggering interrupt.
  24. What does Quality factor mean? - The Quality factor is also defined, as Q. So it is a number, which reflects the lossness of a circuit. Higher the Q, the lower are the losses.
  25. What are level-triggering interrupt? - RST 6.5 & RST 5.5 are level-triggering interrupts.