Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc...

97
Question 1. What does static variable mean? 2. What is a pointer? 3. What are the uses of a pointer? 4. What is a structure? 5. What is a union? 6. What are the differences between structures and union? 7. What are the differences between structures and arrays? 8. In header files whether functions are declared or defined? 9. What are the differences between malloc () and calloc ()? 10. What are macros? What are its advantages and disadvantages? 11. Difference between pass by reference and pass by 12. What is static identifier? 13. Where is the auto variables stored? 14. Where does global, static, and local, register 15. Difference between arrays and linked list? 16. What are enumerations? 17. Describe about storage allocation and scope of 18. What are register variables? What are the advantages 19. What is the use of typedef? 20. Can we specify variable field width in a scanf() 21. Out of fgets() and gets() which function is safe to use and why? 22. Difference between strdup and strcpy? 23. What is recursion? 24. Differentiate between a for loop and a while loop? What are it uses? 25. What is storage class.What are the different storage classes in C? 26. What the advantages of using Unions? 27. What is the difference between Strings and Arrays? 28. What is a far pointer? where we use it? 29. What is a huge pointer? 30. What is a normalized pointer ,how do we normalize a pointer? 31. What is near pointer. 32. In C, why is the void pointer useful? When would you use it? 33. What is a NULL Pointer? Whether it is same as an uninitialized pointer? 34. Are pointers integer ? 35. What does the error ‘Null Pointer Assignment’ means and what causes this error? 36. What is generic pointer in C? 37. Are the expressions arr and &arr same for an array of integers? 38. How pointer variables are initialized ? 39. What is static memory allocation ? 40. What is dynamic memory allocation? 41. What is the purpose of realloc ? 42. What is pointer to a pointer.

Transcript of Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc...

Page 1: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Question

1. What does static variable mean?2. What is a pointer?3. What are the uses of a pointer?4. What is a structure?5. What is a union?6. What are the differences between structures and union?7. What are the differences between structures and arrays?8. In header files whether functions are declared or defined?9. What are the differences between malloc () and calloc ()?10. What are macros? What are its advantages and disadvantages?11. Difference between pass by reference and pass by12. What is static identifier?13. Where is the auto variables stored?14. Where does global, static, and local, register15. Difference between arrays and linked list?16. What are enumerations?17. Describe about storage allocation and scope of18. What are register variables? What are the advantages19. What is the use of typedef?20. Can we specify variable field width in a scanf()21. Out of fgets() and gets() which function is safe to use and why?22. Difference between strdup and strcpy?23. What is recursion?24. Differentiate between a for loop and a while loop? What are it uses?25. What is storage class.What are the different storage classes in C?26. What the advantages of using Unions?27. What is the difference between Strings and Arrays?28. What is a far pointer? where we use it?29. What is a huge pointer?30. What is a normalized pointer ,how do we normalize a pointer?31. What is near pointer.32. In C, why is the void pointer useful? When would you use it?33. What is a NULL Pointer? Whether it is same as an uninitialized pointer?34. Are pointers integer ?35. What does the error ‘Null Pointer Assignment’ means and what causes this error?36. What is generic pointer in C?37. Are the expressions arr and &arr same for an array of integers?38. How pointer variables are initialized ?39. What is static memory allocation ?40. What is dynamic memory allocation?41. What is the purpose of realloc ?42. What is pointer to a pointer.

Page 2: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

43. What is an array of pointers ?44. Difference between linker and linkage ?45. Is it possible to have negative index in an array?46. Why is it necessary to give the size of an array in an array declaration ?47. What modular programming ?48. What is a function ?49. What is an argument ?50. What are built in functions ?51. Difference between formal argument and actual argument ?52. Is it possible to have more than one main() function in a C program ?53. What is the difference between an enumeration and a set of pre-processor # defines?54. How are Structure passing and returning implemented by the complier?55. What is the similarity between a Structure, Union and enumeration?56. Can a Structure contain a Pointer to itself?57. How can we read/write Structures from/to data files?58. Write a program which employs Recursion ?59. Write a program which uses Command Line Arguments?60. Difference between array and pointer ?61. What do the ‘c’ and ‘v’ in argc and argv stand for?62. What are C tokens ?63. What are C identifiers?64. Difference between syntax vs logical error?65. What is preincrement and post increment ?66. Write a program to interchange 2 variables without using the third one.67. What is the maximum combined length of command line arguments including the spacebetween adjacent arguments?68. What are bit fields? What is the use of bit fields in a Structure declaration?69. What is a preprocessor, What are the advantages of preprocessor ?70. What are the facilities provided by preprocessor ?71. What are the two forms of #include directive ?72. How would you use the functions randomize() and random()?73. What do the functions atoi(), itoa() and gcvt() do?74. How would you use the functions fseek(), freed(), fwrite() and ftell()?75. What is the difference between the functions memmove() and memcpy()?76. What is a file ?77. What are the types of file?78. What is a stream ?79. What is meant by file opening ?81. What is a file pointer ?82. How is fopen()used ?83. How is a file closed ?84. What is a random access file ?85. What is the purpose of ftell ?86. What is the purpose of rewind() ?87. Difference between a array name and a pointer variable ?88. Represent a two-dimensional array using pointer ?

Page 3: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

89. Difference between an array of pointers and a pointer to an array ?90. Can we use any name in place of argv and argc as command line arguments ?91. What are the pointer declarations used in C?92. Differentiate between a constant pointer and pointer to a constant ?93. Is the allocated space within a function automatically deallocated when the function returns?94. Discuss on pointer arithmetic?95. What are the invalid pointer arithmetic ?96. What are the advantages of using array of pointers to string instead of an array of strings?97. Are the expressions *ptr ++ and ++ *ptr same ?98. What would be the equivalent pointer expression foe referring the same element asa[p][q][r][s] ?99. Are the variables argc and argv are always local to main ?100. Can main () be called recursively?101. Can we initialize unions?102. What’s the difference between these two declarations?103. Why doesn’t this code: a[i] = i++; work?104. Why doesn’t struct x { … };x thestruct; work?105. Why can’t we compare structures?106. How are structure passing and returning implemented?

Page 4: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

C language interview questions | Part11. What does static variable mean?Ans: Static variables are the variables which retain their values between the function calls. Theyare initialized only once their scope is within the function in which they are defined.

2. What is a pointer?Ans: Pointers are variables which stores the address of another variable. That variable may be ascalar (including another pointer), or an aggregate (array or structure). The pointed-to object maybe part of a larger object, such as a field of a structure or an element in an array.

3. What are the uses of a pointer?Ans: Pointer is used in the following casesi) It is used to access array elementsii) It is used for dynamic memory allocation.iii) It is used in Call by referenceiv) It is used in data structures like trees, graph, linked list etc.

4. What is a structure?Ans: Structure constitutes a super data type which represents several different data types in asingle unit. A structure can be initialized if it is static or global.

5. What is a union?Ans: Union is a collection of heterogeneous data type but it uses efficient memory utilizationtechnique by allocating enough memory to hold the largest member. Here a single area ofmemory contains values of different types at different time. A union can never be initialized.

6. What are the differences between structures and union?Ans: A structure variable contains each of the named members, and its size is large enough tohold all the members. Structure elements are of same size.A union contains one of the named members at a given time and is large enough to hold thelargest member. Union element can be of different sizes.

7. What are the differences between structures and arrays?Ans: Structure is a collection of heterogeneous data type but array is a collection ofhomogeneous data types.Array1-It is a collection of data items of same data type.2-It has declaration only3-.There is no keyword.4- array name represent the address of the starting element.Structure1-It is a collection of data items of different data type.2- It has declaration and definition

Page 5: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

3- keyword struct is used4-Structure name is known as tag it is the short hand notation of the declaration.

8. In header files whether functions are declared or defined?Ans: Functions are declared within header file. That is function prototypes exist in a headerfile,not function bodies. They are defined in library (lib).

9. What are the differences between malloc () and calloc ()?Ans: Malloc Calloc 1-Malloc takes one argument Malloc(a);where a number of bytes 2-memoryallocated contains garbage values1-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, memoryallocated contains garbage values.It allocates contiguous memory locations. Calloc takes two arguments, memory allocatedcontains all zeros, and the memory allocated is not contiguous.

10. What are macros? What are its advantages and disadvantages?Ans: Macros are abbreviations for lengthy and frequently used statements. When a macro iscalled the entire code is substituted by a single line though the macro definition is of severallines.The advantage of macro is that it reduces the time taken for control transfer as in case offunction.The disadvantage of it is here the entire code is substituted so the program becomeslengthy if a macro is called several times.

Page 6: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

c language interview questions | Part211. Difference between pass by reference and pass by value?Ans: Pass by reference passes a pointer to the value. This allows the callee to modify thevariable directly.Pass by value gives a copy of the value to the callee. This allows the callee tomodify the value without modifying the variable. (In other words, the callee simply cannotmodify the variable, since it lacks a reference to it.)

12. What is static identifier?Ans: A file-scope variable that is declared static is visible only to functions within that file. Afunction-scope or block-scope variable that is declared as static is visible only within that scope.Furthermore, static variables only have a single instance. In the case of function- or block-scopevariables, this means that the variable is not “automatic” and thus retains its value acrossfunction invocations.

13. Where is the auto variables stored?Ans: Auto variables can be stored anywhere, so long as recursion works. Practically, they’restored onthe stack. It is not necessary that always a stack exist. You could theoretically allocate functioninvocation records from the heap.

14. Where does global, static, and local, register variables, free memory and C Programinstructions get stored?Ans: 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. Theonly difference between globals and statics is whether the linker will resolve the symbols acrosscompilation units.Local: Typically on the stack, unless the variable gets register allocated andnever spills.Register: Nowadays, these are equivalent to “Local” variables. They live on the stackunless they get register-allocated.

15. Difference between arrays and linked list?Ans: An array is a repeated pattern of variables in contiguous storage. A linked list is a set ofstructures scattered through memory, held together by pointers in each element that point to thenext element. With an array, we can (on most architectures) move from one element to the nextby 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.

16. What are enumerations?Ans: They are a list of named integer-valued constants. Example:enum color { black , orange=4,yellow, green, blue, violet };This declaration defines the symbols “black”, “orange”, “yellow”,etc. to have the values “1,” “4,” “5,” … etc. The difference between an enumeration and a macrois that the enum actually declares a type, and therefore can be type checked.

17. Describe about storage allocation and scope of global, extern, static, local and registervariables?

Page 7: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Ans:Globals have application-scope. They’re available in any compilation unit that includes anappropriate declaration (usually brought from a header file). They’re stored wherever the linkerputs 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 unit thatcontains them. If they are block-scope global, only available within that block and its subblocks.Local: Stored on the stack, typically. Only available in that block and its subblocks.(Although pointers to locals can be passed to functions invoked from within a scope where thatlocal is valid.)Register: See tirade above on “local” vs. “register.” The only difference is thatthe C compiler will not let you take the address of something you’ve declared as “register.”

18. What are register variables? What are the advantages of using register variables?Ans: If a variable is declared with a register storage class,it is known as register variable.Theregister variable is stored in the cpu register instead of main memory.Frequently used variablesare declared as register variable as it’s access time is faster.

19. What is the use of typedef?Ans: 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.

20. Can we specify variable field width in a scanf() format string? If possible how?Ans: All field widths are variable with scanf(). You can specify a maximum field width for agivenfield by placing an integer value between the ‘%’ and the field type specifier. (e.g. %64s). Such aspecifier will still accept a narrower field width.The one exception is %#c (where # is an integer). This reads EXACTLY # characters, and it istheonly way to specify a fixed field width with scanf().

c language interview questions | Part3July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

21. Out of fgets() and gets() which function is safe to use and why?Ans: fgets() is safer than gets(), because we can specify a maximum input length. Neither one iscompletely safe, because the compiler can’t prove that programmer won’t overflow the buffer hepass to fgets ().

Ans:Globals have application-scope. They’re available in any compilation unit that includes anappropriate declaration (usually brought from a header file). They’re stored wherever the linkerputs 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 unit thatcontains them. If they are block-scope global, only available within that block and its subblocks.Local: Stored on the stack, typically. Only available in that block and its subblocks.(Although pointers to locals can be passed to functions invoked from within a scope where thatlocal is valid.)Register: See tirade above on “local” vs. “register.” The only difference is thatthe C compiler will not let you take the address of something you’ve declared as “register.”

18. What are register variables? What are the advantages of using register variables?Ans: If a variable is declared with a register storage class,it is known as register variable.Theregister variable is stored in the cpu register instead of main memory.Frequently used variablesare declared as register variable as it’s access time is faster.

19. What is the use of typedef?Ans: 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.

20. Can we specify variable field width in a scanf() format string? If possible how?Ans: All field widths are variable with scanf(). You can specify a maximum field width for agivenfield by placing an integer value between the ‘%’ and the field type specifier. (e.g. %64s). Such aspecifier will still accept a narrower field width.The one exception is %#c (where # is an integer). This reads EXACTLY # characters, and it istheonly way to specify a fixed field width with scanf().

c language interview questions | Part3July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

21. Out of fgets() and gets() which function is safe to use and why?Ans: fgets() is safer than gets(), because we can specify a maximum input length. Neither one iscompletely safe, because the compiler can’t prove that programmer won’t overflow the buffer hepass to fgets ().

Ans:Globals have application-scope. They’re available in any compilation unit that includes anappropriate declaration (usually brought from a header file). They’re stored wherever the linkerputs 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 unit thatcontains them. If they are block-scope global, only available within that block and its subblocks.Local: Stored on the stack, typically. Only available in that block and its subblocks.(Although pointers to locals can be passed to functions invoked from within a scope where thatlocal is valid.)Register: See tirade above on “local” vs. “register.” The only difference is thatthe C compiler will not let you take the address of something you’ve declared as “register.”

18. What are register variables? What are the advantages of using register variables?Ans: If a variable is declared with a register storage class,it is known as register variable.Theregister variable is stored in the cpu register instead of main memory.Frequently used variablesare declared as register variable as it’s access time is faster.

19. What is the use of typedef?Ans: 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.

20. Can we specify variable field width in a scanf() format string? If possible how?Ans: All field widths are variable with scanf(). You can specify a maximum field width for agivenfield by placing an integer value between the ‘%’ and the field type specifier. (e.g. %64s). Such aspecifier will still accept a narrower field width.The one exception is %#c (where # is an integer). This reads EXACTLY # characters, and it istheonly way to specify a fixed field width with scanf().

c language interview questions | Part3July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

21. Out of fgets() and gets() which function is safe to use and why?Ans: fgets() is safer than gets(), because we can specify a maximum input length. Neither one iscompletely safe, because the compiler can’t prove that programmer won’t overflow the buffer hepass to fgets ().

Page 8: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

22. Difference between strdup and strcpy?Ans: Both copy a string. strcpy wants a buffer to copy into. strdup allocates a buffer usingmalloc().Unlike strcpy(), strdup() is not specified by ANSI .

23. What is recursion?Ans: A recursion function is one which calls itself either directly or indirectly it must halt at adefinite point to avoid infinite recursion.

24. Differentiate between for loop and a while loop? What are it uses?Ans: For executing a set of statements fixed number of times we use for loop while when thenumber ofiterations to be performed is not known in advance we use while loop.

25. What is storage class? What are the different storage classes in C?Ans: Storage class is an attribute that changes the behavior of a variable. It controls the lifetime,scope and linkage. The storage classes in c are auto, register, and extern, static, typedef.

26. What the advantages of using Unions?Ans: When the C compiler is allocating memory for unions it will always reserve enough roomfor thelargest member.

27. What is the difference between Strings and Arrays?Ans: String is a sequence of characters ending with NULL .it can be treated as a one dimensionalarrayof characters terminated by a NULL character.

28. What is a far pointer? Where we use it?Ans: In large data model (compact, large, huge) the address B0008000 is acceptable because inthesemodel all pointers to data are 32bits long. If we use small data model(tiny, small, medium) theabove address won’t work since in these model each pointer is 16bits long. If we are working ina small data model and want to access the address B0008000 then we use far pointer. Far pointeris always treated as a 32bit pointer and contains a segment address and offset address both of16bits each. Thus the address is represented using segment : offset format B000h:8000h. For anygiven memory address there are many possible far address segment : offset pair. The segmentregister contains the address where the segment begins and offset register contains the offset ofdata/code from where segment begins.

29. What is a huge pointer?Ans: Huge pointer is 32bit long containing segment address and offset address. Huge pointersarenormalized pointers so for any given memory address there is only one possible huge addresssegment: offset pair. Huge pointer arithmetic is doe with calls to special subroutines so itsarithmetic slower than any other pointers.

Page 9: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

30. What is a normalized pointer, how do we normalize a pointer?Ans: It is a 32bit pointer, which has as much of its value in the segment register as possible.Sincea segment can start every 16bytes so the offset will have a value from 0 to F. for normalizationconvert the address into 20bit address then use the 16bit for segment address and 4bit for theoffset address. Given a pointer 500D: 9407,we convert it to a 20bitabsolute address549D7,Which then normalized to 549D:0007.

c language interview questions | Part4July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

31. What is near pointer?Ans: A near pointer is 16 bits long. It uses the current content of the CS (code segment) register(ifthe pointer is pointing to code) or current contents of DS (data segment) register (if the pointer ispointing to data) for the segment part, the offset part is stored in a 16 bit near pointer. Using nearpointer limits the data/code to 64kb segment.

32. In C, why is the void pointer useful? When would you use it?Ans: The void pointer is useful because it is a generic pointer that any pointer can be cast intoandback again without loss of information.

33. What is a NULL Pointer? Whether it is same as an uninitialized pointer?Ans: Null pointer is a pointer which points to nothing but uninitialized pointer may point toanywhere.

34. Are pointers integer?Ans: No, pointers are not integers. A pointer is an address. It is a positive number.

35. What does the error ‘Null Pointer Assignment’ means and what causes this error?Ans: As null pointer points to nothing so accessing a uninitialized pointer or invalid locationmay cause an error.

30. What is a normalized pointer, how do we normalize a pointer?Ans: It is a 32bit pointer, which has as much of its value in the segment register as possible.Sincea segment can start every 16bytes so the offset will have a value from 0 to F. for normalizationconvert the address into 20bit address then use the 16bit for segment address and 4bit for theoffset address. Given a pointer 500D: 9407,we convert it to a 20bitabsolute address549D7,Which then normalized to 549D:0007.

c language interview questions | Part4July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

31. What is near pointer?Ans: A near pointer is 16 bits long. It uses the current content of the CS (code segment) register(ifthe pointer is pointing to code) or current contents of DS (data segment) register (if the pointer ispointing to data) for the segment part, the offset part is stored in a 16 bit near pointer. Using nearpointer limits the data/code to 64kb segment.

32. In C, why is the void pointer useful? When would you use it?Ans: The void pointer is useful because it is a generic pointer that any pointer can be cast intoandback again without loss of information.

33. What is a NULL Pointer? Whether it is same as an uninitialized pointer?Ans: Null pointer is a pointer which points to nothing but uninitialized pointer may point toanywhere.

34. Are pointers integer?Ans: No, pointers are not integers. A pointer is an address. It is a positive number.

35. What does the error ‘Null Pointer Assignment’ means and what causes this error?Ans: As null pointer points to nothing so accessing a uninitialized pointer or invalid locationmay cause an error.

30. What is a normalized pointer, how do we normalize a pointer?Ans: It is a 32bit pointer, which has as much of its value in the segment register as possible.Sincea segment can start every 16bytes so the offset will have a value from 0 to F. for normalizationconvert the address into 20bit address then use the 16bit for segment address and 4bit for theoffset address. Given a pointer 500D: 9407,we convert it to a 20bitabsolute address549D7,Which then normalized to 549D:0007.

c language interview questions | Part4July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

31. What is near pointer?Ans: A near pointer is 16 bits long. It uses the current content of the CS (code segment) register(ifthe pointer is pointing to code) or current contents of DS (data segment) register (if the pointer ispointing to data) for the segment part, the offset part is stored in a 16 bit near pointer. Using nearpointer limits the data/code to 64kb segment.

32. In C, why is the void pointer useful? When would you use it?Ans: The void pointer is useful because it is a generic pointer that any pointer can be cast intoandback again without loss of information.

33. What is a NULL Pointer? Whether it is same as an uninitialized pointer?Ans: Null pointer is a pointer which points to nothing but uninitialized pointer may point toanywhere.

34. Are pointers integer?Ans: No, pointers are not integers. A pointer is an address. It is a positive number.

35. What does the error ‘Null Pointer Assignment’ means and what causes this error?Ans: As null pointer points to nothing so accessing a uninitialized pointer or invalid locationmay cause an error.

Page 10: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

36. What is generic pointer in C?Ans: In C void* acts as a generic pointer. When other pointer types are assigned to genericpointer,conversions are applied automatically (implicit conversion).

37. Are the expressions arr and &arr same for an array of integers?Ans: Yes for array of integers they are same.

38. IMP>How pointer variables are initialized?Ans: Pointer variables are initialized by one of the following ways.I. Static memory allocationII. Dynamic memory allocation

39. What is static memory allocation?Ans: Compiler allocates memory space for a declared variable. By using the address of operator,thereserved address is obtained and this address is assigned to a pointer variable. This way ofassigning pointer value to a pointer variable at compilation time is known as static memoryallocation.

40. What is dynamic memory allocation?Ans: A dynamic memory allocation uses functions such as malloc() or calloc() to get memorydynamically. If these functions are used to get memory dynamically and the values returned bythese function are assigned to pointer variables, such a way of allocating memory at run time isknown as dynamic memory allocation.

c language interview questions | Part5July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

41. What is the purpose of realloc?Ans: It increases or decreases the size of dynamically allocated array. The function realloc(ptr,n) uses two arguments. The first argument ptr is a pointer to a block of memory for whichthe size is to be altered. The second argument specifies the new size. The size may be increasedor decreased. If sufficient space is not available to the old region the function may create a newregion.

42. What is pointer to a pointer?

36. What is generic pointer in C?Ans: In C void* acts as a generic pointer. When other pointer types are assigned to genericpointer,conversions are applied automatically (implicit conversion).

37. Are the expressions arr and &arr same for an array of integers?Ans: Yes for array of integers they are same.

38. IMP>How pointer variables are initialized?Ans: Pointer variables are initialized by one of the following ways.I. Static memory allocationII. Dynamic memory allocation

39. What is static memory allocation?Ans: Compiler allocates memory space for a declared variable. By using the address of operator,thereserved address is obtained and this address is assigned to a pointer variable. This way ofassigning pointer value to a pointer variable at compilation time is known as static memoryallocation.

40. What is dynamic memory allocation?Ans: A dynamic memory allocation uses functions such as malloc() or calloc() to get memorydynamically. If these functions are used to get memory dynamically and the values returned bythese function are assigned to pointer variables, such a way of allocating memory at run time isknown as dynamic memory allocation.

c language interview questions | Part5July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

41. What is the purpose of realloc?Ans: It increases or decreases the size of dynamically allocated array. The function realloc(ptr,n) uses two arguments. The first argument ptr is a pointer to a block of memory for whichthe size is to be altered. The second argument specifies the new size. The size may be increasedor decreased. If sufficient space is not available to the old region the function may create a newregion.

42. What is pointer to a pointer?

36. What is generic pointer in C?Ans: In C void* acts as a generic pointer. When other pointer types are assigned to genericpointer,conversions are applied automatically (implicit conversion).

37. Are the expressions arr and &arr same for an array of integers?Ans: Yes for array of integers they are same.

38. IMP>How pointer variables are initialized?Ans: Pointer variables are initialized by one of the following ways.I. Static memory allocationII. Dynamic memory allocation

39. What is static memory allocation?Ans: Compiler allocates memory space for a declared variable. By using the address of operator,thereserved address is obtained and this address is assigned to a pointer variable. This way ofassigning pointer value to a pointer variable at compilation time is known as static memoryallocation.

40. What is dynamic memory allocation?Ans: A dynamic memory allocation uses functions such as malloc() or calloc() to get memorydynamically. If these functions are used to get memory dynamically and the values returned bythese function are assigned to pointer variables, such a way of allocating memory at run time isknown as dynamic memory allocation.

c language interview questions | Part5July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

41. What is the purpose of realloc?Ans: It increases or decreases the size of dynamically allocated array. The function realloc(ptr,n) uses two arguments. The first argument ptr is a pointer to a block of memory for whichthe size is to be altered. The second argument specifies the new size. The size may be increasedor decreased. If sufficient space is not available to the old region the function may create a newregion.

42. What is pointer to a pointer?

Page 11: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Ans: If a pointer variable points another pointer value. Such a situation is known as a pointer to apointer.Example:int *p1,**p2,v=10;P1=&v; p2=&p1;Here p2 is a pointer to a pointer.

43. What is an array of pointers?Ans: if the elements of an array are addresses, such an array is called an array of pointers.

44. Difference between linker and linkage?Ans: Linker converts an object code into an executable code by linking together the necessarybuilt infunctions. The form and place of declaration where the variable is declared in a programdetermine the linkage of variable.

45. Is it possible to have negative index in an array?Ans: Yes it is possible to index with negative value provided there are data stored in thislocation. Even if it is illegal to refer to the elements that are out of array bounds, the compilerwill not produce error because C has no check on the bounds of an array.

46. Why is it necessary to give the size of an array in an array declaration?Ans: When an array is declared, the compiler allocates a base address and reserves enough spaceinmemory for all the elements of the array. The size is required to allocate the required space andhence size must be mentioned.

47. What modular programming?Ans: If a program is large, it is subdivided into a number of smaller programs that are calledmodules or subprograms. If a complex problem is solved using more modules, this approach isknown as modular programming.

48. What is a function?Ans: A large program is subdivided into a number of smaller programs or subprograms. Eachsubprogramspecifies one or more actions to be performed for the larger program. Such sub programs arecalled functions.

49. What is an argument?Ans: An argument is an entity used to pass data from the calling to a called function.

50. What are built in functions?Ans: The functions that are predefined and supplied along with the compiler are known as built-in functions. They are also known as library functions.

Page 12: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

c language interview questions | Part 6July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

51. Difference between formal argument and actual argument?Ans: Formal arguments are the arguments available in the function definition. They are precededbytheir own data type. Actual arguments are available in the function call. These arguments aregivenas constants or variables or expressions to pass the values to the function.

52. Is it possible to have more than one main() function in a C program ?Ans: The function main() can appear only once. The program execution starts from main.

53. What is the difference between an enumeration and a set of pre-processor # defines?Ans: There is hardly any difference between the two, except that #defines has a global effect(throughout the file) whereas an enumeration can have an effect local to the block if desired.Some advantages of enumeration are that the numeric values are automatically assigned whereasin #define we have to explicitly define them. A disadvantage is that we have no control over thesize of enumeration variables.

54. How are Structure passing and returning implemented by the complier?Ans: When structures are passed as argument to functions, the entire structure is typicallypushed onthe stack. To avoid this overhead many programmer often prefer to pass pointers to structureinstead of actual structures. Structures are often returned from functions in a location pointed toby an extra, compiler-supported ‘hidden’ argument to the function.

55. IMP>what is the similarity between a Structure, Union and enumeration?Ans: All of them let the programmer to define new data type.

56. Can a Structure contain a Pointer to itself?Ans: Yes such structures are called self-referential structures.

57. How can we read/write Structures from/to data files?Ans: To write out a structure we can use fwrite() as Fwrite( &e, sizeof(e),1,fp);Where e is astructurevariable. A corresponding fread() invocation can read the structure back from file. callingfwrite() it writes out sizeof(e) bytes from the address &e. Data files written as memory imageswith fwrite(),however ,will not be portable, particularly if they contain floating point fields or

c language interview questions | Part 6July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

51. Difference between formal argument and actual argument?Ans: Formal arguments are the arguments available in the function definition. They are precededbytheir own data type. Actual arguments are available in the function call. These arguments aregivenas constants or variables or expressions to pass the values to the function.

52. Is it possible to have more than one main() function in a C program ?Ans: The function main() can appear only once. The program execution starts from main.

53. What is the difference between an enumeration and a set of pre-processor # defines?Ans: There is hardly any difference between the two, except that #defines has a global effect(throughout the file) whereas an enumeration can have an effect local to the block if desired.Some advantages of enumeration are that the numeric values are automatically assigned whereasin #define we have to explicitly define them. A disadvantage is that we have no control over thesize of enumeration variables.

54. How are Structure passing and returning implemented by the complier?Ans: When structures are passed as argument to functions, the entire structure is typicallypushed onthe stack. To avoid this overhead many programmer often prefer to pass pointers to structureinstead of actual structures. Structures are often returned from functions in a location pointed toby an extra, compiler-supported ‘hidden’ argument to the function.

55. IMP>what is the similarity between a Structure, Union and enumeration?Ans: All of them let the programmer to define new data type.

56. Can a Structure contain a Pointer to itself?Ans: Yes such structures are called self-referential structures.

57. How can we read/write Structures from/to data files?Ans: To write out a structure we can use fwrite() as Fwrite( &e, sizeof(e),1,fp);Where e is astructurevariable. A corresponding fread() invocation can read the structure back from file. callingfwrite() it writes out sizeof(e) bytes from the address &e. Data files written as memory imageswith fwrite(),however ,will not be portable, particularly if they contain floating point fields or

c language interview questions | Part 6July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

51. Difference between formal argument and actual argument?Ans: Formal arguments are the arguments available in the function definition. They are precededbytheir own data type. Actual arguments are available in the function call. These arguments aregivenas constants or variables or expressions to pass the values to the function.

52. Is it possible to have more than one main() function in a C program ?Ans: The function main() can appear only once. The program execution starts from main.

53. What is the difference between an enumeration and a set of pre-processor # defines?Ans: There is hardly any difference between the two, except that #defines has a global effect(throughout the file) whereas an enumeration can have an effect local to the block if desired.Some advantages of enumeration are that the numeric values are automatically assigned whereasin #define we have to explicitly define them. A disadvantage is that we have no control over thesize of enumeration variables.

54. How are Structure passing and returning implemented by the complier?Ans: When structures are passed as argument to functions, the entire structure is typicallypushed onthe stack. To avoid this overhead many programmer often prefer to pass pointers to structureinstead of actual structures. Structures are often returned from functions in a location pointed toby an extra, compiler-supported ‘hidden’ argument to the function.

55. IMP>what is the similarity between a Structure, Union and enumeration?Ans: All of them let the programmer to define new data type.

56. Can a Structure contain a Pointer to itself?Ans: Yes such structures are called self-referential structures.

57. How can we read/write Structures from/to data files?Ans: To write out a structure we can use fwrite() as Fwrite( &e, sizeof(e),1,fp);Where e is astructurevariable. A corresponding fread() invocation can read the structure back from file. callingfwrite() it writes out sizeof(e) bytes from the address &e. Data files written as memory imageswith fwrite(),however ,will not be portable, particularly if they contain floating point fields or

Page 13: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Pointers. This is because memory layout of structures is machine and compilerdependent. Therefore, structures written as memory images cannot necessarily be read back byprograms running on other machine, and this is the important concern if the data files you’rewriting will ever be interchanged between machines.

58. Write a program which employs Recursion?Ans: int fact(int n) { return n > 1 ? n * fact(n – 1) : 1; }

59.Write a program which uses Command Line Arguments?Ans:

#includevoid main(int argc,char *argv[]){int i;clrscr();for(i=0;iprintf(“\n%d”,argv[i]);}

60. Difference between array and pointer?Ans:Array1- Array allocates space automatically2- It cannot be resized3- It cannot be reassigned4- sizeof (arrayname) gives the number of bytes occupied by the array.Pointer1-Explicitly assigned to point to an allocated space.2-It can be sized using realloc()3-pointer can be reassigned.4-sizeof (p) returns the number of bytes used to store the pointer variable p.

c language interview questions | Part7July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

Pointers. This is because memory layout of structures is machine and compilerdependent. Therefore, structures written as memory images cannot necessarily be read back byprograms running on other machine, and this is the important concern if the data files you’rewriting will ever be interchanged between machines.

58. Write a program which employs Recursion?Ans: int fact(int n) { return n > 1 ? n * fact(n – 1) : 1; }

59.Write a program which uses Command Line Arguments?Ans:

#includevoid main(int argc,char *argv[]){int i;clrscr();for(i=0;iprintf(“\n%d”,argv[i]);}

60. Difference between array and pointer?Ans:Array1- Array allocates space automatically2- It cannot be resized3- It cannot be reassigned4- sizeof (arrayname) gives the number of bytes occupied by the array.Pointer1-Explicitly assigned to point to an allocated space.2-It can be sized using realloc()3-pointer can be reassigned.4-sizeof (p) returns the number of bytes used to store the pointer variable p.

c language interview questions | Part7July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

Pointers. This is because memory layout of structures is machine and compilerdependent. Therefore, structures written as memory images cannot necessarily be read back byprograms running on other machine, and this is the important concern if the data files you’rewriting will ever be interchanged between machines.

58. Write a program which employs Recursion?Ans: int fact(int n) { return n > 1 ? n * fact(n – 1) : 1; }

59.Write a program which uses Command Line Arguments?Ans:

#includevoid main(int argc,char *argv[]){int i;clrscr();for(i=0;iprintf(“\n%d”,argv[i]);}

60. Difference between array and pointer?Ans:Array1- Array allocates space automatically2- It cannot be resized3- It cannot be reassigned4- sizeof (arrayname) gives the number of bytes occupied by the array.Pointer1-Explicitly assigned to point to an allocated space.2-It can be sized using realloc()3-pointer can be reassigned.4-sizeof (p) returns the number of bytes used to store the pointer variable p.

c language interview questions | Part7July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

Page 14: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

61. What do the ‘c’ and ‘v’ in argc and argv stand for?Ans: The c in argc(argument count) stands for the number of command line argument theprogram isinvoked with and v in argv(argument vector) is a pointer to an array of character string thatcontain the arguments.

62. IMP>what are C tokens?Ans: There are six classes of tokens: identifier, keywords, constants, string literals, operators andother separators.

63. What are C identifiers?Ans: These are names given to various programming element such as variables, function,arrays.It is a combination of letter, digit and underscore.It should begin with letter. Backspace isnot allowed.

64. Difference between syntax vs logical error?Ans:Syntax Error1-These involves validation of syntax of language.2-compiler prints diagnostic message.

Logical Error1-logical error are caused by an incorrect algorithm or by a statement mistyped in such a waythat it doesn’t violet syntax of language.2-difficult to find.

65. What is preincrement and post increment?Ans: ++n (pre increment) increments n before its value is used in an assignment operation or anyexpression containing it. n++ (post increment) does increment after the value of n is used.

66. Write a program to interchange 2 variables without using the third one.Ans:a ^= b; ie a=a^bb ^= a; ie b=b^a;a ^= b ie a=a^b;here the numbers are converted into binary and then xor operation is performed.You know, you’re just asking “have you seen this overly clever trick that’s not worth applyingonmodern architectures and only really applies to integer variables?”

67. What is the maximum combined length of command line arguments including the spacebetween adjacent arguments?Ans: It depends on the operating system.

68. What are bit fields? What is the use of bit fields in a Structure declaration?Ans: A bit field is a set of adjacent bits within a single implementation based storage unit that we

Page 15: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

will call a “word”.The syntax of field definition and access is based on structure.Struct {unsigned int k :1;unsigned int l :1;unsigned int m :1;}flags;the number following the colon represents the field width in bits.Flag is a variable that containsthree bit fields.

69. What is a preprocessor, what are the advantages of preprocessor?Ans: A preprocessor processes the source code program before it passes through the compiler.1- a preprocessor involves the readability of program2- It facilitates easier modification3- It helps in writing portable programs4- It enables easier debugging5- It enables testing a part of program6- It helps in developing generalized program

70. What are the facilities provided by preprocessor?Ans:1-file inclusion2-substitution facility3-conditional compilation

c language interview questions | Part8July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

71. What are the two forms of #include directive?Ans:1.#include”filename”2.#includethe first form is used to search the directory that contains the source file.If the search fails in thehome directory it searches the implementation defined locations.In the second form ,thepreprocessor searches the file only in the implementation defined locations.

will call a “word”.The syntax of field definition and access is based on structure.Struct {unsigned int k :1;unsigned int l :1;unsigned int m :1;}flags;the number following the colon represents the field width in bits.Flag is a variable that containsthree bit fields.

69. What is a preprocessor, what are the advantages of preprocessor?Ans: A preprocessor processes the source code program before it passes through the compiler.1- a preprocessor involves the readability of program2- It facilitates easier modification3- It helps in writing portable programs4- It enables easier debugging5- It enables testing a part of program6- It helps in developing generalized program

70. What are the facilities provided by preprocessor?Ans:1-file inclusion2-substitution facility3-conditional compilation

c language interview questions | Part8July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

71. What are the two forms of #include directive?Ans:1.#include”filename”2.#includethe first form is used to search the directory that contains the source file.If the search fails in thehome directory it searches the implementation defined locations.In the second form ,thepreprocessor searches the file only in the implementation defined locations.

will call a “word”.The syntax of field definition and access is based on structure.Struct {unsigned int k :1;unsigned int l :1;unsigned int m :1;}flags;the number following the colon represents the field width in bits.Flag is a variable that containsthree bit fields.

69. What is a preprocessor, what are the advantages of preprocessor?Ans: A preprocessor processes the source code program before it passes through the compiler.1- a preprocessor involves the readability of program2- It facilitates easier modification3- It helps in writing portable programs4- It enables easier debugging5- It enables testing a part of program6- It helps in developing generalized program

70. What are the facilities provided by preprocessor?Ans:1-file inclusion2-substitution facility3-conditional compilation

c language interview questions | Part8July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

71. What are the two forms of #include directive?Ans:1.#include”filename”2.#includethe first form is used to search the directory that contains the source file.If the search fails in thehome directory it searches the implementation defined locations.In the second form ,thepreprocessor searches the file only in the implementation defined locations.

Page 16: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

72. How would you use the functions randomize() and random()?Ans:Randomize() initiates random number generation with a random value.Random() generates random number between 0 and n-1;

73. What do the functions atoi(), itoa() and gcvt() do?Ans:atoi() is a macro that converts integer to character.itoa() It converts an integer to stringgcvt() It converts a floating point number to string

74. How would you use the functions fseek(), freed(), fwrite() and ftell()?Ans:fseek(f,1,i) Move the pointer for file f a distance 1 byte from location i.fread(s,i1,i2,f) Enter i2 dataitems,each of size i1 bytes,from file f to string s.fwrite(s,i1,i2,f) send i2 data items,each of size i1 bytes from string s to file f.ftell(f) Return the current pointer position within file f.

The data type returned for functions fread,fseek and fwrite is int and ftell is long int.

75. What is the difference between the functions memmove() and memcpy()?Ans: The arguments of memmove() can overlap in memory. The arguments of memcpy()cannot.

76. What is a file?Ans: A file is a region of storage in hard disks or in auxiliary storage devices.It contains bytes ofinformation .It is not a data type.

77. IMP>what are the types of file?Ans: Files are of two types1-high level files (stream oriented files) :These files are accessed using library functions2-low level files(system oriented files) :These files are accessed using system calls

78. IMP>what is a stream?Ans: A stream is a source of data or destination of data that may be associated with a disk orotherI/O device. The source stream provides data to a program and it is known as input stream. Thedestination stream eceives the output from the program and is known as output stream.

79. What is meant by file opening?Ans: The action of connecting a program to a file is called opening of a file. This requirescreatingan I/O stream before reading or writing the data.

Page 17: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

80. What is FILE?Ans: FILE is a predefined data type. It is defined in stdio.h file.

c language interview questions | Part9July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

81. What is a file pointer?Ans: The pointer to a FILE data type is called as a stream pointer or a file pointer. A file pointerpoints to the block of information of the stream that had just been opened.

82. How is fopen()used ?Ans: The function fopen() returns a file pointer. Hence a file pointer is declared and it isassignedasFILE *fp;fp= fopen(filename,mode);filename is a string representing the name of the file and the mode represents:“r” for read operation“w” for write operation“a” for append operation“r+”,”w+”,”a+” for update operation

83How is a file closed ?Ans: A file is closed using fclose() functionEg. fclose(fp);Where fp is a file pointer.

84. What is a random access file?Ans:A file can be accessed at random using fseek() functionfseek(fp,position,origin);fp file pointerposition number of bytes offset from originorigin 0,1 or 2 denote the beginning ,current position or end of file respectively.

80. What is FILE?Ans: FILE is a predefined data type. It is defined in stdio.h file.

c language interview questions | Part9July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

81. What is a file pointer?Ans: The pointer to a FILE data type is called as a stream pointer or a file pointer. A file pointerpoints to the block of information of the stream that had just been opened.

82. How is fopen()used ?Ans: The function fopen() returns a file pointer. Hence a file pointer is declared and it isassignedasFILE *fp;fp= fopen(filename,mode);filename is a string representing the name of the file and the mode represents:“r” for read operation“w” for write operation“a” for append operation“r+”,”w+”,”a+” for update operation

83How is a file closed ?Ans: A file is closed using fclose() functionEg. fclose(fp);Where fp is a file pointer.

84. What is a random access file?Ans:A file can be accessed at random using fseek() functionfseek(fp,position,origin);fp file pointerposition number of bytes offset from originorigin 0,1 or 2 denote the beginning ,current position or end of file respectively.

80. What is FILE?Ans: FILE is a predefined data type. It is defined in stdio.h file.

c language interview questions | Part9July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

81. What is a file pointer?Ans: The pointer to a FILE data type is called as a stream pointer or a file pointer. A file pointerpoints to the block of information of the stream that had just been opened.

82. How is fopen()used ?Ans: The function fopen() returns a file pointer. Hence a file pointer is declared and it isassignedasFILE *fp;fp= fopen(filename,mode);filename is a string representing the name of the file and the mode represents:“r” for read operation“w” for write operation“a” for append operation“r+”,”w+”,”a+” for update operation

83How is a file closed ?Ans: A file is closed using fclose() functionEg. fclose(fp);Where fp is a file pointer.

84. What is a random access file?Ans:A file can be accessed at random using fseek() functionfseek(fp,position,origin);fp file pointerposition number of bytes offset from originorigin 0,1 or 2 denote the beginning ,current position or end of file respectively.

Page 18: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

85. What is the purpose of ftell ?Ans: The function ftell() is used to get the current file represented by the file pointer.ftell(fp);returns a long integer value representing the current file position of the file pointed by thefile pointer fp.If an error occurs ,-1 is returned.

86. What is the purpose of rewind() ?Ans: The function rewind is used to bring the file pointer to the beginning of the file.Rewind(fp);Where fp is a file pointer.Also we can get the same effect byfeek(fp,0,0);

87. Difference between a array name and a pointer variable?Ans: A pointer variable is a variable where as an array name is a fixed address and is not avariable. Apointer variable must be initialized but an array name cannot be initialized. An array name beinga constant value , ++ and — operators cannot be applied to it.

88. Represent a two-dimensional array using pointer?Ans:Address of a[I][j] Value of a[I][j]&a[I][j]ora[I] + jor*(a+I) + j*&a[I][j] or a[I][j]or*(a[I] + j )or*( * ( a+I) +j )

89. Difference between an array of pointers and a pointer to an array?Ans:Array of pointers1- Declaration is: data_type *array_name[size];2-Size represents the row size.3- The space for columns may be dynamically

Pointers to an array1-Declaration is data_type ( *array_name)[size];2-Size represents the column size.

90. Can we use any name in place of argv and argc as command line arguments ?Ans: yes we can use any user defined name in place of argc and argv;

Page 19: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

c language interview questions | Part10July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

91. What are the pointer declarations used in C?Ans:1- Array of pointers, e.g , int *a[10]; Array of pointers to integer2-Pointers to an array,e.g , int (*a)[10]; Pointer to an array of into3-Function returning a pointer,e.g, float *f( ) ; Function returning a pointer to float4-Pointer to a pointer ,e.g, int **x; Pointer to apointer to int5-pointer to a data type ,e.g, char *p; pointer to char

92. Differentiate between a constant pointer and pointer to a constant?Ans:const char *p; //pointer to a const character.char const *p; //pointer to a const character.char * const p; //const pointer to a char variable.const char * const p; // const pointer to a const character.

93. Is the allocated space within a function automatically deallocated when the functionreturns?Ans: No pointer is different from what it points to .Local variables including local pointersvariables in a function are deallocated automatically when function returns.,But in case of alocal pointer variable ,deallocation means that the pointer is deallocated and not the block ofmemory allocated to it. Memory dynamically allocated always persists until the allocation isfreedor the program terminates.

94. Discuss on pointer arithmetic?Ans:1- Assignment of pointers to the same type of pointers.2- Adding or subtracting a pointer and an integer.3-subtracting or comparing two pointer.4-incrementing or decrementing the pointers pointing to the elements of an array. When a pointerto an integer is incremented by one , the address is incremented by two. It is done automaticallyby the compiler.

c language interview questions | Part10July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

91. What are the pointer declarations used in C?Ans:1- Array of pointers, e.g , int *a[10]; Array of pointers to integer2-Pointers to an array,e.g , int (*a)[10]; Pointer to an array of into3-Function returning a pointer,e.g, float *f( ) ; Function returning a pointer to float4-Pointer to a pointer ,e.g, int **x; Pointer to apointer to int5-pointer to a data type ,e.g, char *p; pointer to char

92. Differentiate between a constant pointer and pointer to a constant?Ans:const char *p; //pointer to a const character.char const *p; //pointer to a const character.char * const p; //const pointer to a char variable.const char * const p; // const pointer to a const character.

93. Is the allocated space within a function automatically deallocated when the functionreturns?Ans: No pointer is different from what it points to .Local variables including local pointersvariables in a function are deallocated automatically when function returns.,But in case of alocal pointer variable ,deallocation means that the pointer is deallocated and not the block ofmemory allocated to it. Memory dynamically allocated always persists until the allocation isfreedor the program terminates.

94. Discuss on pointer arithmetic?Ans:1- Assignment of pointers to the same type of pointers.2- Adding or subtracting a pointer and an integer.3-subtracting or comparing two pointer.4-incrementing or decrementing the pointers pointing to the elements of an array. When a pointerto an integer is incremented by one , the address is incremented by two. It is done automaticallyby the compiler.

c language interview questions | Part10July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

91. What are the pointer declarations used in C?Ans:1- Array of pointers, e.g , int *a[10]; Array of pointers to integer2-Pointers to an array,e.g , int (*a)[10]; Pointer to an array of into3-Function returning a pointer,e.g, float *f( ) ; Function returning a pointer to float4-Pointer to a pointer ,e.g, int **x; Pointer to apointer to int5-pointer to a data type ,e.g, char *p; pointer to char

92. Differentiate between a constant pointer and pointer to a constant?Ans:const char *p; //pointer to a const character.char const *p; //pointer to a const character.char * const p; //const pointer to a char variable.const char * const p; // const pointer to a const character.

93. Is the allocated space within a function automatically deallocated when the functionreturns?Ans: No pointer is different from what it points to .Local variables including local pointersvariables in a function are deallocated automatically when function returns.,But in case of alocal pointer variable ,deallocation means that the pointer is deallocated and not the block ofmemory allocated to it. Memory dynamically allocated always persists until the allocation isfreedor the program terminates.

94. Discuss on pointer arithmetic?Ans:1- Assignment of pointers to the same type of pointers.2- Adding or subtracting a pointer and an integer.3-subtracting or comparing two pointer.4-incrementing or decrementing the pointers pointing to the elements of an array. When a pointerto an integer is incremented by one , the address is incremented by two. It is done automaticallyby the compiler.

Page 20: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

5-Assigning the value 0 to the pointer variable and comparing 0 with the pointer. The pointerhaving address 0 points to nowhere at all.

95. What is the invalid pointer arithmetic?Ans:i) adding ,multiplying and dividing two pointers.ii) Shifting or masking pointer.iii) Addition of float or double to pointer.iv) Assignment of a pointer of one type to a pointer of another type ?

96. What are the advantages of using array of pointers to string instead of an array ofstrings?Ans:i) Efficient use of memory.ii) Easier to exchange the strings by moving their pointers while sorting.

97. Are the expressions *ptr ++ and ++ *ptr same?Ans: No,*ptr ++ increments pointer and not the value pointed by it. Whereas ++ *ptrincrements the value being pointed to by ptr.

98. What would be the equivalent pointer expression foe referring the same element asa[p][q][r][s] ?Ans : *( * ( * ( * (a+p) + q ) + r ) + s)

99. Are the variables argc and argv are always local to main?Ans: Yes they are local to main.

100. Can main () be called recursively?Ans: Yes any function including main () can be called recursively.

c language interview questions | Part 11July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

101. IMP>Can we initialize unions?Ans: ANSI Standard C allows an initializer for the first member of a union. There is no standardwayof initializing any other member (nor, under a pre-ANSI compiler, is there generally any way of

5-Assigning the value 0 to the pointer variable and comparing 0 with the pointer. The pointerhaving address 0 points to nowhere at all.

95. What is the invalid pointer arithmetic?Ans:i) adding ,multiplying and dividing two pointers.ii) Shifting or masking pointer.iii) Addition of float or double to pointer.iv) Assignment of a pointer of one type to a pointer of another type ?

96. What are the advantages of using array of pointers to string instead of an array ofstrings?Ans:i) Efficient use of memory.ii) Easier to exchange the strings by moving their pointers while sorting.

97. Are the expressions *ptr ++ and ++ *ptr same?Ans: No,*ptr ++ increments pointer and not the value pointed by it. Whereas ++ *ptrincrements the value being pointed to by ptr.

98. What would be the equivalent pointer expression foe referring the same element asa[p][q][r][s] ?Ans : *( * ( * ( * (a+p) + q ) + r ) + s)

99. Are the variables argc and argv are always local to main?Ans: Yes they are local to main.

100. Can main () be called recursively?Ans: Yes any function including main () can be called recursively.

c language interview questions | Part 11July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

101. IMP>Can we initialize unions?Ans: ANSI Standard C allows an initializer for the first member of a union. There is no standardwayof initializing any other member (nor, under a pre-ANSI compiler, is there generally any way of

5-Assigning the value 0 to the pointer variable and comparing 0 with the pointer. The pointerhaving address 0 points to nowhere at all.

95. What is the invalid pointer arithmetic?Ans:i) adding ,multiplying and dividing two pointers.ii) Shifting or masking pointer.iii) Addition of float or double to pointer.iv) Assignment of a pointer of one type to a pointer of another type ?

96. What are the advantages of using array of pointers to string instead of an array ofstrings?Ans:i) Efficient use of memory.ii) Easier to exchange the strings by moving their pointers while sorting.

97. Are the expressions *ptr ++ and ++ *ptr same?Ans: No,*ptr ++ increments pointer and not the value pointed by it. Whereas ++ *ptrincrements the value being pointed to by ptr.

98. What would be the equivalent pointer expression foe referring the same element asa[p][q][r][s] ?Ans : *( * ( * ( * (a+p) + q ) + r ) + s)

99. Are the variables argc and argv are always local to main?Ans: Yes they are local to main.

100. Can main () be called recursively?Ans: Yes any function including main () can be called recursively.

c language interview questions | Part 11July 18th, 2010

If you would like to view All C language interview questions only at one place visit below linkAll C Language Interview Questions

101. IMP>Can we initialize unions?Ans: ANSI Standard C allows an initializer for the first member of a union. There is no standardwayof initializing any other member (nor, under a pre-ANSI compiler, is there generally any way of

Page 21: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

initializing a union at all).

102. What’s the difference between these two declarations?Ans: struct x1 { … };typedef struct { … } x2;The first form declares a structure tag; the second declares a typedef. The main difference is thatthe second declaration is of a slightly more abstract type.its users don’t necessarily know that itis a structure, and the keyword struct is not used when declaring instances of it.

103. Why doesn’t this code: a[i] = i++; work?Ans: The subexpression i++ causes a side effect.it modifies i’s value.which leads to undefinedbehavior since i is also referenced elsewhere in the same expression.

104.WHy doesn’t struct x { … };x thestruct;work?Ans:C is not C++. Typedef names are not automatically generated for structure tags.

105. Why can’t we compare structures?Ans:There is no single, good way for a compiler to implement structure comparison which isconsistent with C’s low-level flavor. A simple byte-by-byte comparison could founder onrandom bits present in unused “holes” in the structure (such padding is used to keep thealignment of later fields correct). A field-by-field comparison might require unacceptableamounts of repetitive code for large structures.

106. How are structure passing and returning implemented?Ans: When structures are passed as arguments to functions, the entire structure is typicallypushed onthe stack, using as many words as are required. Some compilers merely pass a pointer to thestructure, though they may have to make a local copy to preserve pass-by-value semantics.Structures are often returned from functions in a location pointed to by an extra,compiler-supplied “hidden” argument to the function. Some older compilers used a special,static locationfor structure returns, although this made structure-valued functions non-reentrant, which ANSI Cdisallows.

Page 22: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

C++ Questions

1.What is a class?2.What is an object?3.What is the difference between an object and a class?4.What is the difference between class and structure?5.Define object based programming language ?6.Define object oriented language ?7.Define OOPs?8.What is public, protected, private?9.What is a scope resolution operator?10.What do you mean by inheritance?11.What is abstraction?12.What is encapsulation?13.How variable declaration in c++ differs that in c ?14.What are the c++ tokens ?15.what do you mean by reference variable in c++ ?16.what do you mean by implicit conversion ?17.what is the difference between method overloading and method overriding?18.What are the defining traits of an object-oriented language?19.What is polymorphism ?20.What do you mean by inline function?21 What is the difference between a NULL pointer and a void pointer?22.What is difference between C++ and Java?23.What do you mean by multiple inheritance in C++ ?24.What do you mean by virtual methods ?25.What do you mean by static methods ?26.How many ways are there to initialize an int with a constant?27.What is constructors?28.What is destructors?29.What is an explicit constructor?30 What is the Standard Template Library?31.What problem does the namespace feature solve?32.What is the use of ‘using’ declaration ?33.What is a template ?34.Differentiate between a template class and class template ?35.What is the difference between a copy constructor and an overloaded assignment operator?36.What is a virtual destructor?37.What is an incomplete type?38.What do you mean by Stack unwinding?39.What is a container class? What are the types of container classes?40.Name some pure object oriented languages ?41.Name the operators that cannot be overloaded ?42.What is an adaptor class or Wrapper class?43.What is a Null object?44.What is class invariant?

Page 23: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

45.What is a dangling pointer?46.Differentiate between the message and method ?47.How can we access protected and private members of a class ?48.Can you handle exception in C++ ?49.What is virtual function ?50.What do you mean by early binding ?51.What do you mean by late binding ?

c++ interview questions and answers | Part1July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

1. What is a class?Ans: The objects with the same data structure (attributes) and behavior (operations) are calledclass.

2. What is an object?Ans: It is an entity which may correspond to real-world entities such as students, employees,bank account. It may be concrete such as file system or conceptual such as scheduling policies inmultiprocessor operating system.Every object will have data structures called attributes and behavior called operations.

3. What is the difference between an object and a class?Ans: All objects possessing similar properties are grouped into class.Example :–person is a class, ram, hari are objects of person class. All have similar attributes likename, age, sex and similar operations like speak, walk.

Class person{private:char name[20];int age;char sex;public: speak();walk();};

45.What is a dangling pointer?46.Differentiate between the message and method ?47.How can we access protected and private members of a class ?48.Can you handle exception in C++ ?49.What is virtual function ?50.What do you mean by early binding ?51.What do you mean by late binding ?

c++ interview questions and answers | Part1July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

1. What is a class?Ans: The objects with the same data structure (attributes) and behavior (operations) are calledclass.

2. What is an object?Ans: It is an entity which may correspond to real-world entities such as students, employees,bank account. It may be concrete such as file system or conceptual such as scheduling policies inmultiprocessor operating system.Every object will have data structures called attributes and behavior called operations.

3. What is the difference between an object and a class?Ans: All objects possessing similar properties are grouped into class.Example :–person is a class, ram, hari are objects of person class. All have similar attributes likename, age, sex and similar operations like speak, walk.

Class person{private:char name[20];int age;char sex;public: speak();walk();};

45.What is a dangling pointer?46.Differentiate between the message and method ?47.How can we access protected and private members of a class ?48.Can you handle exception in C++ ?49.What is virtual function ?50.What do you mean by early binding ?51.What do you mean by late binding ?

c++ interview questions and answers | Part1July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

1. What is a class?Ans: The objects with the same data structure (attributes) and behavior (operations) are calledclass.

2. What is an object?Ans: It is an entity which may correspond to real-world entities such as students, employees,bank account. It may be concrete such as file system or conceptual such as scheduling policies inmultiprocessor operating system.Every object will have data structures called attributes and behavior called operations.

3. What is the difference between an object and a class?Ans: All objects possessing similar properties are grouped into class.Example :–person is a class, ram, hari are objects of person class. All have similar attributes likename, age, sex and similar operations like speak, walk.

Class person{private:char name[20];int age;char sex;public: speak();walk();};

Page 24: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

4. What is the difference between class and structure?Ans: In class the data members by default are private but in structure they are by default public

5. Define object based programming language?Ans: Object based programming language support encapsulation and object identity withoutsupporting some important features of OOPs language.Object based language=Encapsulation + object Identity

6. Define object oriented language?Ans: Object-oriented language incorporates all the features of object based programminglanguages along with inheritance and polymorphism.Example: – c++, java.

7. Define OOPs?Ans: OOP is a method of implementation in which programs are organized as co-operativecollection of objects, each of which represents an instance of some class and whose classes areall member of a hierarchy of classes united through the property of inheritance.

8. What is public, protected, and private?Ans: These are access specifier or a visibility lebels .The class member that has been declared asprivate can be accessed only from within the class. Public members can be accessed from outsidethe class also. Within the class or from the object of a class protected access limit is same as thatof private but it plays a prominent role in case of inheritance

9. What is a scope resolution operator?Ans: The scope resolution operator permits a program to reference an identifier in the globalscope that has been hidden by another identifier with the same name in the local scope.

10. What do you mean by inheritance?Ans: The mechanism of deriving a new class (derived) from an old class (base class) is calledinheritance. It allows the extension and reuse of existing code without having to rewrite the codefrom scratch.

c++ interview questions and answers | Part2July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

4. What is the difference between class and structure?Ans: In class the data members by default are private but in structure they are by default public

5. Define object based programming language?Ans: Object based programming language support encapsulation and object identity withoutsupporting some important features of OOPs language.Object based language=Encapsulation + object Identity

6. Define object oriented language?Ans: Object-oriented language incorporates all the features of object based programminglanguages along with inheritance and polymorphism.Example: – c++, java.

7. Define OOPs?Ans: OOP is a method of implementation in which programs are organized as co-operativecollection of objects, each of which represents an instance of some class and whose classes areall member of a hierarchy of classes united through the property of inheritance.

8. What is public, protected, and private?Ans: These are access specifier or a visibility lebels .The class member that has been declared asprivate can be accessed only from within the class. Public members can be accessed from outsidethe class also. Within the class or from the object of a class protected access limit is same as thatof private but it plays a prominent role in case of inheritance

9. What is a scope resolution operator?Ans: The scope resolution operator permits a program to reference an identifier in the globalscope that has been hidden by another identifier with the same name in the local scope.

10. What do you mean by inheritance?Ans: The mechanism of deriving a new class (derived) from an old class (base class) is calledinheritance. It allows the extension and reuse of existing code without having to rewrite the codefrom scratch.

c++ interview questions and answers | Part2July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

4. What is the difference between class and structure?Ans: In class the data members by default are private but in structure they are by default public

5. Define object based programming language?Ans: Object based programming language support encapsulation and object identity withoutsupporting some important features of OOPs language.Object based language=Encapsulation + object Identity

6. Define object oriented language?Ans: Object-oriented language incorporates all the features of object based programminglanguages along with inheritance and polymorphism.Example: – c++, java.

7. Define OOPs?Ans: OOP is a method of implementation in which programs are organized as co-operativecollection of objects, each of which represents an instance of some class and whose classes areall member of a hierarchy of classes united through the property of inheritance.

8. What is public, protected, and private?Ans: These are access specifier or a visibility lebels .The class member that has been declared asprivate can be accessed only from within the class. Public members can be accessed from outsidethe class also. Within the class or from the object of a class protected access limit is same as thatof private but it plays a prominent role in case of inheritance

9. What is a scope resolution operator?Ans: The scope resolution operator permits a program to reference an identifier in the globalscope that has been hidden by another identifier with the same name in the local scope.

10. What do you mean by inheritance?Ans: The mechanism of deriving a new class (derived) from an old class (base class) is calledinheritance. It allows the extension and reuse of existing code without having to rewrite the codefrom scratch.

c++ interview questions and answers | Part2July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

Page 25: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

11. What is abstraction?Ans: The technique of creating user-defined data types, having the properties of built-in datatypes and a set of permitted operators that are well suited to the application to be programmed isknown as data abstraction. Class is a construct for abstract data types (ADT).

12. What is encapsulation?Ans: It is the mechanism that wraps the data and function it manipulates into single unit andkeeps it safe from external interference.

13. How variable declaration in c++ differs that in c?Ans: C requires all the variables to be declared at the beginning of a scope but in c++ we candeclare variables anywhere in the scope. This makes the programmer easier to understandbecause the variables are declared in the context of their use.

14. What are the c++ tokens?Ans: c++ has the following tokensI. keywordsII. IdentifiersIII. ConstantsIV. StringsV. operators

15. What do you mean by reference variable in c++?Ans: A reference variable provides an alias to a previously defined variable.Data type & reference-name = variable name

16. What do you mean by implicit conversion?Ans: Whenever data types are mixed in an expression then c++ performs the conversionautomatically.Here smaller type is converted to wider type.Example- in case of integer and float integer is converted into float type.

17. What is the difference between method overloading and method overriding?Ans: Overloading a method (or function) in C++ is the ability for functions of the same name tobe defined as long as these methods have different signatures (different set of parameters).Method overriding is the ability of the inherited class rewriting the virtual method of the baseclass.

18. What are the defining traits of an object-oriented language?The defining traits of an object-oriented language are:encapsulationinheritancepolymorphismAns:Polymorphism: is a feature of OOPL that at run time depending upon the type of object theappropriate method is called.

Page 26: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Inheritance: is a feature of OOPL that represents the “is a” relationship between differentobjects (classes). Say in real life a manager is a employee. So in OOPL manger class is inheritedfrom the employee class.

Encapsulation: is a feature of OOPL that is used to hide the information.

19. What is polymorphism?Ans: Polymorphism is the idea that a base class can be inherited by several classes. A base classpointer can point to its child class and a base class array can store different child class objects.

20. What do you mean by inline function?Ans: An inline function is a function that is expanded inline when invoked.ie. the compilerreplaces the function call with the corresponding function code. An inline function is a functionthat is expanded in line when it is invoked. That is the compiler replaces the function call withthe corresponding function code (similar to macro).

c++ interview questions and answers | Part3July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

21 What is the difference between a NULL pointer and a void pointer?Ans: A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer toan object of an unknown type, and is guaranteed to have enough bits to hold a pointer to anyobject. A void pointer is not guaranteed to have enough bits to point to a function (though ingeneral practice it does).

22. What is difference between C++ and Java?Ans: C++ has pointers Java does not.Java is platform independent C++ is not.Java has garbage collection C++ does not.

23. What do you mean by multiple inheritance in C++ ?Ans: Multiple inheritance is a feature in C++ by which one class can be of different types. Sayclass teaching Assistant is inherited from two classes say teacher and Student.

24. What do you mean by virtual methods?Ans: virtual methods are used to use the polymorphism feature in C++. Say class A is inheritedfrom class B. If we declare say function f() as virtual in class B and override the same function in

Inheritance: is a feature of OOPL that represents the “is a” relationship between differentobjects (classes). Say in real life a manager is a employee. So in OOPL manger class is inheritedfrom the employee class.

Encapsulation: is a feature of OOPL that is used to hide the information.

19. What is polymorphism?Ans: Polymorphism is the idea that a base class can be inherited by several classes. A base classpointer can point to its child class and a base class array can store different child class objects.

20. What do you mean by inline function?Ans: An inline function is a function that is expanded inline when invoked.ie. the compilerreplaces the function call with the corresponding function code. An inline function is a functionthat is expanded in line when it is invoked. That is the compiler replaces the function call withthe corresponding function code (similar to macro).

c++ interview questions and answers | Part3July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

21 What is the difference between a NULL pointer and a void pointer?Ans: A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer toan object of an unknown type, and is guaranteed to have enough bits to hold a pointer to anyobject. A void pointer is not guaranteed to have enough bits to point to a function (though ingeneral practice it does).

22. What is difference between C++ and Java?Ans: C++ has pointers Java does not.Java is platform independent C++ is not.Java has garbage collection C++ does not.

23. What do you mean by multiple inheritance in C++ ?Ans: Multiple inheritance is a feature in C++ by which one class can be of different types. Sayclass teaching Assistant is inherited from two classes say teacher and Student.

24. What do you mean by virtual methods?Ans: virtual methods are used to use the polymorphism feature in C++. Say class A is inheritedfrom class B. If we declare say function f() as virtual in class B and override the same function in

Inheritance: is a feature of OOPL that represents the “is a” relationship between differentobjects (classes). Say in real life a manager is a employee. So in OOPL manger class is inheritedfrom the employee class.

Encapsulation: is a feature of OOPL that is used to hide the information.

19. What is polymorphism?Ans: Polymorphism is the idea that a base class can be inherited by several classes. A base classpointer can point to its child class and a base class array can store different child class objects.

20. What do you mean by inline function?Ans: An inline function is a function that is expanded inline when invoked.ie. the compilerreplaces the function call with the corresponding function code. An inline function is a functionthat is expanded in line when it is invoked. That is the compiler replaces the function call withthe corresponding function code (similar to macro).

c++ interview questions and answers | Part3July 24th, 2010

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

21 What is the difference between a NULL pointer and a void pointer?Ans: A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer toan object of an unknown type, and is guaranteed to have enough bits to hold a pointer to anyobject. A void pointer is not guaranteed to have enough bits to point to a function (though ingeneral practice it does).

22. What is difference between C++ and Java?Ans: C++ has pointers Java does not.Java is platform independent C++ is not.Java has garbage collection C++ does not.

23. What do you mean by multiple inheritance in C++ ?Ans: Multiple inheritance is a feature in C++ by which one class can be of different types. Sayclass teaching Assistant is inherited from two classes say teacher and Student.

24. What do you mean by virtual methods?Ans: virtual methods are used to use the polymorphism feature in C++. Say class A is inheritedfrom class B. If we declare say function f() as virtual in class B and override the same function in

Page 27: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

class A then at runtime appropriate method of the class will be called depending upon the type ofthe object.

25. What do you mean by static methods?Ans: By using the static method there is no need creating an object of that class to use thatmethod. We can directly call that method on that class. For example, say class A has staticfunction f(), then we can call f() function as A.f(). There is no need of creating an object of classA.

26. How many ways are there to initialize an int with a constant?Ans: Two.There are two formats for initializers in C++ as shown in the example that follows. The firstformat uses the traditional C notation. The second format uses constructor notation.int foo = 123;int bar (123);

27. What is a constructor?Ans: Constructor is a special member function of a class, which is invoked automaticallywhenever an instance of the class is created. It has the same name as its class.

28. What is destructor?Ans: Destructor is a special member function of a class, which is invoked automaticallywhenever an object goes out of the scope. It has the same name as its class with a tilde characterprefixed.

29. What is an explicit constructor?Ans: A conversion constructor declared with the explicit keyword. The compiler does not use anexplicit constructor to implement an implied conversion of types. It’s purpose is reservedexplicitly for construction.

30 What is the Standard Template Library?Ans: A library of container templates approved by the ANSI committee for inclusion in thestandard C++ specification. A programmer who then launches into a discussion of the genericprogramming model, iterators, allocators, algorithms, and such, has a higher than averageunderstanding of the new technology that STL brings to C++ programming.

c++ interview questions and answers | Part4July 25th, 2010

class A then at runtime appropriate method of the class will be called depending upon the type ofthe object.

25. What do you mean by static methods?Ans: By using the static method there is no need creating an object of that class to use thatmethod. We can directly call that method on that class. For example, say class A has staticfunction f(), then we can call f() function as A.f(). There is no need of creating an object of classA.

26. How many ways are there to initialize an int with a constant?Ans: Two.There are two formats for initializers in C++ as shown in the example that follows. The firstformat uses the traditional C notation. The second format uses constructor notation.int foo = 123;int bar (123);

27. What is a constructor?Ans: Constructor is a special member function of a class, which is invoked automaticallywhenever an instance of the class is created. It has the same name as its class.

28. What is destructor?Ans: Destructor is a special member function of a class, which is invoked automaticallywhenever an object goes out of the scope. It has the same name as its class with a tilde characterprefixed.

29. What is an explicit constructor?Ans: A conversion constructor declared with the explicit keyword. The compiler does not use anexplicit constructor to implement an implied conversion of types. It’s purpose is reservedexplicitly for construction.

30 What is the Standard Template Library?Ans: A library of container templates approved by the ANSI committee for inclusion in thestandard C++ specification. A programmer who then launches into a discussion of the genericprogramming model, iterators, allocators, algorithms, and such, has a higher than averageunderstanding of the new technology that STL brings to C++ programming.

c++ interview questions and answers | Part4July 25th, 2010

class A then at runtime appropriate method of the class will be called depending upon the type ofthe object.

25. What do you mean by static methods?Ans: By using the static method there is no need creating an object of that class to use thatmethod. We can directly call that method on that class. For example, say class A has staticfunction f(), then we can call f() function as A.f(). There is no need of creating an object of classA.

26. How many ways are there to initialize an int with a constant?Ans: Two.There are two formats for initializers in C++ as shown in the example that follows. The firstformat uses the traditional C notation. The second format uses constructor notation.int foo = 123;int bar (123);

27. What is a constructor?Ans: Constructor is a special member function of a class, which is invoked automaticallywhenever an instance of the class is created. It has the same name as its class.

28. What is destructor?Ans: Destructor is a special member function of a class, which is invoked automaticallywhenever an object goes out of the scope. It has the same name as its class with a tilde characterprefixed.

29. What is an explicit constructor?Ans: A conversion constructor declared with the explicit keyword. The compiler does not use anexplicit constructor to implement an implied conversion of types. It’s purpose is reservedexplicitly for construction.

30 What is the Standard Template Library?Ans: A library of container templates approved by the ANSI committee for inclusion in thestandard C++ specification. A programmer who then launches into a discussion of the genericprogramming model, iterators, allocators, algorithms, and such, has a higher than averageunderstanding of the new technology that STL brings to C++ programming.

c++ interview questions and answers | Part4July 25th, 2010

Page 28: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

If you would like to view All C++ language interview questions only, at one place, visit belowlink

All C++ Language Interview Questions

31. What problem does the namespace feature solve?Ans: Multiple providers of libraries might use common global identifiers causing a namecollision when an application tries to link with two or more such libraries. The namespacefeature surrounds a library’s external declarations with a unique namespace that eliminates thepotential for those collisions. This solution assumes that two library vendors don’t use the samenamespace identifier, of course.

32. What is the use of ‘using’ declaration?Ans: A using declaration makes it possible to use a name from a namespace

33. What is a template?Ans: Templates allow us to create generic functions that admit any data type as parameters andreturn a value without having to overload the function with all the possible data types. Untilcertain point they fulfill the functionality of a macro. Its prototype is any of the two followingones:template function_declaration;template function_declaration;

34. Differentiate between a template class and class template?Ans:Template class:A generic definition or a parameterized class not instantiated until the client provides the neededinformation. It’s jargon for plain templates.Class template:A class template specifies how individual classes can be constructed much like the way a classspecifies how individual objects can be constructed. It’s jargon for plain classes.

35. What is the difference between a copy constructor and an overloaded assignmentoperator?Ans: A copy constructor constructs a new object by using the content of the argument object. Anoverloaded assignment operator assigns the contents of an existing object to another existingobject of the same class.

36. What is a virtual destructor?Ans: The simple answer is that a virtual destructor is one that is declared with the virtualattribute.

37. What is an incomplete type?Ans: Incomplete type refers to pointers in which there is non availability of the implementationof the referenced location or it points to some location whose value is not available formodification.

Page 29: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Example:int *i=0×400 // i points to address 400*i=0; //set the value of memory location pointed by i.Incomplete types are otherwise called uninitialized pointers.

38. What do you mean by Stack unwinding?Ans: It is a process during exception handling when the destructor is called for all local objectsbetween the place where the exception was thrown and where it is caught.

39. What is a container class? What are the types of container classes?Ans: A container class is a class that is used to hold objects in memory or external storage. Acontainer class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topologyused for maintaining the list of objects in memory. When a container class contains a group ofmixed objects, the container is called a heterogeneous container; when the container is holding agroup of objects that are all the same, the container is called a homogeneous container

40. Name some pure object oriented languages?Ans: Smalltalk, Java, Eiffel, Sather.

c++ interview questions and answers | Part5July 25th, 2010

If you would like to view All C++ language interview questions only at one place visit belowlink

All C++ Language Interview Questions

41. Name the operators that cannot be overloaded?Ans: sizeof, ., .*, .->, ::, ?:

42. What is an adaptor class or Wrapper class?Ans: A class that has no functionality of its own. Its member functions hide the use of a thirdparty software component or an object with the non-compatible interface or a non-object-oriented implementation.

43. What is a Null object?Ans: It is an object of some class whose purpose is to indicate that a real object of that class does

Example:int *i=0×400 // i points to address 400*i=0; //set the value of memory location pointed by i.Incomplete types are otherwise called uninitialized pointers.

38. What do you mean by Stack unwinding?Ans: It is a process during exception handling when the destructor is called for all local objectsbetween the place where the exception was thrown and where it is caught.

39. What is a container class? What are the types of container classes?Ans: A container class is a class that is used to hold objects in memory or external storage. Acontainer class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topologyused for maintaining the list of objects in memory. When a container class contains a group ofmixed objects, the container is called a heterogeneous container; when the container is holding agroup of objects that are all the same, the container is called a homogeneous container

40. Name some pure object oriented languages?Ans: Smalltalk, Java, Eiffel, Sather.

c++ interview questions and answers | Part5July 25th, 2010

If you would like to view All C++ language interview questions only at one place visit belowlink

All C++ Language Interview Questions

41. Name the operators that cannot be overloaded?Ans: sizeof, ., .*, .->, ::, ?:

42. What is an adaptor class or Wrapper class?Ans: A class that has no functionality of its own. Its member functions hide the use of a thirdparty software component or an object with the non-compatible interface or a non-object-oriented implementation.

43. What is a Null object?Ans: It is an object of some class whose purpose is to indicate that a real object of that class does

Example:int *i=0×400 // i points to address 400*i=0; //set the value of memory location pointed by i.Incomplete types are otherwise called uninitialized pointers.

38. What do you mean by Stack unwinding?Ans: It is a process during exception handling when the destructor is called for all local objectsbetween the place where the exception was thrown and where it is caught.

39. What is a container class? What are the types of container classes?Ans: A container class is a class that is used to hold objects in memory or external storage. Acontainer class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topologyused for maintaining the list of objects in memory. When a container class contains a group ofmixed objects, the container is called a heterogeneous container; when the container is holding agroup of objects that are all the same, the container is called a homogeneous container

40. Name some pure object oriented languages?Ans: Smalltalk, Java, Eiffel, Sather.

c++ interview questions and answers | Part5July 25th, 2010

If you would like to view All C++ language interview questions only at one place visit belowlink

All C++ Language Interview Questions

41. Name the operators that cannot be overloaded?Ans: sizeof, ., .*, .->, ::, ?:

42. What is an adaptor class or Wrapper class?Ans: A class that has no functionality of its own. Its member functions hide the use of a thirdparty software component or an object with the non-compatible interface or a non-object-oriented implementation.

43. What is a Null object?Ans: It is an object of some class whose purpose is to indicate that a real object of that class does

Page 30: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

not exist. One common use for a null object is a return value from a member function that issupposed to return an object with some specified properties but cannot find such an object.

44. What is class invariant?Ans: A class invariant is a condition that defines all valid states for an object. It is a logicalcondition to ensure the correct working of a class. Class invariants must hold when an object iscreated, and they must be preserved under all operations of the class. In particular all classinvariants are both preconditions and post-conditions for all operations or member functions ofthe class.

45. What is a dangling pointer?Ans: A dangling pointer arises when you use the address of an object after its lifetime is over.This may occur in situations like returning addresses of the automatic variables from a functionor using the address of the memory block after it is freed. Example: The following code snippetshows this:class Sample{public:int *ptr;Sample(int i){ptr = new int(i);}~Sample(){delete ptr;}void PrintVal(){cout << “The value is ” << *ptr;}};void SomeFunc(Sample x){cout << “Say i am in someFunc ” << endl;}int main(){Sample s1= 10;SomeFunc(s1);s1.PrintVal();}In the above example when PrintVal() function is called it is called by the pointer that has beenfreed by the destructor in SomeFunc.

Page 31: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

46. Differentiate between the message and method?Ans:Message:Objects communicate by sending messages to each other.A message is sent to invoke a method.MethodProvides response to a message and it is an implementation of an operation

47. How can we access protected and private members of a class?Ans: In the case of members protected and private, these could not be accessed from outside thesame class at which they are declared. This rule can be transgressed with the use of the friendkeyword in a class, so we can allow an external function to gain access to the protected andprivate members of a class.

48. Can you handle exception in C++?Ans: Yes we can handle exception in C++ using keyword: try, catch and throw. Programstatements that we want to monitor for exceptions are contained in a try block. If an exceptionoccurs within the try block, it is thrown (using throw).The exception is caught, using catch, andprocessed.

49. What is virtual function?Ans: A virtual function is a member function that is declared within a base class andredefined by a derived class .To create a virtual function, the function declaration in the baseclass is preceded by the keyword virtual.

50. What do you mean by early binding?Ans:Early binding refers to the events that occur at compile time. Early binding occurs whenall information needed to call a function is known at compile time. Examples of early bindinginclude normal function calls, overloaded function calls, and overloaded operators. Theadvantage of early binding is efficiency.

51. What do you mean by late binding?Ans: Late binding refers to function calls that are not resolved until run time. Virtual functionsare used to achieve late binding. When access is via a base pointer or reference, the virtualfunction actually called is determined by the type of object pointed to by the pointer.

Page 32: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

RDBMS Questions

1. What is a Database?2. What is DBMS?3 What is a Catalog?4. What is data ware housing & OLAP?5. What is real time database technology?6. What is program-data independence?7. What is ORDBMS?8. What is program-operation independence?9. What is a view?10. What is OLTP?11. What is the job of DBA?12. Who are db designer?13. What are different types of end users?14. What are the advantages of using a dbms?15. What are the disadvantages of using a dbms?16. What is a data model?17. What are different categories of data models?18. What is schema?19. What are types of schema?20. What is Data independency?21. What are different DBMS languages?22. What are different types of DBMS?23. What is an entity?24. What are attributes?25. What are diff. types of attributes?26. What is difference between entity set and entity type?27. What is domain value or value set of an attribute?28. What is degree of a relationship?29. What is recursive relationship?30. What are relationship constraints?31. What is Cardinality ratio?32. What is a Participation constraint?33. What is a weak entity types?34. What is an ER Diagram?35. What is an EER?36. What is specialization?38. What is generalization?38. What are constraints on generalization and specialization?39. What is a ternary relationship?

Page 33: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

40. What is aggregation and association?41. What is RAID Technology?42. What is Hashing technique?43. What are different types of relational constraints?44. What is difference between a super key, a key, a candidate key and a primary key?45. What is a foreign key?46. What is a transaction?47. What are the properties of transaction?48. What are the basic data base operations?49. What are the disadvantages of not controlling concurrency?50. What are serial, non serial?51. What are conflict serializable schedules?52. What is result equivalent?53. What are conflict equivalent schedules?54. What is a conflict serializable schedule?55. What is view equivalence?56. What is view serializable?57. What are the various methods of controlling concurrency?58. What is a lock?59. What are various types of locking techniques?60. What is a binary lock?61. What is shared or exclusive lock?62. What are different types of two phase lockings(2pl)?63. What is a deadlock?64. What are triggers?

Page 34: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

DBMS interview questions and answers |Part1

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

1.What is a Database?Ans: A database is a collection of related data .A database is a logically coherentcollection of data with some inherent meaning.

2. What is DBMS?Ans: Database Management system is a collection of programs that enables user to create andmaintain a database.Thus a DBMS is a general purposed s/w system that facilitates the process of definingconstructing and manipulating a database for various applications. (Defining a data base involvesspecifying the data types, structures and constraints for the data to be stored in the data database.Constructing a data base is the process of storing data itself on some storage medium that iscontrolled by DBMS. Manipulating a database includes such functions as querying the data baseto retrieve specific data, updating the database to reflect the changes in the mini-world.

3. What is a Catalog?Ans: A catalog is a table that contain the information such as structure of each file ,the type and storage format of each data item and various constraints on the data .The information stored in the catalog is called Metadata . Whenever a request ismade to access a particular data, the DBMS s/w refers to the catalog to determinethe structure of the file.

4. What is data ware housing & OLAP?Ans: Data warehousing and OLAP (online analytical processing ) systems are thetechniques used in many companies to extract and analyze useful informationfrom very large databases for decision making .

5. What is real time database technology?Ans: These are all the techniques used in controlling industrial and manufacturingprocesses.

6. What is program-data independence?Ans: Unlike in the traditional file sys. the structure of the data files is stored in theDBMS catalog separately from the access programs . This property is called

DBMS interview questions and answers |Part1

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

1.What is a Database?Ans: A database is a collection of related data .A database is a logically coherentcollection of data with some inherent meaning.

2. What is DBMS?Ans: Database Management system is a collection of programs that enables user to create andmaintain a database.Thus a DBMS is a general purposed s/w system that facilitates the process of definingconstructing and manipulating a database for various applications. (Defining a data base involvesspecifying the data types, structures and constraints for the data to be stored in the data database.Constructing a data base is the process of storing data itself on some storage medium that iscontrolled by DBMS. Manipulating a database includes such functions as querying the data baseto retrieve specific data, updating the database to reflect the changes in the mini-world.

3. What is a Catalog?Ans: A catalog is a table that contain the information such as structure of each file ,the type and storage format of each data item and various constraints on the data .The information stored in the catalog is called Metadata . Whenever a request ismade to access a particular data, the DBMS s/w refers to the catalog to determinethe structure of the file.

4. What is data ware housing & OLAP?Ans: Data warehousing and OLAP (online analytical processing ) systems are thetechniques used in many companies to extract and analyze useful informationfrom very large databases for decision making .

5. What is real time database technology?Ans: These are all the techniques used in controlling industrial and manufacturingprocesses.

6. What is program-data independence?Ans: Unlike in the traditional file sys. the structure of the data files is stored in theDBMS catalog separately from the access programs . This property is called

DBMS interview questions and answers |Part1

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

1.What is a Database?Ans: A database is a collection of related data .A database is a logically coherentcollection of data with some inherent meaning.

2. What is DBMS?Ans: Database Management system is a collection of programs that enables user to create andmaintain a database.Thus a DBMS is a general purposed s/w system that facilitates the process of definingconstructing and manipulating a database for various applications. (Defining a data base involvesspecifying the data types, structures and constraints for the data to be stored in the data database.Constructing a data base is the process of storing data itself on some storage medium that iscontrolled by DBMS. Manipulating a database includes such functions as querying the data baseto retrieve specific data, updating the database to reflect the changes in the mini-world.

3. What is a Catalog?Ans: A catalog is a table that contain the information such as structure of each file ,the type and storage format of each data item and various constraints on the data .The information stored in the catalog is called Metadata . Whenever a request ismade to access a particular data, the DBMS s/w refers to the catalog to determinethe structure of the file.

4. What is data ware housing & OLAP?Ans: Data warehousing and OLAP (online analytical processing ) systems are thetechniques used in many companies to extract and analyze useful informationfrom very large databases for decision making .

5. What is real time database technology?Ans: These are all the techniques used in controlling industrial and manufacturingprocesses.

6. What is program-data independence?Ans: Unlike in the traditional file sys. the structure of the data files is stored in theDBMS catalog separately from the access programs . This property is called

Page 35: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

program-data independence.i.e. We needn’t to change the code of the DBMS if thestructure of the data is changed .Which is not supported by traditional file sys .

7. What is ORDBMS?Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated asobjects. User can define operations on data as a part of the database definition.

8. What is program-operation independence?Ans: An operation is specified in two parts .1. Interface (operation name and data types of its arguments).2. Implementation (the code part)The implementation part can be changed without affecting the interface. This is calledprogram-operation independence.

9. What is a view?Ans: A view may be a subset of the database or it may contain virtual data that isderived from the database files but is not explicitly stored .

10. What is OLTP?Ans: Online transaction processing is an application that involve multiple database accessesfrom different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrenttransactions operate correctly.

DBMS interview questions and answers |Part2

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

11. What is the job of DBA?Ans: A database administrator is a person or a group responsible for authorizing access to thedatabase, for coordinating and monitoring its use, and for acquiring s/w and h/w resources asneeded.

program-data independence.i.e. We needn’t to change the code of the DBMS if thestructure of the data is changed .Which is not supported by traditional file sys .

7. What is ORDBMS?Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated asobjects. User can define operations on data as a part of the database definition.

8. What is program-operation independence?Ans: An operation is specified in two parts .1. Interface (operation name and data types of its arguments).2. Implementation (the code part)The implementation part can be changed without affecting the interface. This is calledprogram-operation independence.

9. What is a view?Ans: A view may be a subset of the database or it may contain virtual data that isderived from the database files but is not explicitly stored .

10. What is OLTP?Ans: Online transaction processing is an application that involve multiple database accessesfrom different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrenttransactions operate correctly.

DBMS interview questions and answers |Part2

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

11. What is the job of DBA?Ans: A database administrator is a person or a group responsible for authorizing access to thedatabase, for coordinating and monitoring its use, and for acquiring s/w and h/w resources asneeded.

program-data independence.i.e. We needn’t to change the code of the DBMS if thestructure of the data is changed .Which is not supported by traditional file sys .

7. What is ORDBMS?Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated asobjects. User can define operations on data as a part of the database definition.

8. What is program-operation independence?Ans: An operation is specified in two parts .1. Interface (operation name and data types of its arguments).2. Implementation (the code part)The implementation part can be changed without affecting the interface. This is calledprogram-operation independence.

9. What is a view?Ans: A view may be a subset of the database or it may contain virtual data that isderived from the database files but is not explicitly stored .

10. What is OLTP?Ans: Online transaction processing is an application that involve multiple database accessesfrom different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrenttransactions operate correctly.

DBMS interview questions and answers |Part2

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

11. What is the job of DBA?Ans: A database administrator is a person or a group responsible for authorizing access to thedatabase, for coordinating and monitoring its use, and for acquiring s/w and h/w resources asneeded.

Page 36: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

12. Who are db designer?Ans: Data base designers are responsible for identifying the data to be stored in the database andforchoosing appropriate structure to represent and store this data .

13. What are different types of end users?Ans:1. Casual end-users2. Naive or parametric end users3. Sophisticated end users4. Stand alone users.

14. What are the advantages of using a dbms?Ans:1. Controlling redundancy.2. Restricting unauthorized access.3. Providing persistent storage for program objects and data structures.4. Permitting inferencing and actions using rules.5. Providing multi-user interfaces.6. Representing complex relationships among data.7. Enforcing integrity constraints.8. Providing backups and recovery.

15. What are the disadvantages of using a dbms?Ans:1. High initial investments in h/w, s/w, and training.2. Generality that a DBMS provides for defining and processing data.3. Overhead for providing security, concurrency control, recovery, and integrity functions.

16. What is a data model?Ans: It is a collection of concepts that can be used to describe the structure of a database. Itprovides necessary means to achieve this abstraction. By structure of a database we mean thedata types, relations, and constraints that should hold on the data.

17. What are different categories of data models?Ans:1. High-level or conceptual data models.2. Representational data models.3. Low-level or physical data models.High level data models provide the concepts that are close to the way many users perceive data.Representational data models are provide concepts that provide the concepts that may beunderstood by end users but that are not too far removed from organization of data in thedatabase.Physical data models describe the details of how data is stored in the computers.

Page 37: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

18. What is schema?Ans: The description of a data base is called the database schema , which is specified duringdatabase design and is not expected to change frequently . A displayed schema is called schemadiagram .We call each object in the schema as schema construct.

19. What are types of schema?Ans:1. internal schema.2. Conceptual schema.3. External schemas or user views.

20. What is Data independency?Ans: Data independency is defined as the capacity to change the conceptual schema withouthaving to change the schema at the next higher level. We can define two types of dataindependence:1. Logical data independence.2. Physical data independence.LDI is the capacity to change the conceptual schema without having to change external schemasor application programs.PDI is the capacity to change the internal schema without having to change conceptual (orexternal) schemas.

DBMS interview questions and answers |Part3

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

21. What are different DBMS languages?Ans:1. DDL (Data definition language)2. SDL (Storage definition language)3. VDL (View definition language)4. DML (Data manipulation language)

22. What are different types of DBMS?Ans:1. DBMS

18. What is schema?Ans: The description of a data base is called the database schema , which is specified duringdatabase design and is not expected to change frequently . A displayed schema is called schemadiagram .We call each object in the schema as schema construct.

19. What are types of schema?Ans:1. internal schema.2. Conceptual schema.3. External schemas or user views.

20. What is Data independency?Ans: Data independency is defined as the capacity to change the conceptual schema withouthaving to change the schema at the next higher level. We can define two types of dataindependence:1. Logical data independence.2. Physical data independence.LDI is the capacity to change the conceptual schema without having to change external schemasor application programs.PDI is the capacity to change the internal schema without having to change conceptual (orexternal) schemas.

DBMS interview questions and answers |Part3

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

21. What are different DBMS languages?Ans:1. DDL (Data definition language)2. SDL (Storage definition language)3. VDL (View definition language)4. DML (Data manipulation language)

22. What are different types of DBMS?Ans:1. DBMS

18. What is schema?Ans: The description of a data base is called the database schema , which is specified duringdatabase design and is not expected to change frequently . A displayed schema is called schemadiagram .We call each object in the schema as schema construct.

19. What are types of schema?Ans:1. internal schema.2. Conceptual schema.3. External schemas or user views.

20. What is Data independency?Ans: Data independency is defined as the capacity to change the conceptual schema withouthaving to change the schema at the next higher level. We can define two types of dataindependence:1. Logical data independence.2. Physical data independence.LDI is the capacity to change the conceptual schema without having to change external schemasor application programs.PDI is the capacity to change the internal schema without having to change conceptual (orexternal) schemas.

DBMS interview questions and answers |Part3

July 20th, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

21. What are different DBMS languages?Ans:1. DDL (Data definition language)2. SDL (Storage definition language)3. VDL (View definition language)4. DML (Data manipulation language)

22. What are different types of DBMS?Ans:1. DBMS

Page 38: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

2. RDBMS (Relational)3. ORDBMS (Object Relational)4. DDBMS (Distributed)5. FDBMS (Federated)6. HDDBMS (Homogeneous)7. HDBMS (Hierarchical)8. NDBMS (Networked)

23. What is an entity?Ans: An entity is a thing in the real world with an independent existence.

24. What are attributes?Ans: These are the particular properties that describe an entity.

25. What are diff. types of attributes?Ans:1. Composite Vs simple attributes.2. Single valued Vs multi-valued attributes.3. Stored Vs derived attribute.4. Null valued attributes.5. Complex attributes.

26. What is difference between entity set and entity type?

27. What is domain value or value set of an attribute?Ans: It is the set of values that may be assigned to that attribute for each individual entities .

28. What is degree of a relationship?Ans: The no of entities participating in that relation .

29. What is recursive relationship?Ans: It is the relationship where both the participating entities belong to same entity type .

30. What are relationship constraints?Ans:1. Cardinality ratio.2. Participation constraints.

DBMS interview questions and answers |Part4

Page 39: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

31. What is Cardinality ratio?Ans: The cardinality ratio for a binary relationship specifies the number of relationship instancesthat an entity can participate in.

32. What is a Participation constraint?Ans: The participation constraint specifies whether the existence of an entity depends on itsbeing related to another entity via the relationship type. This is of two types:1. Total participation.2. Partial participation.

33. What is a weak entity types?Ans: The entity types that do not have key attributes of their own are called weak entity types.Rests are called strong entity types .The entity that gives identity to a weak entity is called ownerentity. And the relationship is called identifying relationship. A weak entity type always has atotal participation constraint with respect to its identifying relationship.

34. What is an ER Diagram?Ans:This data model is based on real world that consists of basic objects called entities and ofrelationship among these objects. Entities are described in a database by a set of attributes.

35. What is an EER?Ans:==

36. What is specialization?Ans: It is the process of defining a set of subclasses of an entity type where each subclasscontain all the attributes and relationships of the parent entity and may have additional attributesand relationships which are specific to itself.

37. What is generalization?Ans: It is the process of finding common attributes and relations of a number of entities anddefining a common super class for them.

38. What are constraints on generalization and specialization?Ans:1. disjoint ness constraints.2. Completeness constraints.Disjointness constraint specifies that the subclasses of the specialization must be disjoint .i.e. anentity can be a member of at most one of the subclasses of the specialization. The reverse of it isoverlapping.

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

31. What is Cardinality ratio?Ans: The cardinality ratio for a binary relationship specifies the number of relationship instancesthat an entity can participate in.

32. What is a Participation constraint?Ans: The participation constraint specifies whether the existence of an entity depends on itsbeing related to another entity via the relationship type. This is of two types:1. Total participation.2. Partial participation.

33. What is a weak entity types?Ans: The entity types that do not have key attributes of their own are called weak entity types.Rests are called strong entity types .The entity that gives identity to a weak entity is called ownerentity. And the relationship is called identifying relationship. A weak entity type always has atotal participation constraint with respect to its identifying relationship.

34. What is an ER Diagram?Ans:This data model is based on real world that consists of basic objects called entities and ofrelationship among these objects. Entities are described in a database by a set of attributes.

35. What is an EER?Ans:==

36. What is specialization?Ans: It is the process of defining a set of subclasses of an entity type where each subclasscontain all the attributes and relationships of the parent entity and may have additional attributesand relationships which are specific to itself.

37. What is generalization?Ans: It is the process of finding common attributes and relations of a number of entities anddefining a common super class for them.

38. What are constraints on generalization and specialization?Ans:1. disjoint ness constraints.2. Completeness constraints.Disjointness constraint specifies that the subclasses of the specialization must be disjoint .i.e. anentity can be a member of at most one of the subclasses of the specialization. The reverse of it isoverlapping.

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

31. What is Cardinality ratio?Ans: The cardinality ratio for a binary relationship specifies the number of relationship instancesthat an entity can participate in.

32. What is a Participation constraint?Ans: The participation constraint specifies whether the existence of an entity depends on itsbeing related to another entity via the relationship type. This is of two types:1. Total participation.2. Partial participation.

33. What is a weak entity types?Ans: The entity types that do not have key attributes of their own are called weak entity types.Rests are called strong entity types .The entity that gives identity to a weak entity is called ownerentity. And the relationship is called identifying relationship. A weak entity type always has atotal participation constraint with respect to its identifying relationship.

34. What is an ER Diagram?Ans:This data model is based on real world that consists of basic objects called entities and ofrelationship among these objects. Entities are described in a database by a set of attributes.

35. What is an EER?Ans:==

36. What is specialization?Ans: It is the process of defining a set of subclasses of an entity type where each subclasscontain all the attributes and relationships of the parent entity and may have additional attributesand relationships which are specific to itself.

37. What is generalization?Ans: It is the process of finding common attributes and relations of a number of entities anddefining a common super class for them.

38. What are constraints on generalization and specialization?Ans:1. disjoint ness constraints.2. Completeness constraints.Disjointness constraint specifies that the subclasses of the specialization must be disjoint .i.e. anentity can be a member of at most one of the subclasses of the specialization. The reverse of it isoverlapping.

Page 40: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Completeness constraint is a participation constraint which may be1. Total2. PartialTotal specialization constraint tells that each entity in the super class must be a member of somesubclass in the specialization. And partial specialization constraint allows an entity not to belongto any of the subclasses .Thus we do have the following 4 types of constraints on specialization:1. Disjoint, total2. Disjoint, partial3. Overlapping, total4. Overlapping, partial

39. What is a ternary relationship?Ans: A relationship with a degree 3 is called a ternary relationship.

40. What is aggregation and association?Ans: Aggregation is an abstraction concept for building composite objects from their componentobjects. The abstraction of association is used to associate objects from several independentclasses.

DBMS interview questions and answers |Part5

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

41. What is RAID Technology?Ans: Redundant array of inexpensive (or independent) disks. The main goal of raid technology isto even out the widely different rates of performance improvement of disks against those inmemory and microprocessor. Raid technology employs the technique of data striping to achievehigher transfer rates.

42. What is Hashing technique?Ans: This is a primary file organization technique that provides very fast access to records oncertain search conditions. The search condition must be an equality condition on a single field,called hash field of the file.1. Internal hashing2. External hashing3. Extendible hashing

Completeness constraint is a participation constraint which may be1. Total2. PartialTotal specialization constraint tells that each entity in the super class must be a member of somesubclass in the specialization. And partial specialization constraint allows an entity not to belongto any of the subclasses .Thus we do have the following 4 types of constraints on specialization:1. Disjoint, total2. Disjoint, partial3. Overlapping, total4. Overlapping, partial

39. What is a ternary relationship?Ans: A relationship with a degree 3 is called a ternary relationship.

40. What is aggregation and association?Ans: Aggregation is an abstraction concept for building composite objects from their componentobjects. The abstraction of association is used to associate objects from several independentclasses.

DBMS interview questions and answers |Part5

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

41. What is RAID Technology?Ans: Redundant array of inexpensive (or independent) disks. The main goal of raid technology isto even out the widely different rates of performance improvement of disks against those inmemory and microprocessor. Raid technology employs the technique of data striping to achievehigher transfer rates.

42. What is Hashing technique?Ans: This is a primary file organization technique that provides very fast access to records oncertain search conditions. The search condition must be an equality condition on a single field,called hash field of the file.1. Internal hashing2. External hashing3. Extendible hashing

Completeness constraint is a participation constraint which may be1. Total2. PartialTotal specialization constraint tells that each entity in the super class must be a member of somesubclass in the specialization. And partial specialization constraint allows an entity not to belongto any of the subclasses .Thus we do have the following 4 types of constraints on specialization:1. Disjoint, total2. Disjoint, partial3. Overlapping, total4. Overlapping, partial

39. What is a ternary relationship?Ans: A relationship with a degree 3 is called a ternary relationship.

40. What is aggregation and association?Ans: Aggregation is an abstraction concept for building composite objects from their componentobjects. The abstraction of association is used to associate objects from several independentclasses.

DBMS interview questions and answers |Part5

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

41. What is RAID Technology?Ans: Redundant array of inexpensive (or independent) disks. The main goal of raid technology isto even out the widely different rates of performance improvement of disks against those inmemory and microprocessor. Raid technology employs the technique of data striping to achievehigher transfer rates.

42. What is Hashing technique?Ans: This is a primary file organization technique that provides very fast access to records oncertain search conditions. The search condition must be an equality condition on a single field,called hash field of the file.1. Internal hashing2. External hashing3. Extendible hashing

Page 41: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

4. Linear hashing5. Partitioned hashing

43. What are different types of relational constraints?Ans:1. Domain constraints2. Key constraints3. Entity integrity constraints4. Referential integrity constraintsDomain constraints specify that the value of each attribute must be an atomic value from thedomain of the attributes.Key constraints tell that no two tuples can have the same combination of values for all theirattributes.Entity integrity constraint states that no primary key value can be null.Referential integrity constraints states that a tuple in one relation that refers to another relationmust refer to an existing tuple in that relation it is specified between two relations and is used tomaintain the consistency among tuples of the two relations.

44. What is difference between a super key, a key, a candidate key and a primary key?Ans: A super key specifies a uniqueness constrain that no two distinct tuples in a statecan have the same value for the super key. Every relation has at least one default super key.A key is a minimal super key or the subset of the super key which is obtained afterremoving redundancy. A relation schema may have more than one key .In this caseeach key is called a candidate key. One of the candidate key with minimum numberof attributes is chosen as primary key.

45. What is a foreign key?Ans: A key of a relation schema is called as a foreign key if it is the primary key ofsome other relation to which it is related to.

46. What is a transaction?Ans: A transaction is a logical unit of database processing that includes one or moredatabase access operations.

47. What are the properties of transaction?Ans:1. Atomicity2. Consistency preservation3. Isolation4. Durability (permanence)

48. What are the basic data base operations?Ans:1. Write_item(x)2. Read_item(x)

Page 42: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

49. What are the disadvantages of not controlling concurrency?Ans:1. Lost update problem2. Temporary update(Dirty read) problem3. Incorrect summary problem

50. What are serial, non serial?Ans: A schedule S is serial if, for every transaction T participating in the schedule, all theoperations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.

DBMS interview questions and answers |Part6

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

51. What are conflict serializable schedules?Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule ofthe same n transactions.

52. What is result equivalent?Ans: Two schedules are called result equivalent if they produce the same final state of the database.

53. What are conflict equivalent schedules?Ans: Two schedules are said to be conflict equivalent if the order of any two conflictingoperations is the same in both schedules.

54. What is a conflict serializable schedule?Ans: A schedule is called conflict serializable if it is conflict equivalent to some serial schedule.

55. What is view equivalence?Ans: Two schedules S and S’ are said to be view equivalent if the following three conditionshold :1. Both S and S’ contain same set of transactions with same operations in them.2. If any read operation read(x) reads a value written by a write operation or the original value ofx the same conditions must hold in the other schedule for the same read(x) operation.

49. What are the disadvantages of not controlling concurrency?Ans:1. Lost update problem2. Temporary update(Dirty read) problem3. Incorrect summary problem

50. What are serial, non serial?Ans: A schedule S is serial if, for every transaction T participating in the schedule, all theoperations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.

DBMS interview questions and answers |Part6

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

51. What are conflict serializable schedules?Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule ofthe same n transactions.

52. What is result equivalent?Ans: Two schedules are called result equivalent if they produce the same final state of the database.

53. What are conflict equivalent schedules?Ans: Two schedules are said to be conflict equivalent if the order of any two conflictingoperations is the same in both schedules.

54. What is a conflict serializable schedule?Ans: A schedule is called conflict serializable if it is conflict equivalent to some serial schedule.

55. What is view equivalence?Ans: Two schedules S and S’ are said to be view equivalent if the following three conditionshold :1. Both S and S’ contain same set of transactions with same operations in them.2. If any read operation read(x) reads a value written by a write operation or the original value ofx the same conditions must hold in the other schedule for the same read(x) operation.

49. What are the disadvantages of not controlling concurrency?Ans:1. Lost update problem2. Temporary update(Dirty read) problem3. Incorrect summary problem

50. What are serial, non serial?Ans: A schedule S is serial if, for every transaction T participating in the schedule, all theoperations of T is executed consecutively in the schedule, otherwise, the schedule is called non-serial schedule.

DBMS interview questions and answers |Part6

July 21st, 2010

If you would like to view All All DBMS interview questions only, at one place, visit below linkAll DBMS Interview Questions

51. What are conflict serializable schedules?Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule ofthe same n transactions.

52. What is result equivalent?Ans: Two schedules are called result equivalent if they produce the same final state of the database.

53. What are conflict equivalent schedules?Ans: Two schedules are said to be conflict equivalent if the order of any two conflictingoperations is the same in both schedules.

54. What is a conflict serializable schedule?Ans: A schedule is called conflict serializable if it is conflict equivalent to some serial schedule.

55. What is view equivalence?Ans: Two schedules S and S’ are said to be view equivalent if the following three conditionshold :1. Both S and S’ contain same set of transactions with same operations in them.2. If any read operation read(x) reads a value written by a write operation or the original value ofx the same conditions must hold in the other schedule for the same read(x) operation.

Page 43: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

3. If an operation write1(y) is the last operation to write the value of y in schedule S then thesame operation must be the last operation in schedule S’.

56. What is view serializable?Ans: A schedule is said to be view serializable if it is view equivalent with some serial schedule.

57. What are the various methods of controlling concurrency?Ans:1. Locking2. Time stampLocking data item to prevent multiple transactions from accessing the item concurrently.A time stamp is a unique identifier for each transaction, generated by the system.

58. What is a lock?Ans: A lock is a variable associated with a data item that describes the status of the item withrespect to the possible operations that can be applied to it.

59. What are various types of locking techniques?Ans:1. a binary lock2. Shared/Exclusive lock3. Two phase locking

60. What is a binary lock?Ans: A binary lock can have two states or values:1. locked (1)2. unlocked(0)If locked it cannot be accessed by any other operations, else can be.

61. What is shared or exclusive lock?Ans: It implements multiple-mode lock. Allowing multiple accesses for read operations butexclusive access for write operation.

62. Explain two phase locking?Ans: All the locking operations must precede the first unlock operation in the transaction .It doeshave two phases:1. expanding phase (Locks are issued)2. Shrinking phase (Locks are released)

63. What are different types of two phase lockings (2pl)?Ans:1. Basic2. Conservative3. Strict4. Rigorousthis is the basic technique of 2pl described above.

Page 44: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Conservative 2pl requires a transaction to lock all the items it accesses before the transactionbegins its execution, by pre-declaring it’s read-set and write-set.Strict 2pl guarantees that a transaction doesn’t release any of its exclusive locks until after itcommits or aborts.Rigorous guarantees that a transaction doesn’t release any of its locks (including shared locks)until after it commits or aborts.

64. What is a deadlock?Ans: Dead lock occurs when each transaction T in a set of two or more transactions is waitingfor some item that is locked by some other transaction T’ in the set. Hence each transaction is ina waiting queue, waiting for one of the other transactions to release the lock on them.

65. What are triggers?Ans: Triggers are the PL/SQL blocks definining an action the database should take when somedatabase related event occurs. Triggers may be used to supplement declarative referentialintegrity, to enforce complex business rules, or to audit changes to data.

Page 45: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

data structure Questions1.What is data structure?2.What are the goals of Data Structure ?3.What does abstract Data Type Mean?4.What is the difference between a Stack and an Array?5.What do you mean by recursive definition?6.What is sequential search?7.What actions are performed when a function is called?8.What actions are performed when a function returns?9.What is a linked list ?10.What are the advantages of linked list over array(static data structure) ?11.Can we apply binary search algorithm to a sorted linked list,why ?12.What do you mean by free pool ?13.What do you mean by garbage collection ?14.What do you mean by overflow and underflow ?15.What are the disadvantages array implementation of linked list ?16.What is a queue ?17. What is a priority queue ?18.What are the disadvantages of sequential storage?19.What are the disadvantages of representing a stack or queue by a linked list ?20.What is dangling pointer and how to avoid it ?21.What are the disadvantages of linear list ?22.Define circular list ?23. What are the disadvantages of circular list ?24.Define double linked list?25.Is it necessary to sort a file before searching a particular item ?26.What are the issues that hampers the efficiency in sorting a file ?27.Calculate the efficiency of sequential search ?28. Is any implicit arguments are passed to a function when it is called ?29.Parenthesis is never required in Postfix or Prefix expressions, Why?30.List out the areas in which data structures are applied extensively?31.What are the major data structures used in the following areas : network data model & Hierarchicaldata model.32.If you are using C language to implement the heterogeneous linked list, what pointer type will youuse?33.Minimum number of queues needed to implement the priority queue?34.What is the data structures used to perform recursion?35.What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?36. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations.37. Sorting is not possible by using which of the following methods?38. List out few of the Application of tree data-structure?39. List out few of the applications that make use of Multilinked Structures?

Page 46: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

40. In tree construction which is the suitable efficient data structure?41. What is the type of the algorithm used in solving the 8 Queens problem?42 .In an AVL tree, at what condition the balancing is to be done?43 .There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a fullbinary tree?44.In RDBMS, what is the efficient data structure used in the internal storage representation?45. 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.46.What is a spanning Tree?47.Does the minimum spanning tree of a graph give the shortest distance between any 2 specifiednodes?48.Whether Linked List is linear or Non-linear data structure?

Data Structures Question and Answers |Part1

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

1. What is data structure?Ans: The logical and mathematical model of a particular organization of data is called datastructure. There are two types of data structurei) Linearii) Nonlinear

2. What are the goals of Data Structure?Ans: It must rich enough in structure to reflect the actual relationship of data in real world.The structure should be simple enough for efficient processing of data.

3. What does abstract Data Type Mean?Ans: Data type is a collection of values and a set of operations on these values. Abstract datatype refer to the mathematical concept that define the data type.It is a useful tool for specifying the logical properties of a data type.ADT consists of two parts1) Values definition

40. In tree construction which is the suitable efficient data structure?41. What is the type of the algorithm used in solving the 8 Queens problem?42 .In an AVL tree, at what condition the balancing is to be done?43 .There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a fullbinary tree?44.In RDBMS, what is the efficient data structure used in the internal storage representation?45. 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.46.What is a spanning Tree?47.Does the minimum spanning tree of a graph give the shortest distance between any 2 specifiednodes?48.Whether Linked List is linear or Non-linear data structure?

Data Structures Question and Answers |Part1

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

1. What is data structure?Ans: The logical and mathematical model of a particular organization of data is called datastructure. There are two types of data structurei) Linearii) Nonlinear

2. What are the goals of Data Structure?Ans: It must rich enough in structure to reflect the actual relationship of data in real world.The structure should be simple enough for efficient processing of data.

3. What does abstract Data Type Mean?Ans: Data type is a collection of values and a set of operations on these values. Abstract datatype refer to the mathematical concept that define the data type.It is a useful tool for specifying the logical properties of a data type.ADT consists of two parts1) Values definition

40. In tree construction which is the suitable efficient data structure?41. What is the type of the algorithm used in solving the 8 Queens problem?42 .In an AVL tree, at what condition the balancing is to be done?43 .There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a fullbinary tree?44.In RDBMS, what is the efficient data structure used in the internal storage representation?45. 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.46.What is a spanning Tree?47.Does the minimum spanning tree of a graph give the shortest distance between any 2 specifiednodes?48.Whether Linked List is linear or Non-linear data structure?

Data Structures Question and Answers |Part1

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

1. What is data structure?Ans: The logical and mathematical model of a particular organization of data is called datastructure. There are two types of data structurei) Linearii) Nonlinear

2. What are the goals of Data Structure?Ans: It must rich enough in structure to reflect the actual relationship of data in real world.The structure should be simple enough for efficient processing of data.

3. What does abstract Data Type Mean?Ans: Data type is a collection of values and a set of operations on these values. Abstract datatype refer to the mathematical concept that define the data type.It is a useful tool for specifying the logical properties of a data type.ADT consists of two parts1) Values definition

Page 47: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

2) Operation definitionExample:-The value definition for the ADT RATIONAL states that RATIONAL value consistsof two integers, second doesn’t equal to zero.The operator definition for ADT RATIONAL includes the operation of creation (make rational)addition, multiplication and test for equality.

4. What is the difference between a Stack and an Array?Ans:i) Stack is a ordered collection of itemsii) Stack is a dynamic object whose size is constantly changing as items are pushed and popped .iii) Stack may contain different data typesiv) Stack is declared as a structure containing an array to hold the element of the stack, and aninteger to indicate the current stack top within the array.ARRAYi) Array is an ordered collection of itemsii) Array is a static object i.e. no of item is fixed and is assigned by the declaration of the arrayiii) It contains same data types.iv) Array can be home of a stack i.e. array can be declared large enough for maximum size of thestack.

5. What do you mean by recursive definition?Ans: The definition which defines an object in terms of simpler cases of itself is called recursivedefinition.

6. What is sequential search?Ans: In sequential search each item in the array is compared with the item being searched until amatch occurs. It is applicable to a table organized either as an array or as a linked list.

7. What actions are performed when a function is called?Ans: When a function is calledi) arguments are passedii) local variables are allocated and initializedii) transferring control to the function

8. What actions are performed when a function returns?Ans:i) Return address is retrievedii) Function’s data area is freediii) Branch is taken to the return address

9. What is a linked list?Ans: A linked list is a linear collection of data elements, called nodes, where the linear order isgiven by pointers. Each node has two parts first part contain the information of the elementsecond part contains the address of the next node in the list.

Page 48: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

10. What are the advantages of linked list over array (static data structure)?Ans:The disadvantages of array arei) unlike linked list it is expensive to insert and delete elements in the arrayii) One can’t double or triple the size of array as it occupies block of memory space.

In linked listi) each element in list contains a field, called a link or pointer which contains the address of thenext elementii) Successive element’s need not occupy adjacent space in memory.

Data Structures Question and Answers |Part2

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

11. Can we apply binary search algorithm to a sorted linked list, why?Ans: No we cannot apply binary search algorithm to a sorted linked list, since there is no way ofindexing the middle element in the list. This is the drawback in using linked list as a datastructure.

12. What do you mean by free pool?Ans: Pool is a list consisting of unused memory cells which has its own pointer.

13. What do you mean by garbage collection?Ans: It is a technique in which the operating system periodically collects all the deleted spaceonto the free storage list.It takes place when there is minimum amount of space left in storage list or when CPU is ideal.The alternate method to this is to immediately reinsert the space into free storage list which istime consuming.

14. What do you mean by overflow and underflow?Ans: When new data is to be inserted into the data structure but there is no available space i.e.free storage list is empty this situation is called overflow.When we want to delete data from a data structure that is empty this situation is calledunderflow.

10. What are the advantages of linked list over array (static data structure)?Ans:The disadvantages of array arei) unlike linked list it is expensive to insert and delete elements in the arrayii) One can’t double or triple the size of array as it occupies block of memory space.

In linked listi) each element in list contains a field, called a link or pointer which contains the address of thenext elementii) Successive element’s need not occupy adjacent space in memory.

Data Structures Question and Answers |Part2

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

11. Can we apply binary search algorithm to a sorted linked list, why?Ans: No we cannot apply binary search algorithm to a sorted linked list, since there is no way ofindexing the middle element in the list. This is the drawback in using linked list as a datastructure.

12. What do you mean by free pool?Ans: Pool is a list consisting of unused memory cells which has its own pointer.

13. What do you mean by garbage collection?Ans: It is a technique in which the operating system periodically collects all the deleted spaceonto the free storage list.It takes place when there is minimum amount of space left in storage list or when CPU is ideal.The alternate method to this is to immediately reinsert the space into free storage list which istime consuming.

14. What do you mean by overflow and underflow?Ans: When new data is to be inserted into the data structure but there is no available space i.e.free storage list is empty this situation is called overflow.When we want to delete data from a data structure that is empty this situation is calledunderflow.

10. What are the advantages of linked list over array (static data structure)?Ans:The disadvantages of array arei) unlike linked list it is expensive to insert and delete elements in the arrayii) One can’t double or triple the size of array as it occupies block of memory space.

In linked listi) each element in list contains a field, called a link or pointer which contains the address of thenext elementii) Successive element’s need not occupy adjacent space in memory.

Data Structures Question and Answers |Part2

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

11. Can we apply binary search algorithm to a sorted linked list, why?Ans: No we cannot apply binary search algorithm to a sorted linked list, since there is no way ofindexing the middle element in the list. This is the drawback in using linked list as a datastructure.

12. What do you mean by free pool?Ans: Pool is a list consisting of unused memory cells which has its own pointer.

13. What do you mean by garbage collection?Ans: It is a technique in which the operating system periodically collects all the deleted spaceonto the free storage list.It takes place when there is minimum amount of space left in storage list or when CPU is ideal.The alternate method to this is to immediately reinsert the space into free storage list which istime consuming.

14. What do you mean by overflow and underflow?Ans: When new data is to be inserted into the data structure but there is no available space i.e.free storage list is empty this situation is called overflow.When we want to delete data from a data structure that is empty this situation is calledunderflow.

Page 49: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

15. What are the disadvantages array implementations of linked list?Ans:i) The no of nodes needed can’t be predicted when the program is written.ii) The no of nodes declared must remain allocated throughout its execution

16. What is a queue?Ans: A queue is an ordered collection of items from which items may be deleted at one end(front end) and items inserted at the other end (rear end).It obeys FIFO rule there is no limit to the number of elements a queue contains.

17. What is a priority queue?Ans: The priority queue is a data structure in which the intrinsic ordering of the elements(numeric or alphabetic)Determines the result of its basic operation. It is of two typesi) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary)ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary)

18. What are the disadvantages of sequential storage?Ans:i) Fixed amount of storage remains allocated to the data structure even if it contains less element.ii) No more than fixed amount of storage is allocated causing overflow

19. What are the disadvantages of representing a stack or queue by a linked list?Ans:i) A node in a linked list (info and next field) occupies more storage than a correspondingelement in an array.ii) Additional time spent in managing the available list.

20. What is dangling pointer and how to avoid it?Ans: After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage top is freed but the value of p(address) remain unchanged .so the object at that address may beused as the value of *p (i.e. there is no way to detect the illegality).Here p is called danglingpointer.To avoid this it is better to set p to NULL after executing free(p).The null pointer value doesn’treference a storage location it is a pointer that doesn’t point to anything.

Data Structures Question and Answers |Part3

July 25th, 2010

15. What are the disadvantages array implementations of linked list?Ans:i) The no of nodes needed can’t be predicted when the program is written.ii) The no of nodes declared must remain allocated throughout its execution

16. What is a queue?Ans: A queue is an ordered collection of items from which items may be deleted at one end(front end) and items inserted at the other end (rear end).It obeys FIFO rule there is no limit to the number of elements a queue contains.

17. What is a priority queue?Ans: The priority queue is a data structure in which the intrinsic ordering of the elements(numeric or alphabetic)Determines the result of its basic operation. It is of two typesi) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary)ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary)

18. What are the disadvantages of sequential storage?Ans:i) Fixed amount of storage remains allocated to the data structure even if it contains less element.ii) No more than fixed amount of storage is allocated causing overflow

19. What are the disadvantages of representing a stack or queue by a linked list?Ans:i) A node in a linked list (info and next field) occupies more storage than a correspondingelement in an array.ii) Additional time spent in managing the available list.

20. What is dangling pointer and how to avoid it?Ans: After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage top is freed but the value of p(address) remain unchanged .so the object at that address may beused as the value of *p (i.e. there is no way to detect the illegality).Here p is called danglingpointer.To avoid this it is better to set p to NULL after executing free(p).The null pointer value doesn’treference a storage location it is a pointer that doesn’t point to anything.

Data Structures Question and Answers |Part3

July 25th, 2010

15. What are the disadvantages array implementations of linked list?Ans:i) The no of nodes needed can’t be predicted when the program is written.ii) The no of nodes declared must remain allocated throughout its execution

16. What is a queue?Ans: A queue is an ordered collection of items from which items may be deleted at one end(front end) and items inserted at the other end (rear end).It obeys FIFO rule there is no limit to the number of elements a queue contains.

17. What is a priority queue?Ans: The priority queue is a data structure in which the intrinsic ordering of the elements(numeric or alphabetic)Determines the result of its basic operation. It is of two typesi) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary)ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary)

18. What are the disadvantages of sequential storage?Ans:i) Fixed amount of storage remains allocated to the data structure even if it contains less element.ii) No more than fixed amount of storage is allocated causing overflow

19. What are the disadvantages of representing a stack or queue by a linked list?Ans:i) A node in a linked list (info and next field) occupies more storage than a correspondingelement in an array.ii) Additional time spent in managing the available list.

20. What is dangling pointer and how to avoid it?Ans: After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage top is freed but the value of p(address) remain unchanged .so the object at that address may beused as the value of *p (i.e. there is no way to detect the illegality).Here p is called danglingpointer.To avoid this it is better to set p to NULL after executing free(p).The null pointer value doesn’treference a storage location it is a pointer that doesn’t point to anything.

Data Structures Question and Answers |Part3

July 25th, 2010

Page 50: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

21. What are the disadvantages of linear list?Ans:i) We cannot reach any of the nodes that precede node (p)ii) If a list is traversed, the external pointer to the list must be persevered in order to reference thelist again

22. Define circular list?Ans: In linear list the next field of the last node contain a null pointer, when a next field in thelast node contain a pointer back to the first node it is called circular list.Advantages – From any point in the list it is possible to reach at any other point

23. What are the disadvantages of circular list?Ans:i) We can’t traverse the list backwardii) If a pointer to a node is given we cannot delete the node

24. Define double linked list?Ans: It is a collection of data elements called nodes, where each node is divided into three partsi) An info field that contains the information stored in the nodeii) Left field that contain pointer to node on left sideiii) Right field that contain pointer to node on right side

25. Is it necessary to sort a file before searching a particular item ?Ans:If less work is involved in searching a element than to sort and then extract, then we don’t go forsortIf frequent use of the file is required for the purpose of retrieving specific element, it is moreefficient to sort the file.Thus it depends on situation.

26. What are the issues that hamper the efficiency in sorting a file?Ans: The issues arei) Length of time required by the programmer in coding a particular sorting programii) Amount of machine time necessary for running the particular programiii)The amount of space necessary for the particular program .

27. Calculate the efficiency of sequential search?Ans: The number of comparisons depends on where the record with the argument key appears inthe tableIf it appears at first position then one comparisonIf it appears at last position then n comparisonsAverage=(n+1)/2 comparisons

Page 51: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Unsuccessful search n comparisonsNumber of comparisons in any case is O (n).

28. Is any implicit arguments are passed to a function when it is called?Ans: Yes there is a set of implicit arguments that contain information necessary for the functionto execute and return correctly. One of them is return address which is stored within thefunction’s data area, at the time of returning to calling program the address is retrieved and thefunction branches to that location.

29. Parenthesis is never required in Postfix or Prefix expressions, why?Ans: Parenthesis is not required because the order of the operators in the postfix /prefixexpressions determines the actual order of operations in evaluating the expression

30. List out the areas in which data structures are applied extensively?Ans:Compiler Design,Operating System,Database Management System,Statistical analysis package,Numerical Analysis,Graphics,Artificial Intelligence,Simulation

Data Structures Question and Answers |Part4

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

31. What are the major data structures used in the following areas : network data model &Hierarchical data model.Ans:RDBMS – Array (i.e. Array of structures)Network data model – GraphHierarchical data model – Trees

Unsuccessful search n comparisonsNumber of comparisons in any case is O (n).

28. Is any implicit arguments are passed to a function when it is called?Ans: Yes there is a set of implicit arguments that contain information necessary for the functionto execute and return correctly. One of them is return address which is stored within thefunction’s data area, at the time of returning to calling program the address is retrieved and thefunction branches to that location.

29. Parenthesis is never required in Postfix or Prefix expressions, why?Ans: Parenthesis is not required because the order of the operators in the postfix /prefixexpressions determines the actual order of operations in evaluating the expression

30. List out the areas in which data structures are applied extensively?Ans:Compiler Design,Operating System,Database Management System,Statistical analysis package,Numerical Analysis,Graphics,Artificial Intelligence,Simulation

Data Structures Question and Answers |Part4

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

31. What are the major data structures used in the following areas : network data model &Hierarchical data model.Ans:RDBMS – Array (i.e. Array of structures)Network data model – GraphHierarchical data model – Trees

Unsuccessful search n comparisonsNumber of comparisons in any case is O (n).

28. Is any implicit arguments are passed to a function when it is called?Ans: Yes there is a set of implicit arguments that contain information necessary for the functionto execute and return correctly. One of them is return address which is stored within thefunction’s data area, at the time of returning to calling program the address is retrieved and thefunction branches to that location.

29. Parenthesis is never required in Postfix or Prefix expressions, why?Ans: Parenthesis is not required because the order of the operators in the postfix /prefixexpressions determines the actual order of operations in evaluating the expression

30. List out the areas in which data structures are applied extensively?Ans:Compiler Design,Operating System,Database Management System,Statistical analysis package,Numerical Analysis,Graphics,Artificial Intelligence,Simulation

Data Structures Question and Answers |Part4

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

31. What are the major data structures used in the following areas : network data model &Hierarchical data model.Ans:RDBMS – Array (i.e. Array of structures)Network data model – GraphHierarchical data model – Trees

Page 52: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

32. If you are using C language to implement the heterogeneous linked list, what pointertype will you use?Ans: The heterogeneous linked list contains different data types in its nodes and we need a link,pointer to connect them. It is not possible to use ordinary pointers for this. So we go for voidpointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

33. Minimum number of queues needed to implement the priority queue?Ans: Two. One queue is used for actual storing of data and another for storing priorities.

34. What is the data structures used to perform recursion?Ans: Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knowswhom to return when the function has to return. Recursion makes use of system stack for storingthe return addresses of the function calls.Every recursive function has its equivalent iterative (non-recursive) function. Even when suchequivalent iterative procedures are written, explicit stack is to be used.

35. What are the notations used in Evaluation of Arithmetic Expressions using prefix andpostfix forms?Ans: Polish and Reverse Polish notations.

36. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix andPostfix notations.Ans: Prefix Notation:^ – * +ABC – DE + FGPostfix Notation:AB + C * DE – – FG + ^

37. Sorting is not possible by using which of the following methods?(a) Insertion(b) Selection(c) Exchange(d) Deletion

Ans: (d) Deletion.Using insertion we can perform insertion sort, using selection we can perform selection sort,using exchange we can perform the bubble sort (and other similar sorting methods). But nosorting method can be done just using deletion.

38. List out few of the Application of tree data-structure?Ans:The manipulation of Arithmetic expression,Symbol Table construction,Syntax analysis.

Page 53: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

39. List out few of the applications that make use of Multilinked Structures?Ans: Sparse matrix, Index generation.

40. in tree construction which is the suitable efficient data structure?(A) Array (b) Linked list (c) Stack (d) Queue (e) noneAns: (b) Linked list

Data Structures Question and Answers |Part5

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

41. What is the type of the algorithm used in solving the 8 Queens problem?Ans: Backtracking

42. In an AVL tree, at what condition the balancing is to be done?Ans: If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

43. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could haveformed a full binary tree?Ans: 15In general:There are 2n-1 nodes in a full binary tree.

By the method of elimination:Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree.So the correct answer is 15.Note: Full and Complete binary trees are different. All full binary trees are complete binary treesbut not vice versa.

44. In RDBMS, what is the efficient data structure used in the internal storagerepresentation?Ans: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searchingeasier. This corresponds to the records that shallbe stored in leaf nodes.

39. List out few of the applications that make use of Multilinked Structures?Ans: Sparse matrix, Index generation.

40. in tree construction which is the suitable efficient data structure?(A) Array (b) Linked list (c) Stack (d) Queue (e) noneAns: (b) Linked list

Data Structures Question and Answers |Part5

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

41. What is the type of the algorithm used in solving the 8 Queens problem?Ans: Backtracking

42. In an AVL tree, at what condition the balancing is to be done?Ans: If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

43. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could haveformed a full binary tree?Ans: 15In general:There are 2n-1 nodes in a full binary tree.

By the method of elimination:Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree.So the correct answer is 15.Note: Full and Complete binary trees are different. All full binary trees are complete binary treesbut not vice versa.

44. In RDBMS, what is the efficient data structure used in the internal storagerepresentation?Ans: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searchingeasier. This corresponds to the records that shallbe stored in leaf nodes.

39. List out few of the applications that make use of Multilinked Structures?Ans: Sparse matrix, Index generation.

40. in tree construction which is the suitable efficient data structure?(A) Array (b) Linked list (c) Stack (d) Queue (e) noneAns: (b) Linked list

Data Structures Question and Answers |Part5

July 25th, 2010

If you would like to view All Data Structures interview questions only, at one place, visit belowlinkAll Data Structures Interview Questions

41. What is the type of the algorithm used in solving the 8 Queens problem?Ans: Backtracking

42. In an AVL tree, at what condition the balancing is to be done?Ans: If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

43. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could haveformed a full binary tree?Ans: 15In general:There are 2n-1 nodes in a full binary tree.

By the method of elimination:Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree.So the correct answer is 15.Note: Full and Complete binary trees are different. All full binary trees are complete binary treesbut not vice versa.

44. In RDBMS, what is the efficient data structure used in the internal storagerepresentation?Ans: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searchingeasier. This corresponds to the records that shallbe stored in leaf nodes.

Page 54: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

45. One of the following tree structures, which is, efficient considering space and timecomplexities?a) Incomplete Binary Tree.b) Complete Binary Tree.c) Full Binary Tree.Ans:b) Complete Binary Tree.By the method of elimination:Full binary tree loses its nature when operations of insertions and deletions are done. Forincomplete binary trees,extra property of complete binary tree is maintained even after operations like additions anddeletions are done on it.

46. What is a spanning Tree?Ans: A spanning tree is a tree associated with a network. All the nodes of the graph appear onthe tree once. A minimum spanning tree is a spanning tree organized so that the total edge weightbetween nodes is minimized.

47. Does the minimum spanning tree of a graph give the shortest distance between any 2specified nodes?Ans: No.Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But itdoesn’t mean that the distance between any two nodes involved in the minimum-spanning tree isminimum.

48. Whether Linked List is linear or Non-linear data structure?Ans: According to Storage Linked List is a Non-linear one.

Page 55: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Operating system Questions

1. What is an operating system?2. What are the various components of a computer system?3. What is purpose of different operating systems?4. What are the different operating systems?5. What are operating system services?6. What is a boot-strap program?7. What is BIOS?8. Explain the concept of the batched operating systems?9. Explain the concept of the multi-programmed operating systems?10. Explain the concept of the timesharing operating systems?11. Explain the concept of the multi-processor systems or parallel systems?12. Explain the concept of the Distributed systems?13. Explain the concept of Real-time operating systems?14. Define MULTICS?15. What is SCSI?16. What is a sector?17. What is cache-coherency?18. What are residence monitors?19. What is dual-mode operation?20. What are the operating system components?21. What are operating system services?22. What are system calls?23. What is a layered approach and what is its advantage?24. What is micro kernel approach and site its advantages?25. What are a virtual machines and site their advantages?26. What is a process?27. What are the states of a process?28. What are various scheduling queues?29. What is a job queue?30. What is a ready queue?31. What is a device queue?32. What is a long term scheduler & short term schedulers?33. What is context switching?34. What are the disadvantages of context switching?35. What are co-operating processes?36. What is a thread?37. What are the benefits of multithreaded programming?38. What are types of threads?39. Which category the java thread do fall in?40. What are multithreading models?41. What is a P-thread?42. What are java threads?43. What is process synchronization?44. What is critical section problem?

Page 56: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

45. What is a semaphore?46. What is bounded-buffer problem?47. What is readers-writers problem?48. What is dining philosophers’ problem?49. What is a deadlock?50. What are necessary conditions for dead lock?51. What is resource allocation graph?52. What are deadlock prevention techniques?53. What is a safe state and a safe sequence?54. What are the deadlock avoidance algorithms?55. What are the basic functions of an operating system?56. Explain briefly about, processor, assembler, compiler, loader, linker and the functionsexecuted by them.57. What is a Real-Time System?58. What is the difference between Hard and Soft real-time systems?59. What is virtual memory?60. What is cache memory?61.Differentiate between Complier and Interpreter?62.What are different tasks of Lexical Analysis?63. Why paging is used?64. What is Context Switch?65. Distributed Systems?66.Difference between Primary storage and secondary storage?67. What is CPU Scheduler?68. What do you mean by deadlock?69. What is Dispatcher?70. What is Throughput, Turnaround time, waiting time and Response time?71. Explain the difference between microkernel and macro kernel?72.What is multi tasking, multi programming, multi threading?73. Give a non-computer example of preemptive and non-preemptive scheduling?74. What is starvation and aging?75.Different types of Real-Time Scheduling?76. What are the Methods for Handling Deadlocks?77. What is a Safe State and its’ use in deadlock avoidance?78. Recovery from Deadlock?79.Difference between Logical and Physical Address Space?80. Binding of Instructions and Data to Memory?81. What is Memory-Management Unit (MMU)?82. What are Dynamic Loading, Dynamic Linking and Overlays?83. What is fragmentation? Different types of fragmentation?84. Define Demand Paging, Page fault interrupt, and Trashing?85. Explain Segmentation with paging?86. Under what circumstances do page faults occur? Describe the actions taken by the operatingsystem when a page fault occurs?87. What is the cause of thrashing? How does the system detect thrashing? Once it detectsthrashing, what can the system do to eliminate this problem?

Page 57: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

operating system interview questions | Part1July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

1.What is an operating system?Ans: An operating system is a program that acts as an intermediary between the user and thecomputer hardware. The purpose of an OS is to provide a convenient environment in which usercan execute programs in a convenient and efficient manner.It is a resource allocator responsiblefor allocating system resources and a control program which controls the operation of thecomputer h/w.

2.What are the various components of a computer system?Ans:1. The hardware2. The operating system3. The application programs4. The users.

3.What is purpose of different operating systems?Ans:The machine Purpose Workstation individual usability &Resources utilization MainframeOptimize utilization of hardware PC Support complex games, business application Hand heldPCs Easy interface & min. power consumption

4.What are the different operating systems?Ans:1. Batched operating systems2. Multi-programmed operating systems3. timesharing operating systems4. Distributed operating systems5. Real-time operating systems

6.What is a boot-strap program?

7.What is BIOS?

8.Explain the concept of the batched operating systems?Ans: In batched operating system the users gives their jobs to the operator who sorts theprograms according to their requirements and executes them. This is time consuming but makesthe CPU busy all the time.

operating system interview questions | Part1July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

1.What is an operating system?Ans: An operating system is a program that acts as an intermediary between the user and thecomputer hardware. The purpose of an OS is to provide a convenient environment in which usercan execute programs in a convenient and efficient manner.It is a resource allocator responsiblefor allocating system resources and a control program which controls the operation of thecomputer h/w.

2.What are the various components of a computer system?Ans:1. The hardware2. The operating system3. The application programs4. The users.

3.What is purpose of different operating systems?Ans:The machine Purpose Workstation individual usability &Resources utilization MainframeOptimize utilization of hardware PC Support complex games, business application Hand heldPCs Easy interface & min. power consumption

4.What are the different operating systems?Ans:1. Batched operating systems2. Multi-programmed operating systems3. timesharing operating systems4. Distributed operating systems5. Real-time operating systems

6.What is a boot-strap program?

7.What is BIOS?

8.Explain the concept of the batched operating systems?Ans: In batched operating system the users gives their jobs to the operator who sorts theprograms according to their requirements and executes them. This is time consuming but makesthe CPU busy all the time.

operating system interview questions | Part1July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

1.What is an operating system?Ans: An operating system is a program that acts as an intermediary between the user and thecomputer hardware. The purpose of an OS is to provide a convenient environment in which usercan execute programs in a convenient and efficient manner.It is a resource allocator responsiblefor allocating system resources and a control program which controls the operation of thecomputer h/w.

2.What are the various components of a computer system?Ans:1. The hardware2. The operating system3. The application programs4. The users.

3.What is purpose of different operating systems?Ans:The machine Purpose Workstation individual usability &Resources utilization MainframeOptimize utilization of hardware PC Support complex games, business application Hand heldPCs Easy interface & min. power consumption

4.What are the different operating systems?Ans:1. Batched operating systems2. Multi-programmed operating systems3. timesharing operating systems4. Distributed operating systems5. Real-time operating systems

6.What is a boot-strap program?

7.What is BIOS?

8.Explain the concept of the batched operating systems?Ans: In batched operating system the users gives their jobs to the operator who sorts theprograms according to their requirements and executes them. This is time consuming but makesthe CPU busy all the time.

Page 58: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

9.Explain the concept of the multi-programmed operating systems?Ans: A multi-programmed operating systems can execute a number of programs concurrently.The operating system fetches a group of programs from the job-pool in the secondary storagewhich contains all the programs to be executed, and places them in the main memory. Thisprocess is called job scheduling. Then it chooses aprogram from the ready queue and gives them to CPU to execute. When a executing programneeds some I/O operation then the operating system fetches another program and hands it to theCPU for execution, thus keeping the CPU busy all the time.

10.Explain the concept of the timesharing operating systems?Ans: It is a logical extension of the multi-programmed OS where user can interact with theprogram. The CPU executes multiple jobs by switching among them, but the switches occur sofrequently that the user feels as if the operating system is running only his program.

operating system interview questions | Part2July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

11.Explain the concept of the multi-processor systems or parallel systems?Ans: They contain a no. of processors to increase the speed of execution, and reliability, andeconomy. They are of two types:1. Symmetric multiprocessing2. Asymmetric multiprocessingIn Symmetric multi processing each processor run an identical copy of the OS, and these copiescommunicate with each other as and when needed.But in Asymmetric multiprocessing eachprocessor is assigned a specific task.

12.Explain the concept of the Distributed systems?Ans: Distributed systems work in a network. They can share the network resources,communicatewith each other

13.Explain the concept of Real-time operating systems?Ans: A real time operating system is used when rigid time requirement have been placed on theoperation of a processor or the flow of the data; thus, it is often used as a control device in adedicated application. Here the sensors bring data to the computer. The computer must analyzethe data and possibly adjust controls tomodify the sensor input.They are of two types:1. Hard real time OS2. Soft real time OS

9.Explain the concept of the multi-programmed operating systems?Ans: A multi-programmed operating systems can execute a number of programs concurrently.The operating system fetches a group of programs from the job-pool in the secondary storagewhich contains all the programs to be executed, and places them in the main memory. Thisprocess is called job scheduling. Then it chooses aprogram from the ready queue and gives them to CPU to execute. When a executing programneeds some I/O operation then the operating system fetches another program and hands it to theCPU for execution, thus keeping the CPU busy all the time.

10.Explain the concept of the timesharing operating systems?Ans: It is a logical extension of the multi-programmed OS where user can interact with theprogram. The CPU executes multiple jobs by switching among them, but the switches occur sofrequently that the user feels as if the operating system is running only his program.

operating system interview questions | Part2July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

11.Explain the concept of the multi-processor systems or parallel systems?Ans: They contain a no. of processors to increase the speed of execution, and reliability, andeconomy. They are of two types:1. Symmetric multiprocessing2. Asymmetric multiprocessingIn Symmetric multi processing each processor run an identical copy of the OS, and these copiescommunicate with each other as and when needed.But in Asymmetric multiprocessing eachprocessor is assigned a specific task.

12.Explain the concept of the Distributed systems?Ans: Distributed systems work in a network. They can share the network resources,communicatewith each other

13.Explain the concept of Real-time operating systems?Ans: A real time operating system is used when rigid time requirement have been placed on theoperation of a processor or the flow of the data; thus, it is often used as a control device in adedicated application. Here the sensors bring data to the computer. The computer must analyzethe data and possibly adjust controls tomodify the sensor input.They are of two types:1. Hard real time OS2. Soft real time OS

9.Explain the concept of the multi-programmed operating systems?Ans: A multi-programmed operating systems can execute a number of programs concurrently.The operating system fetches a group of programs from the job-pool in the secondary storagewhich contains all the programs to be executed, and places them in the main memory. Thisprocess is called job scheduling. Then it chooses aprogram from the ready queue and gives them to CPU to execute. When a executing programneeds some I/O operation then the operating system fetches another program and hands it to theCPU for execution, thus keeping the CPU busy all the time.

10.Explain the concept of the timesharing operating systems?Ans: It is a logical extension of the multi-programmed OS where user can interact with theprogram. The CPU executes multiple jobs by switching among them, but the switches occur sofrequently that the user feels as if the operating system is running only his program.

operating system interview questions | Part2July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

11.Explain the concept of the multi-processor systems or parallel systems?Ans: They contain a no. of processors to increase the speed of execution, and reliability, andeconomy. They are of two types:1. Symmetric multiprocessing2. Asymmetric multiprocessingIn Symmetric multi processing each processor run an identical copy of the OS, and these copiescommunicate with each other as and when needed.But in Asymmetric multiprocessing eachprocessor is assigned a specific task.

12.Explain the concept of the Distributed systems?Ans: Distributed systems work in a network. They can share the network resources,communicatewith each other

13.Explain the concept of Real-time operating systems?Ans: A real time operating system is used when rigid time requirement have been placed on theoperation of a processor or the flow of the data; thus, it is often used as a control device in adedicated application. Here the sensors bring data to the computer. The computer must analyzethe data and possibly adjust controls tomodify the sensor input.They are of two types:1. Hard real time OS2. Soft real time OS

Page 59: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Hard-real-time OS has well-defined fixed time constraints. But soft real time operating systemshave less stringent timing constraints.

14.Define MULTICS?Ans: MULTICS (Multiplexed information and computing services) operating system wasdeveloped from 1965-1970 at Massachusetts institute of technology as a computing utility. Manyof the ideas used in MULTICS were subsequently used in UNIX.

15.What is SCSI?Ans: Small computer systems interface.

16.What is a sector?Ans: Smallest addressable portion of a disk.

17.What is cache-coherency?Ans: In a multiprocessor system there exist several caches each may containing a copy of samevariable A. Then a change in one cache should immediately be reflected in all other caches thisprocess of maintaining the same value of a data in all the caches s called cache-coherency.

18.What are residence monitors?Ans: Early operating systems were called residence monitors.

19.What is dual-mode operation?Ans: In order to protect the operating systems and the system programs from the malfunctioningprograms the two mode operations were evolved:1. System mode.2. User mode.Here the user programs cannot directly interact with the system resources, instead they requestthe operating system which checks the request and does the required task for the user programs-DOS was written for / intel 8088 and has no dual-mode. Pentium provides dual-mode operation.

20.What are the operating system components?Ans:1. Process management2. Main memory management3. File management4. I/O system management5. Secondary storage management6. Networking7. Protection system8. Command interpreter system

Page 60: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

operating system interview questions | Part3July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

21.What are operating system services?Ans:1. Program execution2. I/O operations3. File system manipulation4. Communication5. Error detection6. Resource allocation7. Accounting8. Protection

22.What are system calls?Ans: System calls provide the interface between a process and the operating system. Systemcalls for modern Microsoft windows platforms are part of the win32 API, which is available forall the compilers written for Microsoft windows.

23.What is a layered approach and what is its advantage?Ans: Layered approach is a step towards modularizing of the system, in which the operatingsystem is broken up into a number of layers (or levels), each built on top of lower layer. Thebottom layer is the hard ware and the top most is the user interface.The main advantage of thelayered approach is modularity. The layers areselected such that each uses the functions (operations) and services of only lower layer. Thisapproach simplifies the debugging and system verification.

24.What is micro kernel approach and site its advantages?Ans: Micro kernel approach is a step towards modularizing the operating system where allnonessential components from the kernel are removed and implemented as system and user levelprogram, making the kernel smaller.The benefits of the micro kernel approach include the easeof extending the operating system. All new services are added to the user space and consequentlydo not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Alsothis approach provides more security and reliability since most services are running as userprocesses rather than kernel’s keeping the kernel intact.

25.What are a virtual machines and site their advantages?Ans: It is the concept by which an operating system can create an illusion that a process has its

operating system interview questions | Part3July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

21.What are operating system services?Ans:1. Program execution2. I/O operations3. File system manipulation4. Communication5. Error detection6. Resource allocation7. Accounting8. Protection

22.What are system calls?Ans: System calls provide the interface between a process and the operating system. Systemcalls for modern Microsoft windows platforms are part of the win32 API, which is available forall the compilers written for Microsoft windows.

23.What is a layered approach and what is its advantage?Ans: Layered approach is a step towards modularizing of the system, in which the operatingsystem is broken up into a number of layers (or levels), each built on top of lower layer. Thebottom layer is the hard ware and the top most is the user interface.The main advantage of thelayered approach is modularity. The layers areselected such that each uses the functions (operations) and services of only lower layer. Thisapproach simplifies the debugging and system verification.

24.What is micro kernel approach and site its advantages?Ans: Micro kernel approach is a step towards modularizing the operating system where allnonessential components from the kernel are removed and implemented as system and user levelprogram, making the kernel smaller.The benefits of the micro kernel approach include the easeof extending the operating system. All new services are added to the user space and consequentlydo not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Alsothis approach provides more security and reliability since most services are running as userprocesses rather than kernel’s keeping the kernel intact.

25.What are a virtual machines and site their advantages?Ans: It is the concept by which an operating system can create an illusion that a process has its

operating system interview questions | Part3July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

21.What are operating system services?Ans:1. Program execution2. I/O operations3. File system manipulation4. Communication5. Error detection6. Resource allocation7. Accounting8. Protection

22.What are system calls?Ans: System calls provide the interface between a process and the operating system. Systemcalls for modern Microsoft windows platforms are part of the win32 API, which is available forall the compilers written for Microsoft windows.

23.What is a layered approach and what is its advantage?Ans: Layered approach is a step towards modularizing of the system, in which the operatingsystem is broken up into a number of layers (or levels), each built on top of lower layer. Thebottom layer is the hard ware and the top most is the user interface.The main advantage of thelayered approach is modularity. The layers areselected such that each uses the functions (operations) and services of only lower layer. Thisapproach simplifies the debugging and system verification.

24.What is micro kernel approach and site its advantages?Ans: Micro kernel approach is a step towards modularizing the operating system where allnonessential components from the kernel are removed and implemented as system and user levelprogram, making the kernel smaller.The benefits of the micro kernel approach include the easeof extending the operating system. All new services are added to the user space and consequentlydo not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Alsothis approach provides more security and reliability since most services are running as userprocesses rather than kernel’s keeping the kernel intact.

25.What are a virtual machines and site their advantages?Ans: It is the concept by which an operating system can create an illusion that a process has its

Page 61: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

own processor with its own (virtual) memory. The operating system implements virtual machineconcept by using CPU scheduling and virtual memory.

1. The basic advantage is it provides robust level of security as each virtual machine is isolatedfrom all other VM. Hence the system resources are completely protected.2. Another advantage is that system development can be done without disrupting normaloperation. System programmers are given their own virtual machine, and as system developmentis done on the virtual machine instead of on the actualphysical machine.3. Another advantage of the virtual machine is it solves the compatibility problem.EX: Java supplied by Sun micro system provides a specification for java virtual machine.

26.What is a process?Ans: A program in execution is called a process. Or it may also be called a unit of work. Aprocess needs some system resources as CPU time, memory, files, and i/o devices to accomplishthe task. Each process is represented in the operating system by a process control block or taskcontrol block (PCB).Processes are of two types:1. Operating system processes2. User processes

27.What are the states of a process?Ans:1. New2. Running3. Waiting4. Ready5. Terminated

28.What are various scheduling queues?Ans:1. Job queue2. Ready queue3. Device queue

29.What is a job queue?Ans: When a process enters the system it is placed in the job queue.

operating system interview questions | Part4July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

own processor with its own (virtual) memory. The operating system implements virtual machineconcept by using CPU scheduling and virtual memory.

1. The basic advantage is it provides robust level of security as each virtual machine is isolatedfrom all other VM. Hence the system resources are completely protected.2. Another advantage is that system development can be done without disrupting normaloperation. System programmers are given their own virtual machine, and as system developmentis done on the virtual machine instead of on the actualphysical machine.3. Another advantage of the virtual machine is it solves the compatibility problem.EX: Java supplied by Sun micro system provides a specification for java virtual machine.

26.What is a process?Ans: A program in execution is called a process. Or it may also be called a unit of work. Aprocess needs some system resources as CPU time, memory, files, and i/o devices to accomplishthe task. Each process is represented in the operating system by a process control block or taskcontrol block (PCB).Processes are of two types:1. Operating system processes2. User processes

27.What are the states of a process?Ans:1. New2. Running3. Waiting4. Ready5. Terminated

28.What are various scheduling queues?Ans:1. Job queue2. Ready queue3. Device queue

29.What is a job queue?Ans: When a process enters the system it is placed in the job queue.

operating system interview questions | Part4July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

own processor with its own (virtual) memory. The operating system implements virtual machineconcept by using CPU scheduling and virtual memory.

1. The basic advantage is it provides robust level of security as each virtual machine is isolatedfrom all other VM. Hence the system resources are completely protected.2. Another advantage is that system development can be done without disrupting normaloperation. System programmers are given their own virtual machine, and as system developmentis done on the virtual machine instead of on the actualphysical machine.3. Another advantage of the virtual machine is it solves the compatibility problem.EX: Java supplied by Sun micro system provides a specification for java virtual machine.

26.What is a process?Ans: A program in execution is called a process. Or it may also be called a unit of work. Aprocess needs some system resources as CPU time, memory, files, and i/o devices to accomplishthe task. Each process is represented in the operating system by a process control block or taskcontrol block (PCB).Processes are of two types:1. Operating system processes2. User processes

27.What are the states of a process?Ans:1. New2. Running3. Waiting4. Ready5. Terminated

28.What are various scheduling queues?Ans:1. Job queue2. Ready queue3. Device queue

29.What is a job queue?Ans: When a process enters the system it is placed in the job queue.

operating system interview questions | Part4July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

Page 62: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

All operating system Interview Questions

30.What is a ready queue?Ans: The processes that are residing in the main memory and are ready and waiting to executeare kept on a list called the ready queue.

31.What is a device queue?Ans: A list of processes waiting for a particular I/O device is called device queue.

32.What is a long term scheduler & short term schedulers?Ans: Long term schedulers are the job schedulers that select processes from the job queue andload them into memory for execution. The short term schedulers are the CPU schedulers thatselect a process form the ready queue and allocate the CPU to one of them.

33.What is context switching?Ans: Transferring the control from one process to other process requires saving the state of theold process and loading the saved state for new process. This task is known as context switching.

34.What are the disadvantages of context switching?Ans: Time taken for switching from one process to other is pure over head. Because the systemdoes no useful work while switching. So one of the solutions is to go for threading when everpossible.

35.What are co-operating processes?Ans: The processes which share system resources as data among each other. Also the processescan communicate with each other via interprocess communication facility generally used indistributed systems. The best example is chat program used on the www.

36.What is a thread?Ans: A thread is a program line under execution. Thread sometimes called a light-weightprocess, is a basic unit of CPU utilization; it comprises a thread id, a program counter, a registerset, and a stack.

37.What are the benefits of multithreaded programming?Ans:1. Responsiveness (needn’t to wait for a lengthy process)2. Resources sharing3. Economy (Context switching between threads is easy)4. Utilization of multiprocessor architectures (perfect utilization of the multiple processors).

38.What are types of threads?Ans:1. User thread2. Kernel threadUser threads are easy to create and use but the disadvantage is that if they perform a blockingsystem calls the kernel is engaged completely to the single user thread blocking other processes.

Page 63: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

They are created in user space.Kernel threads are supported directly by the operating system.They are slower to create and manage. Most of the OS like Windows NT, Windows 2000,Solaris2, BeOS, and Tru64 Unix support kernel threading.

39.Which category the java thread do fall in?Ans: Java threads are created and managed by the java virtual machine, they do not easily fallunder the category of either user or kernel thread……

operating system interview questions | Part5July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

40.What are multithreading models?Ans: Many OS provide both kernel threading and user threading. They are called multithreadingmodels. They are of three types:1. Many-to-one model (many user level thread and one kernel thread).2. One-to-one model3. Many-to –manyIn the first model only one user can access the kernel thread by not allowing multi-processing.Example: Green threads of Solaris.The second model allows multiple threads to run on parallelprocessing systems. Creating user thread needs to create corresponding kernel thread(disadvantage).Example: Windows NT, Windows 2000, OS/2.The third model allows the user tocreate as many threads as necessary and the corresponding kernel threads can run in parallel on amultiprocessor.Example: Solaris2, IRIX, HP-UX, and Tru64 Unix.

41.What is a P-thread?Ans: P-thread refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creationand synchronization. This is a specification for thread behavior, not an implementation. Thewindows OS have generally not supported the P-threads.

42.What are java threads?Ans: Java is one of the small number of languages that support at the language level for thecreation and management of threads. However, because threads are managed by the java virtualmachine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads aseither user- or kernel-level.

43.What is process synchronization?Ans: A situation, where several processes access and manipulate the same data concurrently andthe outcome of the execution depends on the particular order in which the access takes place, is

They are created in user space.Kernel threads are supported directly by the operating system.They are slower to create and manage. Most of the OS like Windows NT, Windows 2000,Solaris2, BeOS, and Tru64 Unix support kernel threading.

39.Which category the java thread do fall in?Ans: Java threads are created and managed by the java virtual machine, they do not easily fallunder the category of either user or kernel thread……

operating system interview questions | Part5July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

40.What are multithreading models?Ans: Many OS provide both kernel threading and user threading. They are called multithreadingmodels. They are of three types:1. Many-to-one model (many user level thread and one kernel thread).2. One-to-one model3. Many-to –manyIn the first model only one user can access the kernel thread by not allowing multi-processing.Example: Green threads of Solaris.The second model allows multiple threads to run on parallelprocessing systems. Creating user thread needs to create corresponding kernel thread(disadvantage).Example: Windows NT, Windows 2000, OS/2.The third model allows the user tocreate as many threads as necessary and the corresponding kernel threads can run in parallel on amultiprocessor.Example: Solaris2, IRIX, HP-UX, and Tru64 Unix.

41.What is a P-thread?Ans: P-thread refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creationand synchronization. This is a specification for thread behavior, not an implementation. Thewindows OS have generally not supported the P-threads.

42.What are java threads?Ans: Java is one of the small number of languages that support at the language level for thecreation and management of threads. However, because threads are managed by the java virtualmachine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads aseither user- or kernel-level.

43.What is process synchronization?Ans: A situation, where several processes access and manipulate the same data concurrently andthe outcome of the execution depends on the particular order in which the access takes place, is

They are created in user space.Kernel threads are supported directly by the operating system.They are slower to create and manage. Most of the OS like Windows NT, Windows 2000,Solaris2, BeOS, and Tru64 Unix support kernel threading.

39.Which category the java thread do fall in?Ans: Java threads are created and managed by the java virtual machine, they do not easily fallunder the category of either user or kernel thread……

operating system interview questions | Part5July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

40.What are multithreading models?Ans: Many OS provide both kernel threading and user threading. They are called multithreadingmodels. They are of three types:1. Many-to-one model (many user level thread and one kernel thread).2. One-to-one model3. Many-to –manyIn the first model only one user can access the kernel thread by not allowing multi-processing.Example: Green threads of Solaris.The second model allows multiple threads to run on parallelprocessing systems. Creating user thread needs to create corresponding kernel thread(disadvantage).Example: Windows NT, Windows 2000, OS/2.The third model allows the user tocreate as many threads as necessary and the corresponding kernel threads can run in parallel on amultiprocessor.Example: Solaris2, IRIX, HP-UX, and Tru64 Unix.

41.What is a P-thread?Ans: P-thread refers to the POSIX standard (IEEE 1003.1c) defining an API for thread creationand synchronization. This is a specification for thread behavior, not an implementation. Thewindows OS have generally not supported the P-threads.

42.What are java threads?Ans: Java is one of the small number of languages that support at the language level for thecreation and management of threads. However, because threads are managed by the java virtualmachine (JVM), not by a user-level library or kernel, it is difficult to classify Java threads aseither user- or kernel-level.

43.What is process synchronization?Ans: A situation, where several processes access and manipulate the same data concurrently andthe outcome of the execution depends on the particular order in which the access takes place, is

Page 64: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

called race condition. To guard against the race condition we need to ensure that only oneprocess at a time can be manipulatingthe same data. The technique we use for this is called process synchronization.

44.What is critical section problem?Ans: Critical section is the code segment of a process in which the process may be changingcommon variables, updating tables, writing a file and so on. Only one process is allowed to gointo critical section at any given time (mutually exclusive).The critical section problem is todesign a protocol that the processes can use toco-operate. The three basic requirements of critical section are:1. Mutual exclusion2. Progress3. bounded waitingBakery algorithm is one of the solutions to CS problem.

45.What is a semaphore?Ans: It is a synchronization tool used to solve complex critical section problems. A semaphore isan integer variable that, apart from initialization, is accessed only through two standard atomicoperations: Wait and Signal.

46.What is bounded-buffer problem?Ans: Here we assume that a pool consists of n buffers, each capable of holding one item. Thesemaphore provides mutual exclusion for accesses to the buffer pool and is initialized to thevalue 1.The empty and full semaphores count the number of empty and full buffers, respectively.Empty is initialized to n, and full is initialized to 0.

47.What is readers-writers problem?Ans: Here we divide the processes into two types:1. Readers (Who want to retrieve the data only)2. Writers (Who want to retrieve as well as manipulate)We can provide permission to a number of readers to read same data at same time.But a writermust be exclusively allowed to access. There are two solutions to this problem:1. No reader will be kept waiting unless a writer has already obtained permission to use theshared object. In other words, no reader should wait for other readers to complete simply becausea writer is waiting.2. Once a writer is ready, that writer performs its write as soon as possible. In other words, if awriter is waiting to access the object, no new may start reading.

48.What is dining philosophers’ problem?Ans: Consider 5 philosophers who spend their lives thinking and eating. The philosophers sharea common circular table surrounded by 5 chairs, each belonging to one philosopher. In the centerof the table is a bowl of rice, and the table is laid with five single chop sticks. When aphilosopher thinks, she doesn’t interact with her colleagues.From time to time, a philosopher gets hungry and tries to pick up two chop sticks that are closestto her .A philosopher may pick up only one chop stick at a time. Obviously she can’t pick thestick in some others hand. When a hungry philosopher has both her chopsticks at the same time,

Page 65: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

she eats without releasing her chopsticks. When she is finished eating, she puts down both of herchopsticks and start thinking again.

49.What is a deadlock?Ans: Suppose a process request resources; if the resources are not available at that time theprocess enters into a wait state. A waiting process may never again change state, because theresources they have requested are held by some other waiting processes. This situation is calleddeadlock.

50.What are necessary conditions for dead lock?Ans:1. Mutual exclusion (where at least one resource is non-sharable)2. Hold and wait (where a process hold one resource and waits for other resource)3. No preemption (where the resources can’t be preempted)4. circular wait (where p[i] is waiting for p[j] to release a resource. i= 1,2,…nj=if (i!=n) then i+1else 1 )

operating system interview questions | Part6July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

51.What is resource allocation graph?Ans: This is the graphical description of deadlocks. This graph consists of a set of edges E and aset of vertices V. The set of vertices V is partitioned into two different types of nodesP={p1,p2,…,pn}, the set consisting of all the resources in the system, R={r1,r2,…rn}.A directededge Pi?Rj is called a request edge; a directed edge Rj?Pi is called an assignment edge. Pictorially we represent a process Pi as a circle, and eachresource type Rj as square.Since resource type Rj may have more than one instance, we representeach such instance as a dot within the square.When a request is fulfilled the request edge istransformed into an assignment edge. When a process releases a resource the assignment edge isdeleted. If the cycle involves a set of resource types, each of which has only a single instance,then a deadlock has occurred. Each process involved in the cycle is deadlock.

52.What are deadlock prevention techniques?Ans:1. Mutual exclusion : Some resources such as read only files shouldn’t be mutuallyexclusive. They should be sharable. But some resources such as printers must bemutually exclusive.2. Hold and wait : To avoid this condition we have to ensure that if a process is

she eats without releasing her chopsticks. When she is finished eating, she puts down both of herchopsticks and start thinking again.

49.What is a deadlock?Ans: Suppose a process request resources; if the resources are not available at that time theprocess enters into a wait state. A waiting process may never again change state, because theresources they have requested are held by some other waiting processes. This situation is calleddeadlock.

50.What are necessary conditions for dead lock?Ans:1. Mutual exclusion (where at least one resource is non-sharable)2. Hold and wait (where a process hold one resource and waits for other resource)3. No preemption (where the resources can’t be preempted)4. circular wait (where p[i] is waiting for p[j] to release a resource. i= 1,2,…nj=if (i!=n) then i+1else 1 )

operating system interview questions | Part6July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

51.What is resource allocation graph?Ans: This is the graphical description of deadlocks. This graph consists of a set of edges E and aset of vertices V. The set of vertices V is partitioned into two different types of nodesP={p1,p2,…,pn}, the set consisting of all the resources in the system, R={r1,r2,…rn}.A directededge Pi?Rj is called a request edge; a directed edge Rj?Pi is called an assignment edge. Pictorially we represent a process Pi as a circle, and eachresource type Rj as square.Since resource type Rj may have more than one instance, we representeach such instance as a dot within the square.When a request is fulfilled the request edge istransformed into an assignment edge. When a process releases a resource the assignment edge isdeleted. If the cycle involves a set of resource types, each of which has only a single instance,then a deadlock has occurred. Each process involved in the cycle is deadlock.

52.What are deadlock prevention techniques?Ans:1. Mutual exclusion : Some resources such as read only files shouldn’t be mutuallyexclusive. They should be sharable. But some resources such as printers must bemutually exclusive.2. Hold and wait : To avoid this condition we have to ensure that if a process is

she eats without releasing her chopsticks. When she is finished eating, she puts down both of herchopsticks and start thinking again.

49.What is a deadlock?Ans: Suppose a process request resources; if the resources are not available at that time theprocess enters into a wait state. A waiting process may never again change state, because theresources they have requested are held by some other waiting processes. This situation is calleddeadlock.

50.What are necessary conditions for dead lock?Ans:1. Mutual exclusion (where at least one resource is non-sharable)2. Hold and wait (where a process hold one resource and waits for other resource)3. No preemption (where the resources can’t be preempted)4. circular wait (where p[i] is waiting for p[j] to release a resource. i= 1,2,…nj=if (i!=n) then i+1else 1 )

operating system interview questions | Part6July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

51.What is resource allocation graph?Ans: This is the graphical description of deadlocks. This graph consists of a set of edges E and aset of vertices V. The set of vertices V is partitioned into two different types of nodesP={p1,p2,…,pn}, the set consisting of all the resources in the system, R={r1,r2,…rn}.A directededge Pi?Rj is called a request edge; a directed edge Rj?Pi is called an assignment edge. Pictorially we represent a process Pi as a circle, and eachresource type Rj as square.Since resource type Rj may have more than one instance, we representeach such instance as a dot within the square.When a request is fulfilled the request edge istransformed into an assignment edge. When a process releases a resource the assignment edge isdeleted. If the cycle involves a set of resource types, each of which has only a single instance,then a deadlock has occurred. Each process involved in the cycle is deadlock.

52.What are deadlock prevention techniques?Ans:1. Mutual exclusion : Some resources such as read only files shouldn’t be mutuallyexclusive. They should be sharable. But some resources such as printers must bemutually exclusive.2. Hold and wait : To avoid this condition we have to ensure that if a process is

Page 66: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

requesting for a resource it should not hold any resources.3. No preemption : If a process is holding some resources and requests anotherresource that cannot be immediately allocated to it (that is the process must wait),then all the resources currently being held are preempted(released autonomously).4. Circular wait : the way to ensure that this condition never holds is to impose atotal ordering of all the resource types, and to require that each process requestsresources in an increasing order of enumeration.

53.What is a safe state and a safe sequence?Ans: A system is in safe state only if there exists a safe sequence. A sequence of processes is asafe sequence for the current allocation state if, for each Pi, the resources that the Pi can stillrequest can be satisfied by the currently available resources plus the resources held by all the Pj,with j

54.What are the deadlock avoidance algorithms?Ans: A dead lock avoidance algorithm dynamically examines the resource-allocation state toensure that a circular wait condition can never exist. The resource allocation state is defined bythe number of available and allocated resources, and the maximum demand of the process.Thereare two algorithms:1. Resource allocation graph algorithm2. Banker’s algorithma. Safety algorithmb. Resource request algorithm

55. What are the basic functions of an operating system?Ans : Operating system controls and coordinates the use of the hardware among the variousapplications programs for various uses. Operating system acts as resource allocator and manager.Since there are many possibly conflicting requests for resources the operating system mustdecide which requests are allocated resources to operating the computer system efficiently andfairly. Also operating system is control program which controls the user programs to preventerrors and improper use of the computer. It is especially concerned with the operation andcontrol of I/O devices.

56.Explain briefly about, processor, assembler, compiler, loader, linker and the functionsexecuted by them.Ans :Processor:–A processor is the part a computer system that executes instructions .It is also called aCPUAssembler: — An assembler is a program that takes basic computer instructions and convertsthem into a pattern of bits that the computer’s processor can use to perform its basic operations.Some people call these instructions assembler language and others use the term assemblylanguage.Compiler: — A compiler is a special program that processes statements written in a particularprogramming language and turns them into machine language or “code” that a computer’sprocessor uses. Typically, a programmer writes language statements in a language such as Pascalor C one line at a time using an editor. The file that is created contains what are called the source

Page 67: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

statements. The programmer then runs the appropriate language compiler, specifying the name ofthe file that contains the source statements.Loader:–In a computer operating system, a loader is a component that locates a given program(which can be an application or, in some cases, part of the operating system itself) in offlinestorage (such as a hard disk), loads it into main storage (in a personal computer, it’s calledrandom access memory), and gives that program control of the computeLinker: — Linker performs the linking of libraries with the object code to make the object codeinto an executable machine code.

57. What is a Real-Time System?Ans : A real time process is a process that must respond to the events within a certain timeperiod. A real time operating system is an operating system that can run real time processessuccessfully

58. What is the difference between Hard and Soft real-time systems?Ans : A hard real-time system guarantees that critical tasks complete on time. This goal requiresthat all delays in the system be bounded from the retrieval of the stored data to the time that ittakes the operating system to finish any request made of it. A soft real time system where acritical real-time task gets priority over other tasks and retains that priority until it completes. Asin hard real time systems kernel delays need to be bounded

59. What is virtual memory?Ans : A virtual memory is hardware technique where the system appears to have more memorythat it actually does. This is done by time-sharing, the physical memory and storage parts of thememory one disk when they are not actively being used

60. What is cache memory?Ans : Cache memory is random access memory (RAM) that a computer microprocessor canaccess more quickly than it can access regular RAM. As the microprocessor processes data, itlooks first in the cache memory and if it finds the data there (from a previous reading of data), itdoes not have to do the more time-consuming reading of data

operating system interview questions | Part7July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

61.Differentiate between Complier and Interpreter?Ans : An interpreter reads one instruction at a time and carries out the actions implied by thatinstruction. It does not perform any translation. But a compiler translates the entire instructions.

statements. The programmer then runs the appropriate language compiler, specifying the name ofthe file that contains the source statements.Loader:–In a computer operating system, a loader is a component that locates a given program(which can be an application or, in some cases, part of the operating system itself) in offlinestorage (such as a hard disk), loads it into main storage (in a personal computer, it’s calledrandom access memory), and gives that program control of the computeLinker: — Linker performs the linking of libraries with the object code to make the object codeinto an executable machine code.

57. What is a Real-Time System?Ans : A real time process is a process that must respond to the events within a certain timeperiod. A real time operating system is an operating system that can run real time processessuccessfully

58. What is the difference between Hard and Soft real-time systems?Ans : A hard real-time system guarantees that critical tasks complete on time. This goal requiresthat all delays in the system be bounded from the retrieval of the stored data to the time that ittakes the operating system to finish any request made of it. A soft real time system where acritical real-time task gets priority over other tasks and retains that priority until it completes. Asin hard real time systems kernel delays need to be bounded

59. What is virtual memory?Ans : A virtual memory is hardware technique where the system appears to have more memorythat it actually does. This is done by time-sharing, the physical memory and storage parts of thememory one disk when they are not actively being used

60. What is cache memory?Ans : Cache memory is random access memory (RAM) that a computer microprocessor canaccess more quickly than it can access regular RAM. As the microprocessor processes data, itlooks first in the cache memory and if it finds the data there (from a previous reading of data), itdoes not have to do the more time-consuming reading of data

operating system interview questions | Part7July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

61.Differentiate between Complier and Interpreter?Ans : An interpreter reads one instruction at a time and carries out the actions implied by thatinstruction. It does not perform any translation. But a compiler translates the entire instructions.

statements. The programmer then runs the appropriate language compiler, specifying the name ofthe file that contains the source statements.Loader:–In a computer operating system, a loader is a component that locates a given program(which can be an application or, in some cases, part of the operating system itself) in offlinestorage (such as a hard disk), loads it into main storage (in a personal computer, it’s calledrandom access memory), and gives that program control of the computeLinker: — Linker performs the linking of libraries with the object code to make the object codeinto an executable machine code.

57. What is a Real-Time System?Ans : A real time process is a process that must respond to the events within a certain timeperiod. A real time operating system is an operating system that can run real time processessuccessfully

58. What is the difference between Hard and Soft real-time systems?Ans : A hard real-time system guarantees that critical tasks complete on time. This goal requiresthat all delays in the system be bounded from the retrieval of the stored data to the time that ittakes the operating system to finish any request made of it. A soft real time system where acritical real-time task gets priority over other tasks and retains that priority until it completes. Asin hard real time systems kernel delays need to be bounded

59. What is virtual memory?Ans : A virtual memory is hardware technique where the system appears to have more memorythat it actually does. This is done by time-sharing, the physical memory and storage parts of thememory one disk when they are not actively being used

60. What is cache memory?Ans : Cache memory is random access memory (RAM) that a computer microprocessor canaccess more quickly than it can access regular RAM. As the microprocessor processes data, itlooks first in the cache memory and if it finds the data there (from a previous reading of data), itdoes not have to do the more time-consuming reading of data

operating system interview questions | Part7July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

61.Differentiate between Complier and Interpreter?Ans : An interpreter reads one instruction at a time and carries out the actions implied by thatinstruction. It does not perform any translation. But a compiler translates the entire instructions.

Page 68: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

62.What are different tasks of Lexical Analysis?Ans : The purpose of the lexical analyzer is to partition the input text, delivering a sequence ofcomments and basic symbols. Comments are character sequences to be ignored, while basicsymbols are character sequences that correspond to terminal symbols of the grammar definingthe phrase structure of the input

63. Why paging is used?Ans : Paging is solution to external fragmentation problem which is to permit the logical addressspace of a process to be noncontiguous, thus allowing a process to be allocating physicalmemory wherever the latter is available.

64. What is Context Switch?Ans : Switching the CPU to another process requires saving the state of the old process andloading the saved state for the new process. This task is known as a context switch.Context-switch time is pure overhead, because the system does no useful work while switching. Its speedvaries from machine to machine, depending on the memory speed, the number of registers whichmust be copied, the existed of special instructions(such as a single instruction to load or store allregisters).

65. Distributed Systems?Ans : Distribute the computation among several physical processors.Loosely coupled system – each processor has its own local memory; processors communicatewith one another through various communications lines, such as high-speed buses or telephonelinesAdvantages of distributed systems:->Resources Sharing->Computation speed up – load sharing->Reliability->Communications

66.Difference between Primary storage and secondary storage?Ans :Main memory: – only large storage media that the CPU can access directly.Secondary storage: – extension of main memory that provides large nonvolatile storage capacity.

67. What is CPU Scheduler?Ans :->Selects from among the processes in memory that are ready to execute, and allocates the CPUto one of them.->CPU scheduling decisions may take place when a process:1.Switches from running to waiting state.2.Switches from running to ready state.3.Switches from waiting to ready.4.Terminates.->Scheduling under 1 and 4 is nonpreemptive.->All other scheduling is preemptive.

Page 69: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

68. What do you mean by deadlock?Ans : Deadlock is a situation where a group of processes are all blocked and none of them canbecome unblocked until one of the other becomes unblocked.The simplest deadlock is twoprocesses each of which is waiting for a message from the other

69. What is Dispatcher?Ans :->Dispatcher module gives control of the CPU to the process selected by the short-termscheduler; this involves:Switching contextSwitching to user modeJumping to the proper location in the user program to restart that programDispatch latency – time it takes for the dispatcher to stop one process and start another running.

70. What is Throughput, Turnaround time, waiting time and Response time?Ans :Throughput – number of processes that complete their execution per time unitTurnaround time – amount of time to execute a particular processWaiting time – amount of time a process has been waiting in the ready queueResponse time – amount of time it takes from when a request was submitted until the firstresponse is produced, not output (for time-sharing environment)

operating system interview questions | Part8July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

71. Explain the difference between microkernel and macro kernel?Ans :Micro-Kernel: A micro-kernel is a minimal operating system that performs only theessential functions of an operating system. All other operating system functions are performed bysystem processes.Monolithic: A monolithic operating system is one where all operating system code is in a singleexecutable image and all operating system code runs in system mode.

72.What is multi tasking, multi programming, multi threading?Ans :Multi programming: Multiprogramming is the technique of running several programs at a time

68. What do you mean by deadlock?Ans : Deadlock is a situation where a group of processes are all blocked and none of them canbecome unblocked until one of the other becomes unblocked.The simplest deadlock is twoprocesses each of which is waiting for a message from the other

69. What is Dispatcher?Ans :->Dispatcher module gives control of the CPU to the process selected by the short-termscheduler; this involves:Switching contextSwitching to user modeJumping to the proper location in the user program to restart that programDispatch latency – time it takes for the dispatcher to stop one process and start another running.

70. What is Throughput, Turnaround time, waiting time and Response time?Ans :Throughput – number of processes that complete their execution per time unitTurnaround time – amount of time to execute a particular processWaiting time – amount of time a process has been waiting in the ready queueResponse time – amount of time it takes from when a request was submitted until the firstresponse is produced, not output (for time-sharing environment)

operating system interview questions | Part8July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

71. Explain the difference between microkernel and macro kernel?Ans :Micro-Kernel: A micro-kernel is a minimal operating system that performs only theessential functions of an operating system. All other operating system functions are performed bysystem processes.Monolithic: A monolithic operating system is one where all operating system code is in a singleexecutable image and all operating system code runs in system mode.

72.What is multi tasking, multi programming, multi threading?Ans :Multi programming: Multiprogramming is the technique of running several programs at a time

68. What do you mean by deadlock?Ans : Deadlock is a situation where a group of processes are all blocked and none of them canbecome unblocked until one of the other becomes unblocked.The simplest deadlock is twoprocesses each of which is waiting for a message from the other

69. What is Dispatcher?Ans :->Dispatcher module gives control of the CPU to the process selected by the short-termscheduler; this involves:Switching contextSwitching to user modeJumping to the proper location in the user program to restart that programDispatch latency – time it takes for the dispatcher to stop one process and start another running.

70. What is Throughput, Turnaround time, waiting time and Response time?Ans :Throughput – number of processes that complete their execution per time unitTurnaround time – amount of time to execute a particular processWaiting time – amount of time a process has been waiting in the ready queueResponse time – amount of time it takes from when a request was submitted until the firstresponse is produced, not output (for time-sharing environment)

operating system interview questions | Part8July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

71. Explain the difference between microkernel and macro kernel?Ans :Micro-Kernel: A micro-kernel is a minimal operating system that performs only theessential functions of an operating system. All other operating system functions are performed bysystem processes.Monolithic: A monolithic operating system is one where all operating system code is in a singleexecutable image and all operating system code runs in system mode.

72.What is multi tasking, multi programming, multi threading?Ans :Multi programming: Multiprogramming is the technique of running several programs at a time

Page 70: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

using timesharing.It allows a computer to do several things at the same time. Multiprogrammingcreates logical parallelism.The concept of multiprogramming is that the operating system keeps several jobs in memorysimultaneously. The operating system selects a job from the job pool and starts executing a job,when that job needs to wait for any i/o operations the CPU is switched to another job. So themain idea here is that the CPU is never idle.Multi tasking: Multitasking is the logical extension of multiprogramming .The concept ofmultitasking is quite similar to multiprogramming but difference is that the switching betweenjobs occurs so frequently that the users can interact with each program while it is running. Thisconcept is also known as time-sharing systems. A time-shared operating system uses CPUscheduling and multiprogramming to provide each user with a small portion of time-sharedsystem.Multi threading: An application typically is implemented as a separate process with severalthreads of control. In some situations a single application may be required to perform severalsimilar tasks for example a web server accepts client requests for web pages, images, sound, andso forth. A busy web server may have several of clients concurrently accessing it. If the webserver ran as a traditional single-threaded process, it would be able to service only one client at atime. The amount of time that a client might have to wait for its request to be serviced could beenormous.So it is efficient to have one process that contains multiple threads to serve the same purpose.This approach would multithread the web-server process, the server would create a separatethread that would listen for client requests when a request was made rather than creating anotherprocess it would create another thread to service the request.So to get the advantages like responsiveness, Resource sharing economy and utilization ofmultiprocessor architectures multithreading concept can be used

73. Give a non-computer example of preemptive and non-preemptive scheduling?Ans : Consider any system where people use some kind of resources and compete for them. Thenon-computer examples for preemptive scheduling the traffic on the single lane road if there isemergency or there is an ambulance on the road the other vehicles give path to the vehicles thatare in need. The example for preemptive scheduling is people standing in queue for tickets.

74. What is starvation and aging?Ans :Starvation: Starvation is a resource management problem where a process does not get theresources it needs for a long time because the resources are being allocated to other processes.Aging: Aging is a technique to avoid starvation in a scheduling system. It works by adding anaging factor to the priority of each request. The aging factor must increase the request’s priorityas time passes and must ensure that a request will eventually be the highest priority request (afterit has waited long enough)

75.Different types of Real-Time Scheduling?Ans :Hard real-time systems – required to complete a critical task within a guaranteed amount oftime.Soft real-time computing – requires that critical processes receive priority over less fortunateones.

Page 71: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

76. What are the Methods for Handling Deadlocks?Ans :->Ensure that the system will never enter a deadlock state.->Allow the system to enter a deadlock state and then recover.->Ignore the problem and pretend that deadlocks never occur in the system; used by mostoperating systems, includingUNIX.

77. What is a Safe State and its’ use in deadlock avoidance?Ans :When a process requests an available resource, system must decide if immediate allocationleaves the system in a safe state->System is in safe state if there exists a safe sequence of all processes.->Sequence is safe if for each Pi, the resources that Pi can still request can be satisfied bycurrently available resources + resources held by all the Pj, with jIf Pi resource needs are not immediately available, then Pi can wait until all Pj have finished.When Pj is finished, Pi can obtain needed resources, execute, return allocated resources, andterminate.When Pi terminates, Pi+1 can obtain its needed resources, and so on.->Deadlock Avoidance Þ ensure that a system will never enter an unsafe state.

78. Recovery from Deadlock?Ans :Process Termination:->Abort all deadlocked processes.->Abort one process at a time until the deadlock cycle is eliminated.->In which order should we choose to abort?Priority of the process.How long process has computed, and how much longer to completion.Resources the process has used.Resources process needs to complete.How many processes will need to be terminated?Is process interactive or batch?Resource Preemption:->Selecting a victim – minimize cost.->Rollback – return to some safe state, restart process for that state.->Starvation – same process may always be picked as victim, include number of rollback in costfactor.

79.Difference between Logical and Physical Address Space?Ans :->The concept of a logical address space that is bound to a separate physical address space iscentral to proper memory management.Logical address – generated by the CPU; also referred to as virtual address.Physical address – address seen by the memory unit.->Logical and physical addresses are the same in compile-time and load-time address-bindingschemes; logical (virtual) and physical addresses differ in execution-time address-bindingscheme

Page 72: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

80. Binding of Instructions and Data to Memory?Ans :Address binding of instructions and data to memory addresses can happen at three differentstagesCompile time: If memory location known a priori, absolute code can be generated; mustrecompile code if starting location changes.Load time: Must generate relocatable code if memory location is not known at compile time.Execution time: Binding delayed until run time if the process can be moved during its executionfrom one memory segment to another. Need hardware support for address maps (e.g., base andlimit registers).

operating system interview questions | Part9July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

81. What is Memory-Management Unit (MMU)?Ans :Hardware device that maps virtual to physical address.In MMU scheme, the value in the relocation register is added to every address generated by auser process at the time it is sent to memory.->The user program deals with logical addresses; it never sees the real physical addresses

82. What are Dynamic Loading, Dynamic Linking and Overlays?Ans :Dynamic Loading:->Routine is not loaded until it is called->Better memory-space utilization; unused routine is never loaded.->Useful when large amounts of code are needed to handle infrequently occurring cases.->No special support from the operating system is required implemented through programdesign.Dynamic Linking:->Linking postponed until execution time.->Small piece of code, stub, used to locate the appropriate memory-resident library routine.->Stub replaces itself with the address of the routine, and executes the routine.->Operating system needed to check if routine is in processes’ memory address.->Dynamic linking is particularly useful for libraries.Overlays:->Keep in memory only those instructions and data that are needed at any given time.

80. Binding of Instructions and Data to Memory?Ans :Address binding of instructions and data to memory addresses can happen at three differentstagesCompile time: If memory location known a priori, absolute code can be generated; mustrecompile code if starting location changes.Load time: Must generate relocatable code if memory location is not known at compile time.Execution time: Binding delayed until run time if the process can be moved during its executionfrom one memory segment to another. Need hardware support for address maps (e.g., base andlimit registers).

operating system interview questions | Part9July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

81. What is Memory-Management Unit (MMU)?Ans :Hardware device that maps virtual to physical address.In MMU scheme, the value in the relocation register is added to every address generated by auser process at the time it is sent to memory.->The user program deals with logical addresses; it never sees the real physical addresses

82. What are Dynamic Loading, Dynamic Linking and Overlays?Ans :Dynamic Loading:->Routine is not loaded until it is called->Better memory-space utilization; unused routine is never loaded.->Useful when large amounts of code are needed to handle infrequently occurring cases.->No special support from the operating system is required implemented through programdesign.Dynamic Linking:->Linking postponed until execution time.->Small piece of code, stub, used to locate the appropriate memory-resident library routine.->Stub replaces itself with the address of the routine, and executes the routine.->Operating system needed to check if routine is in processes’ memory address.->Dynamic linking is particularly useful for libraries.Overlays:->Keep in memory only those instructions and data that are needed at any given time.

80. Binding of Instructions and Data to Memory?Ans :Address binding of instructions and data to memory addresses can happen at three differentstagesCompile time: If memory location known a priori, absolute code can be generated; mustrecompile code if starting location changes.Load time: Must generate relocatable code if memory location is not known at compile time.Execution time: Binding delayed until run time if the process can be moved during its executionfrom one memory segment to another. Need hardware support for address maps (e.g., base andlimit registers).

operating system interview questions | Part9July 28th, 2010

If you would like to view All operating system interview questions only at one place visit belowlink

All operating system Interview Questions

81. What is Memory-Management Unit (MMU)?Ans :Hardware device that maps virtual to physical address.In MMU scheme, the value in the relocation register is added to every address generated by auser process at the time it is sent to memory.->The user program deals with logical addresses; it never sees the real physical addresses

82. What are Dynamic Loading, Dynamic Linking and Overlays?Ans :Dynamic Loading:->Routine is not loaded until it is called->Better memory-space utilization; unused routine is never loaded.->Useful when large amounts of code are needed to handle infrequently occurring cases.->No special support from the operating system is required implemented through programdesign.Dynamic Linking:->Linking postponed until execution time.->Small piece of code, stub, used to locate the appropriate memory-resident library routine.->Stub replaces itself with the address of the routine, and executes the routine.->Operating system needed to check if routine is in processes’ memory address.->Dynamic linking is particularly useful for libraries.Overlays:->Keep in memory only those instructions and data that are needed at any given time.

Page 73: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

->Needed when process is larger than amount of memory allocated to it.->Implemented by user, no special support needed from operating system, programming designof overlay structure is complex.

83. What is fragmentation? Different types of fragmentation?Ans : Fragmentation occurs in a dynamic memory allocation system when many of the freeblocks are too small to satisfy any request.External Fragmentation: External Fragmentation happens when a dynamic memory allocationalgorithm allocates some memory and a small piece is left over that cannot be effectively used. Iftoo much external fragmentation occurs, the amount of usable memory is drasticallyreduced.Total memory space exists to satisfy a request, but it is not contiguousInternal Fragmentation: Internal fragmentation is the space wasted inside of allocated memoryblocks because of restriction on the allowed sizes of allocated blocks.Allocated memory may beslightly larger than requested memory; this size difference is memory internal to a partition, butnot being used Reduce external fragmentation by compaction->Shuffle memory contents to place all free memory together in one large block.->Compaction is possible only if relocation is dynamic, and is done at execution time.

84. Define Demand Paging, Page fault interrupt, and Trashing?Ans :Demand Paging: Demand paging is the paging policy that a page is not read into memory untilit is requested, that is, until there is a page fault on the page.Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a pagethat is not in memory.The present bit in the page table entry will be found to be off by the virtualmemory hardware and it will signal an interrupt.Trashing: The problem of many page faults occurring in a short time, called “page thrashing,”

85. Explain Segmentation with paging?Ans : Segments can be of different lengths, so it is harder to find a place for a segment inmemory than a page. With segmented virtual memory, we get the benefits of virtual memory butwe still have to do dynamic storage allocation of physical memory. In order to avoid this, it ispossible to combine segmentation and paging into a two-level virtual memory system. Eachsegment descriptor points to page table for that segment.This give some of the advantages ofpaging (easy placement) with some of the advantages of segments (logical division of theprogram).

86. Under what circumstances do page faults occur? Describe the actions taken by theoperating system when a page fault occurs?Ans : A page fault occurs when an access to a page that has not been brought into main memorytakes place. The operating system verifies the memory access, aborting the program if it isinvalid. If it is valid, a free frame is located and I/O is requested to read the needed page into thefree frame. Upon completion of I/O, the process table and page table are updated and theinstruction is restarted

87. What is the cause of thrashing? How does the system detect thrashing? Once it detectsthrashing, what can the system do to eliminate this problem?

Page 74: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Ans : Thrashing is caused by under allocation of the minimum number of pages required by aprocess, forcing it to continuously page fault. The system can detect thrashing by evaluating thelevel of CPU utilization as compared to the level of multiprogramming. It can be eliminated byreducing the level of multiprogramming.

Operating Systems

Following are a few basic questions that cover the essentials of OS:

1. Explain the concept of Reentrancy.It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant

Procedure is one in which multiple users can share a single copy of a program during the same period.Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each userprocess must be stored separately. Thus, the permanent part is the code, and the temporary part is thepointer back to the calling program and local variables used by that program. Each execution instance iscalled activation. It executes the code in the permanent part, but has its own copy of localvariables/parameters. The temporary part associated with each activation is the activation record.Generally, the activation record is kept on the stack.

Note: A reentrant procedure can be interrupted and called by an interrupting program, and stillexecute correctly on returning to the procedure.

2. Explain Belady's Anomaly.Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process'

virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reversehappens, i.e., the execution time increases even when more frames are allocated to the process. This isBelady's Anomaly. This is true for certain page reference patterns.

3. What is a binary semaphore? What is its use?A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement

mutual exclusion and synchronize concurrent processes.

4. What is thrashing?It is a phenomenon in virtual memory schemes when the processor spends most of its time

swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.

Page 75: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

5. List the Coffman's conditions that lead to a deadlock. Mutual Exclusion: Only one process may use a critical resource at a time. Hold & Wait: A process may be allocated some resources while waiting for others. No Pre-emption: No resource can be forcible removed from a process holding it. Circular Wait: A closed chain of processes exist such that each process holds at least one resource

needed by another process in the chain.

6. What are short-, long- and medium-term scheduling?Long term scheduler determines which programs are admitted to the system for processing. It

controls the degree of multiprogramming. Once admitted, a job becomes a process.

Medium term scheduling is part of the swapping function. This relates to processes that are in ablocked or suspended state. They are swapped out of real-memory until they are ready to execute. Theswapping-in decision is based on memory-management criteria.

Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an eventoccurs. It may lead to interruption of one process by preemption.

7. What are turnaround time and response time?Turnaround time is the interval between the submission of a job and its completion. Response

time is the interval between submission of a request, and the first response to that request.

8. What are the typical elements of a process image? User data: Modifiable part of user space. May include program data, user stack area, and programs

that may be modified. User program: The instructions to be executed. System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters

and calling addresses for procedure and system calls. Process control Block (PCB): Info needed by the OS to control processes.

9. What is the Translation Lookaside Buffer (TLB)?In a cached system, the base addresses of the last few referenced pages is maintained in registers

called the TLB that aids in faster lookup. TLB contains those page-table entries that have been mostrecently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetchappropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced tojust one physical memory access in cases of TLB-hit.

10. What is the resident set and working set of a process?

Page 76: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Resident set is that portion of the process image that is actually in real-memory at a particularinstant. Working set is that subset of resident set that is actually needed for execution. (Relate this to thevariable-window size method for swapping techniques.)

11. When is a system in safe state?The set of dispatchable processes is in a safe state if there exists at least one temporal order in

which all processes can be run to completion without resulting in a deadlock.

12. What is cycle stealing?We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA

controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarilysuspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done onlyat specific break points in an instruction cycle.

13. What is meant by arm-stickiness?If one or a few processes have a high access rate to data on one track of a storage disk, then they

may monopolize the device by repeated requests to that track. This generally happens with most commondevice scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are morelikely to be affected by this than low density ones.

14. What are the stipulations of C2 level security?C2 level security provides for:

Discretionary Access Control Identification and Authentication Auditing Resource reuse

15. What is busy waiting?The repeated execution of a loop of code while waiting for an event to occur is called busy-

waiting. The CPU is not engaged in any real productive activity during this period, and the process doesnot progress toward completion.

16. Explain the popular multiprocessor thread-scheduling strategies. Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is

maintained. Each processor, when idle, selects a thread from this queue. Note that load balancingrefers to a scheme where work is allocated to processors on a more permanent basis.

Page 77: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time,on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reducesynchronization blocking, and minimize process switching. Group scheduling predated this strategy.

Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads toprocessors. For the duration of program execution, each program is allocated a set of processors equalin number to the number of threads in the program. Processors are chosen from the available pool.

Dynamic scheduling: The number of thread in a program can be altered during the course ofexecution.

17. When does the condition 'rendezvous' arise?In message passing, it is the condition in which, both, the sender and receiver are blocked until

the message is delivered.

18. What is a trap and trapdoor?Trapdoor is a secret undocumented entry point into a program used to grant access without

normal methods of access authentication. A trap is a software interrupt, usually the result of an errorcondition.

19. What are local and global page replacements?Local replacement means that an incoming page is brought in only to the relevant process'

address space. Global replacement policy allows any page frame from any process to be replaced. Thelatter is applicable to variable partitions model only.

20. Define latency, transfer and seek time with respect to disk I/O.Seek time is the time required to move the disk arm to the required track. Rotational delay or

latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (ifany) and latency is the access time. Time taken to actually transfer a span of data is transfer time.

21. Describe the Buddy system of memory allocation.Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size

2^k. When some memory is required by a process, the block size of next higher order is chosen, andbroken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces arecalled buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it isrejoined, and put into the original free-block linked-list.

22. What is time-stamping?It is a technique proposed by Lamport, used to order events in a distributed system without the

use of clocks. This scheme is intended to order events consisting of the transmission of messages. Each

Page 78: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it incrementsits counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receivingsystem 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages xfrom site i and y from site j, x precedes y if one of the following conditions holds....(a) if Ti<Tj or (b) ifTi=Tj and i<j.

23. How are the wait/signal operations for monitor different from those for semaphores?If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost.

So this allows easier program design. Whereas in semaphores, every operation affects the value of thesemaphore, so the wait and signal operations should be perfectly balanced in the program.

24. In the context of memory management, what are placement and replacement algorithms?Placement algorithms determine where in available real-memory to load a program. Common

methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and oneprocess (or part of a process) needs to be swapped out to accommodate a new program. The replacementalgorithm determines which are the partitions to be swapped out.

25. In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

For load-time dynamic linking: Load module to be loaded is read into memory. Any reference toa target external module causes that module to be loaded and the references are updated to a relativeaddress from the start base address of the application module.

With run-time dynamic loading: Some of the linking is postponed until actual reference duringexecution. Then the correct module is loaded and linked.

26. What are demand- and pre-paging?With demand paging, a page is brought into memory only when a location on that page is actually

referenced during execution. With pre-paging, pages other than the one demanded by a page fault arebrought in. The selection of such pages is done based on common access patterns, especially forsecondary memory devices.

27. Paging a memory management function, while multiprogramming a processor management function,are the two interdependent?

Yes.

Page 79: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

28. What is page cannibalizing?Page swapping or page replacements are called page cannibalizing.

29. What has triggered the need for multitasking in PCs? Increased speed and memory capacity of microprocessors together with the support fir virtual

memory and Growth of client server computing

30. What are the four layers that Windows NT have in order to achieve independence? Hardware abstraction layer Kernel Subsystems System Services.

31. What is SMP?To achieve maximum efficiency and reliability a mode of operation known as symmetric

multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

32. What are the key object oriented concepts used by Windows NT? Encapsulation Object class and instance

33. Is Windows NT a full blown object oriented operating system? Give reasons.No Windows NT is not so, because its not implemented in object oriented language and the data

structures reside within one executive component and are not represented as objects and it does notsupport object oriented capabilities .

34. What is a drawback of MVT?It does not have the features like

ability to support multiple processors virtual storage source level debugging

35. What is process spawning?When the OS at the explicit request of another process creates a process, this action is called

process spawning.

36. How many jobs can be run concurrently on MVT?15 jobs

Page 80: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

37. List out some reasons for process termination. Normal completion Time limit exceeded Memory unavailable Bounds violation Protection error Arithmetic error Time overrun I/O failure Invalid instruction Privileged instruction Data misuse Operator or OS intervention Parent termination.

38. What are the reasons for process suspension? swapping interactive user request timing parent process request

39. What is process migration?It is the transfer of sufficient amount of the state of process from one machine to the target

machine

40. What is mutant?In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of

ownership.

41. What is an idle thread?The special thread a dispatcher will execute when no ready thread is found.

42. What is FtDisk?It is a fault tolerance disk driver for Windows NT.

43. What are the possible threads a thread can have? Ready Standby Running Waiting Transition Terminated.

44. What are rings in Windows NT?Windows NT uses protection mechanism called rings provides by the process to implement

separation between the user mode and kernel mode.

Page 81: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

45. What is Executive in Windows NT?In Windows NT, executive refers to the operating system code that runs in kernel mode.

46. What are the sub-components of I/O manager in Windows NT? Network redirector/ Server Cache manager. File systems Network driver Device driver

47. What are DDks? Name an operating system that includes this feature.DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows

NT includes DDks.

48. What level of security does Windows NT meets?C2 level security.

Page 82: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

computer network interview questions |Part1

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

1.What do you mean by data communication?Ans: It is the exchange of data between two devices via some form of transmission medium suchas wire cable. The communicating system must be part of a communication system made up of acombination of hardware and software.The effectiveness of a data communication systemdepends on three fundamental characteristics: delivery, accuracy and timeliness.

2.What is simplex?Ans: It is the mode of communication between two devices in which flow of data isunidirectional. i.e. one can transmit and other can receive.E.g. keyboard and monitor.

3.What is half-duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional but not at the same time. ie each station can transmit and receive but not at the sametime.E.g walkie-talkies are half-duplex system.

4.What is full duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional and it occurs simultaneously. Here signals going in either direction share the capacityof the link.E.g. telephone

5.What is a network?Ans: It is a set of devices connected by communication links. A node can be a computer or anyother device capable of sending and/or receiving data generated by other nodes on the network.

6.What is distributed processing?Ans: It is a strategy in which services provided by the network reside at multiple sites.

7.What is point to point connection?Ans:It provides a dedicated link between two devices. The entire capacity of the link is reservedfor transmission between the two devices

computer network interview questions |Part1

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

1.What do you mean by data communication?Ans: It is the exchange of data between two devices via some form of transmission medium suchas wire cable. The communicating system must be part of a communication system made up of acombination of hardware and software.The effectiveness of a data communication systemdepends on three fundamental characteristics: delivery, accuracy and timeliness.

2.What is simplex?Ans: It is the mode of communication between two devices in which flow of data isunidirectional. i.e. one can transmit and other can receive.E.g. keyboard and monitor.

3.What is half-duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional but not at the same time. ie each station can transmit and receive but not at the sametime.E.g walkie-talkies are half-duplex system.

4.What is full duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional and it occurs simultaneously. Here signals going in either direction share the capacityof the link.E.g. telephone

5.What is a network?Ans: It is a set of devices connected by communication links. A node can be a computer or anyother device capable of sending and/or receiving data generated by other nodes on the network.

6.What is distributed processing?Ans: It is a strategy in which services provided by the network reside at multiple sites.

7.What is point to point connection?Ans:It provides a dedicated link between two devices. The entire capacity of the link is reservedfor transmission between the two devices

computer network interview questions |Part1

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

1.What do you mean by data communication?Ans: It is the exchange of data between two devices via some form of transmission medium suchas wire cable. The communicating system must be part of a communication system made up of acombination of hardware and software.The effectiveness of a data communication systemdepends on three fundamental characteristics: delivery, accuracy and timeliness.

2.What is simplex?Ans: It is the mode of communication between two devices in which flow of data isunidirectional. i.e. one can transmit and other can receive.E.g. keyboard and monitor.

3.What is half-duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional but not at the same time. ie each station can transmit and receive but not at the sametime.E.g walkie-talkies are half-duplex system.

4.What is full duplex?Ans: It is the mode of communication between two devices in which flow of data is bi-directional and it occurs simultaneously. Here signals going in either direction share the capacityof the link.E.g. telephone

5.What is a network?Ans: It is a set of devices connected by communication links. A node can be a computer or anyother device capable of sending and/or receiving data generated by other nodes on the network.

6.What is distributed processing?Ans: It is a strategy in which services provided by the network reside at multiple sites.

7.What is point to point connection?Ans:It provides a dedicated link between two devices. The entire capacity of the link is reservedfor transmission between the two devices

Page 83: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

e.g. when we change the TV channels by remote control we establish a point to point connectionbetween remote control and TV control system.

8.What is multipoint connection?Ans: In multipoint connection more than two specific devices share a single link.Here the capacity of the channel is shared either separately or temporally.

9.What is a topology?Ans: Topology of a network is defined as the geometric representation of the relationship of allthe links and linking devices (node) to one another.Four basic topologies are star, bus, ring andmesh.Star – Here each device has a dedicated point to point link only to a central controller called hub.Bus -It is multipoint. One long cable acts as a backbone to link all the devices in the network.Ring -Here each device has a dedicated point to point connection only with the two devices oneither side of it.Mesh -Here every device has a dedicated point to point link to every other device.

10.Define LAN, MAN and WAN.Ans: LAN- A local area network (LAN) is a privately owned and links the devices in a singleoffice, building or campus.It allows resources to be shared between personal computers and work stations.MAN- A metropolitan-area network (MAN) spreads over an entire city.It may be wholly owned and operated by a private company, eg local telephone company.WAN – A wide area network (WAN) provides long distance transmission of data, voice, imageand video information over large geographic areas that comprise a country, a continent or evenwhole world.

computer network interview questions |Part2

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

11.Define internet?Ans: It is a network of networks.

12.What is a protocol?Ans: It is a set of rules that governs data communication. A protocol defines what iscommunicated, how it is communicated, and when it is communicated. The key elements ofprotocol are syntax, semantics and timing.

e.g. when we change the TV channels by remote control we establish a point to point connectionbetween remote control and TV control system.

8.What is multipoint connection?Ans: In multipoint connection more than two specific devices share a single link.Here the capacity of the channel is shared either separately or temporally.

9.What is a topology?Ans: Topology of a network is defined as the geometric representation of the relationship of allthe links and linking devices (node) to one another.Four basic topologies are star, bus, ring andmesh.Star – Here each device has a dedicated point to point link only to a central controller called hub.Bus -It is multipoint. One long cable acts as a backbone to link all the devices in the network.Ring -Here each device has a dedicated point to point connection only with the two devices oneither side of it.Mesh -Here every device has a dedicated point to point link to every other device.

10.Define LAN, MAN and WAN.Ans: LAN- A local area network (LAN) is a privately owned and links the devices in a singleoffice, building or campus.It allows resources to be shared between personal computers and work stations.MAN- A metropolitan-area network (MAN) spreads over an entire city.It may be wholly owned and operated by a private company, eg local telephone company.WAN – A wide area network (WAN) provides long distance transmission of data, voice, imageand video information over large geographic areas that comprise a country, a continent or evenwhole world.

computer network interview questions |Part2

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

11.Define internet?Ans: It is a network of networks.

12.What is a protocol?Ans: It is a set of rules that governs data communication. A protocol defines what iscommunicated, how it is communicated, and when it is communicated. The key elements ofprotocol are syntax, semantics and timing.

e.g. when we change the TV channels by remote control we establish a point to point connectionbetween remote control and TV control system.

8.What is multipoint connection?Ans: In multipoint connection more than two specific devices share a single link.Here the capacity of the channel is shared either separately or temporally.

9.What is a topology?Ans: Topology of a network is defined as the geometric representation of the relationship of allthe links and linking devices (node) to one another.Four basic topologies are star, bus, ring andmesh.Star – Here each device has a dedicated point to point link only to a central controller called hub.Bus -It is multipoint. One long cable acts as a backbone to link all the devices in the network.Ring -Here each device has a dedicated point to point connection only with the two devices oneither side of it.Mesh -Here every device has a dedicated point to point link to every other device.

10.Define LAN, MAN and WAN.Ans: LAN- A local area network (LAN) is a privately owned and links the devices in a singleoffice, building or campus.It allows resources to be shared between personal computers and work stations.MAN- A metropolitan-area network (MAN) spreads over an entire city.It may be wholly owned and operated by a private company, eg local telephone company.WAN – A wide area network (WAN) provides long distance transmission of data, voice, imageand video information over large geographic areas that comprise a country, a continent or evenwhole world.

computer network interview questions |Part2

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

11.Define internet?Ans: It is a network of networks.

12.What is a protocol?Ans: It is a set of rules that governs data communication. A protocol defines what iscommunicated, how it is communicated, and when it is communicated. The key elements ofprotocol are syntax, semantics and timing.

Page 84: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

13.What is TCP/IP protocol model?Ans: It is a five layered model which provides guidelines for the development of universallycompatible networking protocols.The five layers are physical, data link, network, transport and application.

14.Describe the functions of five layers?Ans: Physical- It transmits raw bits over a medium. It provides mechanical and electricalspecification.Data link- It organizes bits into frames. It provides hop to hop delivery.Network-It moves the packets from source to destination.It provide internetworking.Transport-It provides reliable process to process message delivery and error recovery.Application-It allows ti access to network resources.

15.What is ISO-OSI model?Ans: Open Systems Interconnection or OSI model was designed by the InternationalOrganization for Standardization (ISO) .It is a seven layer model. It is a theoretical modeldesigned to show how a protocol stack should be implemented.It defines two extra layers in addition to TCP/IP model.Session -It was designed to establish, maintain, and synchronize the interaction betweencommunicating system.Presentation-It was designed to handle the syntax and semantics of the information exchangedbetween the two systems. It was designed for data translation, encryption, decryption, andcompression.

16. What is multiplexing?Ans: Multiplexing is the process of dividing a link, the phycal medium, into logical channels forbetter efficiency. Here medium is not changed but it has several channels instead of one.

16.What is switching?Ans: Switching in data communication is of three typesCircuit switchingPacket switchingMessage switching

17.How data is transmitted over a medium?Ans: Data is transmitted in the form of electromagnetic signals.

18. Compare analog and digital signals?Ans: Analog signals can have an infinite number of values in a range but digital signal can haveonly a limited number of values.

19.Define bandwidth?Ans: The range of frequencies that a medium can pass is called bandwidth. It is the differencebetween the highest and lowest frequencies that the medium can satisfactorily pass.

Page 85: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

20.What are the factors on which data rate depends?Ans: Data rate ie.how fast we can send data depends uponi) Bandwidth availableii) The levels of signals we can useiii) The quality of the channel (level of noise)

computer network interview questions |Part3

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

21.Define bit rate and bit interval?Ans: Digital signals are aperiodic.so instead of using period and frequency we use bit intervaland bit rate respectively.Bit interval is the time required to send one single bit.Bit rate is thenumber of bit intervals per second.

22.What is Nyquist bit rate formula?Ans: For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bitrateBitrate=2* Bandwidth*log2LWhere Bandwidth is the bandwidth of the channelL is the number of signal level used to represent the dataBitrate is the bit rate in bits per second.

23.Define Shannon Capacity?Ans: Shannon Capacity determines the theoretical highest data rate foe a noise channel.Capacity= Bandwidth * log2 (1+SNR)Bandwidth is the bandwidth of the channel.SNR is the signal to noise ratio, it is the statical ratio of the power of the signal to the power ofthe noise.Capacity is the capacity of the channel in bits per second

24.What is sampling?Ans: It is the process of obtaining amplitude of a signal at regular intervals.

25.Define pulse amplitude modulation?Ans: It is an analog to digital conversion method which takes analog signals, samples it andgenerates a series of pulse based on the results of the sampling. It is not used in data

20.What are the factors on which data rate depends?Ans: Data rate ie.how fast we can send data depends uponi) Bandwidth availableii) The levels of signals we can useiii) The quality of the channel (level of noise)

computer network interview questions |Part3

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

21.Define bit rate and bit interval?Ans: Digital signals are aperiodic.so instead of using period and frequency we use bit intervaland bit rate respectively.Bit interval is the time required to send one single bit.Bit rate is thenumber of bit intervals per second.

22.What is Nyquist bit rate formula?Ans: For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bitrateBitrate=2* Bandwidth*log2LWhere Bandwidth is the bandwidth of the channelL is the number of signal level used to represent the dataBitrate is the bit rate in bits per second.

23.Define Shannon Capacity?Ans: Shannon Capacity determines the theoretical highest data rate foe a noise channel.Capacity= Bandwidth * log2 (1+SNR)Bandwidth is the bandwidth of the channel.SNR is the signal to noise ratio, it is the statical ratio of the power of the signal to the power ofthe noise.Capacity is the capacity of the channel in bits per second

24.What is sampling?Ans: It is the process of obtaining amplitude of a signal at regular intervals.

25.Define pulse amplitude modulation?Ans: It is an analog to digital conversion method which takes analog signals, samples it andgenerates a series of pulse based on the results of the sampling. It is not used in data

20.What are the factors on which data rate depends?Ans: Data rate ie.how fast we can send data depends uponi) Bandwidth availableii) The levels of signals we can useiii) The quality of the channel (level of noise)

computer network interview questions |Part3

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

21.Define bit rate and bit interval?Ans: Digital signals are aperiodic.so instead of using period and frequency we use bit intervaland bit rate respectively.Bit interval is the time required to send one single bit.Bit rate is thenumber of bit intervals per second.

22.What is Nyquist bit rate formula?Ans: For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bitrateBitrate=2* Bandwidth*log2LWhere Bandwidth is the bandwidth of the channelL is the number of signal level used to represent the dataBitrate is the bit rate in bits per second.

23.Define Shannon Capacity?Ans: Shannon Capacity determines the theoretical highest data rate foe a noise channel.Capacity= Bandwidth * log2 (1+SNR)Bandwidth is the bandwidth of the channel.SNR is the signal to noise ratio, it is the statical ratio of the power of the signal to the power ofthe noise.Capacity is the capacity of the channel in bits per second

24.What is sampling?Ans: It is the process of obtaining amplitude of a signal at regular intervals.

25.Define pulse amplitude modulation?Ans: It is an analog to digital conversion method which takes analog signals, samples it andgenerates a series of pulse based on the results of the sampling. It is not used in data

Page 86: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

communication because the series of pulses generated still of any amplitude. To modify it we usepulse code modulation.

26.Define pulse code modulation?Ans: Pulse code Modulation modifies pulses created by PAM to create a completely digitalsignal.For this PCM first quantizes the PAM pulse. Quantization is the method of assigning integralvalues in a specific tange to sampled instances.PCM is made up of four separate processes:PAM, quantization, binary encoding and line encoding.

27.What is Nyquist Theorem?Ans: According to this theorem, the sampling rate must be at least 2 times the highest frequencyof the original signal.

28.What are the modes of data transmission?Ans: Data transmission can be serial or parallel in modeIn parallel transmission, a group of bits is sent simultaneously, with each bit on a separate line.Inserial transmission there is only one line and the bits are sent sequentially.

29.What is Asynchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, each byte is framed with a start bit and a stop bit. There may be avariable length gap between each byte.

30.What is Synchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, bits are sent in acontinuous stream without start and stop bit and without gaps between bytes. Regrouping the bitsinto meaningful bytes is the responsibility of the receiver.

computer network interview questions |Part4

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

31.What are the different types of multiplexing?Ans: Multiplexing is of three types. Frequency division multiplexing and wave divisionmultiplexing is for analog signals and time division multiplexing is for digital signals.

communication because the series of pulses generated still of any amplitude. To modify it we usepulse code modulation.

26.Define pulse code modulation?Ans: Pulse code Modulation modifies pulses created by PAM to create a completely digitalsignal.For this PCM first quantizes the PAM pulse. Quantization is the method of assigning integralvalues in a specific tange to sampled instances.PCM is made up of four separate processes:PAM, quantization, binary encoding and line encoding.

27.What is Nyquist Theorem?Ans: According to this theorem, the sampling rate must be at least 2 times the highest frequencyof the original signal.

28.What are the modes of data transmission?Ans: Data transmission can be serial or parallel in modeIn parallel transmission, a group of bits is sent simultaneously, with each bit on a separate line.Inserial transmission there is only one line and the bits are sent sequentially.

29.What is Asynchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, each byte is framed with a start bit and a stop bit. There may be avariable length gap between each byte.

30.What is Synchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, bits are sent in acontinuous stream without start and stop bit and without gaps between bytes. Regrouping the bitsinto meaningful bytes is the responsibility of the receiver.

computer network interview questions |Part4

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

31.What are the different types of multiplexing?Ans: Multiplexing is of three types. Frequency division multiplexing and wave divisionmultiplexing is for analog signals and time division multiplexing is for digital signals.

communication because the series of pulses generated still of any amplitude. To modify it we usepulse code modulation.

26.Define pulse code modulation?Ans: Pulse code Modulation modifies pulses created by PAM to create a completely digitalsignal.For this PCM first quantizes the PAM pulse. Quantization is the method of assigning integralvalues in a specific tange to sampled instances.PCM is made up of four separate processes:PAM, quantization, binary encoding and line encoding.

27.What is Nyquist Theorem?Ans: According to this theorem, the sampling rate must be at least 2 times the highest frequencyof the original signal.

28.What are the modes of data transmission?Ans: Data transmission can be serial or parallel in modeIn parallel transmission, a group of bits is sent simultaneously, with each bit on a separate line.Inserial transmission there is only one line and the bits are sent sequentially.

29.What is Asynchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, each byte is framed with a start bit and a stop bit. There may be avariable length gap between each byte.

30.What is Synchronous mode of data transmission?Ans: It is a serial mode of transmission.In this mode of transmission, bits are sent in acontinuous stream without start and stop bit and without gaps between bytes. Regrouping the bitsinto meaningful bytes is the responsibility of the receiver.

computer network interview questions |Part4

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

31.What are the different types of multiplexing?Ans: Multiplexing is of three types. Frequency division multiplexing and wave divisionmultiplexing is for analog signals and time division multiplexing is for digital signals.

Page 87: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

32.What is FDM?Ans: In frequency division multiplexing each signal modulates a different carrier frequency. Themodulated carrier combines to form a new signal that is then sent across the link.Here multiplexers modulate and combine the signal while demultiplexers decompose anddemodulate.Guard bands keep the modulating signal from overlapping and interfering with one another.

32.What is TDM ?Ans: In TDM digital signals from n devices are interleaved with one another, forming a frame ofdata.Framing bits allow the TDM multiplexer to synchronize properly.

33.What are the different transmission media?Ans: The transmission media is broadly categorized into two typesi)Guided media(wired)i)Unguided media(wireless)

34.What are the different Guided Media?Ans: The media which provides a conduct from one device to another is called a guided media.These include twisted pair cable, coaxial cable, and fiber-optic cable.

35.Describe about the different Guided Medias.Ans: Twisted pair cable consists of two insulated cupper wires twisted together. It is used intelephone line for voice and data communications.Coaxial cable has the following layers: a metallic rod-shaped inner conductor, an insulatorcovering the rod, a metallic outer conductor (shield), an insulator covering the shield, and aplastic cover.Coaxial cable can carry signals of higher frequency ranges than twisted-pair cable.Coaxial cable is used in cable TV networks and Ethernet LANs.Fiber-optic cables are composedof a glass or plastic inner core surrounded by cladding, all encased in an outer jacket.Fiber-opticcables carry data signals in the form of light. The signal is propagated along the inner core byreflection. Its features are noise resistance, low attenuation, and high bandwidth capabilities.It is used in backbone networks, cable TV nerworks, and fast Ethernet networks.

36.What do you mean by wireless communication?Ans: Unguided media transport electromagnetic waves without using a physical conductor. Thistype of communication is referred as wireless communication.Here signals are broadcaster through air and thus available to anyone who has a device to receiveit.

37.What do you mean by switching?Ans: It is a method in which communication devices are connected to one another efficiently.A switch is intermediary hardware or software that links devices together temporarily.

38.What are the switching methods?Ans: There are three fundamental switching methods: circuit switching, packet switching,And message switching.In circuit switching, a direct physical connection between two devices is

Page 88: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

created by space division switches, time division switches or both.In packet switching data is transmitted using a packet switched network. Packet switchednetwork is a network in which data are transmitted in independent units called packets.

39.What are the duties of data link layer?Ans: Data link layer is responsible for carrying packets from one hop (computer or router) to thenext. The duties of data link layer include packetizing, adderssing, error control, flow control,medium access control.

40.What are the types of errors?Ans: Errors can be categorized as a single-bit error or burst error. A single bit error has one biterror per data unit. A burst error has two or more bits errors per data unit.

computer network interview questions |Part5

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

41.What do you mean by redundancy?Ans: Redundancy is the concept of sending extra bits for use in error detection. Three commonredundancy methods are parity check, cyclic redundancy check (CRC), and checksum.

42.Define parity check.Ans: In parity check, a parity bit is added to every data unit so that the total number of 1s is even(or odd for odd parity).Simple parity check can detect all single bit errors. It can detect bursterrors only if the total number of errors in each data unit is odd.In two dimensional parity checks,a block of bits is divided into rows and a redundant row of bits is added to the whole block.

43. Define cyclic redundancy check (CRC).Ans: C RC appends a sequence of redundant bits derived from binary division to the data unit.The divisor in the CRC generator is often represented as an algebraic polynomial.

44. What is hamming code?Ans: The hamming code is an error correction method using redundant bits. The number of bitsis a function of the length of the data bits. In hamming code for a data unit of m bits, we use theformula 2r >= m+r+1 to determine the number of redundant bits needed. By rearranging theorder of bit transmission of the data units, the hamming code can correct burst errors.

created by space division switches, time division switches or both.In packet switching data is transmitted using a packet switched network. Packet switchednetwork is a network in which data are transmitted in independent units called packets.

39.What are the duties of data link layer?Ans: Data link layer is responsible for carrying packets from one hop (computer or router) to thenext. The duties of data link layer include packetizing, adderssing, error control, flow control,medium access control.

40.What are the types of errors?Ans: Errors can be categorized as a single-bit error or burst error. A single bit error has one biterror per data unit. A burst error has two or more bits errors per data unit.

computer network interview questions |Part5

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

41.What do you mean by redundancy?Ans: Redundancy is the concept of sending extra bits for use in error detection. Three commonredundancy methods are parity check, cyclic redundancy check (CRC), and checksum.

42.Define parity check.Ans: In parity check, a parity bit is added to every data unit so that the total number of 1s is even(or odd for odd parity).Simple parity check can detect all single bit errors. It can detect bursterrors only if the total number of errors in each data unit is odd.In two dimensional parity checks,a block of bits is divided into rows and a redundant row of bits is added to the whole block.

43. Define cyclic redundancy check (CRC).Ans: C RC appends a sequence of redundant bits derived from binary division to the data unit.The divisor in the CRC generator is often represented as an algebraic polynomial.

44. What is hamming code?Ans: The hamming code is an error correction method using redundant bits. The number of bitsis a function of the length of the data bits. In hamming code for a data unit of m bits, we use theformula 2r >= m+r+1 to determine the number of redundant bits needed. By rearranging theorder of bit transmission of the data units, the hamming code can correct burst errors.

created by space division switches, time division switches or both.In packet switching data is transmitted using a packet switched network. Packet switchednetwork is a network in which data are transmitted in independent units called packets.

39.What are the duties of data link layer?Ans: Data link layer is responsible for carrying packets from one hop (computer or router) to thenext. The duties of data link layer include packetizing, adderssing, error control, flow control,medium access control.

40.What are the types of errors?Ans: Errors can be categorized as a single-bit error or burst error. A single bit error has one biterror per data unit. A burst error has two or more bits errors per data unit.

computer network interview questions |Part5

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

41.What do you mean by redundancy?Ans: Redundancy is the concept of sending extra bits for use in error detection. Three commonredundancy methods are parity check, cyclic redundancy check (CRC), and checksum.

42.Define parity check.Ans: In parity check, a parity bit is added to every data unit so that the total number of 1s is even(or odd for odd parity).Simple parity check can detect all single bit errors. It can detect bursterrors only if the total number of errors in each data unit is odd.In two dimensional parity checks,a block of bits is divided into rows and a redundant row of bits is added to the whole block.

43. Define cyclic redundancy check (CRC).Ans: C RC appends a sequence of redundant bits derived from binary division to the data unit.The divisor in the CRC generator is often represented as an algebraic polynomial.

44. What is hamming code?Ans: The hamming code is an error correction method using redundant bits. The number of bitsis a function of the length of the data bits. In hamming code for a data unit of m bits, we use theformula 2r >= m+r+1 to determine the number of redundant bits needed. By rearranging theorder of bit transmission of the data units, the hamming code can correct burst errors.

Page 89: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

45.What do you mean by flow control?Ans: It is the regulation of sender’s data rate so that the receiver buffer doesn’t becomeoverwhelmed.i.e. flow control refers to a set of procedures used to restrict the amount of datathat the sender can send before waiting for acknowledgement.

46.What do you mean by error control?Ans: Error control refers primarily to methods of error detection and retransmission. Anytime anerror is detected in an exchange, specified frames are retransmitted. This process is calledautomatic repeat request (ARQ).

47.Define stop and wait ARQ.Ans: In stop and wait ARQ, the sender sends a frame and waits for an acknowledgement fromthe receiver before sending the next frame.

48.Define Go-Back-N ARQ?Ans: In Go-Back-N ARQ, multiple frames can be in transit at the same time. If there is an error,retransmission begins with the last Unacknowledged frame even if subsequent frames arrivedcorrectly. Duplicate frames are discarded.

49.Define Selective Repeat ARQ?Ans: In Selective Repeat ARQ, multiple frames can be in transit at the same time. If there is anerror, only unacknowledged frame is retransmitted.

50.What do you mean by pipelining, is there any pipelining in error control?Ans: The process in which a task is often begun before the previous task has ended is calledpipelining. There is no pipelining in stop and wait ARQ however it does apply in Go-Back-NARQ and Selective Repeat ARQ.

computer network interview questions |Part6

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

51.What is HDLC?Ans: It is a bit oriented data link protocol designed to support both half duplex and full duplexcommunication over point to point and multi point links.HDLC is characterized by their stationtype,configuration and their response modes.

45.What do you mean by flow control?Ans: It is the regulation of sender’s data rate so that the receiver buffer doesn’t becomeoverwhelmed.i.e. flow control refers to a set of procedures used to restrict the amount of datathat the sender can send before waiting for acknowledgement.

46.What do you mean by error control?Ans: Error control refers primarily to methods of error detection and retransmission. Anytime anerror is detected in an exchange, specified frames are retransmitted. This process is calledautomatic repeat request (ARQ).

47.Define stop and wait ARQ.Ans: In stop and wait ARQ, the sender sends a frame and waits for an acknowledgement fromthe receiver before sending the next frame.

48.Define Go-Back-N ARQ?Ans: In Go-Back-N ARQ, multiple frames can be in transit at the same time. If there is an error,retransmission begins with the last Unacknowledged frame even if subsequent frames arrivedcorrectly. Duplicate frames are discarded.

49.Define Selective Repeat ARQ?Ans: In Selective Repeat ARQ, multiple frames can be in transit at the same time. If there is anerror, only unacknowledged frame is retransmitted.

50.What do you mean by pipelining, is there any pipelining in error control?Ans: The process in which a task is often begun before the previous task has ended is calledpipelining. There is no pipelining in stop and wait ARQ however it does apply in Go-Back-NARQ and Selective Repeat ARQ.

computer network interview questions |Part6

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

51.What is HDLC?Ans: It is a bit oriented data link protocol designed to support both half duplex and full duplexcommunication over point to point and multi point links.HDLC is characterized by their stationtype,configuration and their response modes.

45.What do you mean by flow control?Ans: It is the regulation of sender’s data rate so that the receiver buffer doesn’t becomeoverwhelmed.i.e. flow control refers to a set of procedures used to restrict the amount of datathat the sender can send before waiting for acknowledgement.

46.What do you mean by error control?Ans: Error control refers primarily to methods of error detection and retransmission. Anytime anerror is detected in an exchange, specified frames are retransmitted. This process is calledautomatic repeat request (ARQ).

47.Define stop and wait ARQ.Ans: In stop and wait ARQ, the sender sends a frame and waits for an acknowledgement fromthe receiver before sending the next frame.

48.Define Go-Back-N ARQ?Ans: In Go-Back-N ARQ, multiple frames can be in transit at the same time. If there is an error,retransmission begins with the last Unacknowledged frame even if subsequent frames arrivedcorrectly. Duplicate frames are discarded.

49.Define Selective Repeat ARQ?Ans: In Selective Repeat ARQ, multiple frames can be in transit at the same time. If there is anerror, only unacknowledged frame is retransmitted.

50.What do you mean by pipelining, is there any pipelining in error control?Ans: The process in which a task is often begun before the previous task has ended is calledpipelining. There is no pipelining in stop and wait ARQ however it does apply in Go-Back-NARQ and Selective Repeat ARQ.

computer network interview questions |Part6

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

51.What is HDLC?Ans: It is a bit oriented data link protocol designed to support both half duplex and full duplexcommunication over point to point and multi point links.HDLC is characterized by their stationtype,configuration and their response modes.

Page 90: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

52.What do you mean by point to point protocol?Ans: The point to point protocol was designed to provide a dedicated line for users who needinternet access via a telephone line or a cable TV connection. Its connection goes through threephases: idle, establishing, authenticating, networking and terminating.At data link layer it employs a version of HDLC.

53. What do you mean by point to point protocol stack?Ans: Point to point protocol uses a stack of other protocol to use the link, to authenticate theparties involved, and to carry the network layer data. Three sets of protocols are defined: linkcontrol protocol, Authentication protocol, and network control protocol.

54.What do you mean by line control protocol?Ans: It is responsible for establishing, maintaining, configuring, and terminating links.

55.What do you mean by Authentication protocol?Ans: Authentication means validating the identity of a user who needs to access a set ofresources.It is of two typesi)Password Authentication Protocol(PAP)ii)Challenge Handshake Authentication Protocol(CHAP)PAP is a two step process. The user sends a authentication identification and a password. Thesystem determines the validity of the Information sent.CHAP is a three step process. The systemsends a value to the user. The user manipulates the value and sends the result. The systemVerifies the result.

56.What do you mean by network control protocol?Ans: Network control protocol is a set of protocols to allow the encapsulation of data comingfrom network layer protocol that requires the services of PPP.

57. What do you mean by CSMA?Ans: To reduce the possibility of collision CSMA method was developed. In CSMA each stationfirst listen to the medium (Or check the state of the medium) before sending. It can’t eliminatecollision.

58.What do you mean by Bluetooth?Ans: It is a wireless LAN technology designed to connect devices of different functions such astelephones, notebooks, computers, cameras, printers and so on. Bluetooth LAN Is an adhocnetwork that is the network is formed spontaneously? It is the implementation of protocoldefined by the IEEE 802.15 standard.

59.What is IP address?Ans: The internet address (IP address) is 32bits that uniquely and universally defines a host orrouter on the internet.The portion of the IP address that identifies the network is called netid. The portion of the IPaddress that identifies the host or router on the network is called hostid.

Page 91: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

60.What do you mean by subnetting?Ans: Subnetting divides one large network into several smaller ones. It adds an intermediatelevel of hierarchy in IP addressing.

computer network interview questions |Part7

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

61.What are the advantages of fiber optics cable ?Ans: The advantages of fiber optics cable over twisted pair cable are Noise resistance-As theyuse light so external noise is not a factor. Less signal attenuation-fiber optics transmissiondistance is significantly greater than that of other guided media.Higher bandwidth-It can supporthigher bandwidth.

62.What are the disadvantages of fiber optics cable?Ans: The disadvantages of fiber optics cable over twisted pair cable areCost-It is expensive Installation/maintenance-Any roughness or cracking defuses light and altersthe signal Fragility-It is more fragile.

63.What are the propagation type of radio wave ?Ans: Radio wave propagation is dependent upon frequency.There are five propagation type.i)surface propagationii)Tropospheric propagationiii)Ionospheric propagationiv)Line of sight propagationv)space propagation

64.What do you mean by Geosynchronous Satellites ?Ans: Satellite communication uses a satellite in geosynchronous orbit to relay signals.TheSatellite must move at the same speed as the earth so that it seems to remain fixed above acertain spot..Only one orbit can be geosynchronous.This orbit occurs at the equatorial plane andis approximately 22,000 miles from the surface of earth.

65.What are the factors for evaluating the suitability of the media ?Ans: The factors are cost,throughput,attenuation,Electromagneric interference(EMI),securtty.

66.What do you mean by medium access control(MAC) sublayer.Ans: The protocols used to determine who goes next on a multi-access channel belong to a

60.What do you mean by subnetting?Ans: Subnetting divides one large network into several smaller ones. It adds an intermediatelevel of hierarchy in IP addressing.

computer network interview questions |Part7

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

61.What are the advantages of fiber optics cable ?Ans: The advantages of fiber optics cable over twisted pair cable are Noise resistance-As theyuse light so external noise is not a factor. Less signal attenuation-fiber optics transmissiondistance is significantly greater than that of other guided media.Higher bandwidth-It can supporthigher bandwidth.

62.What are the disadvantages of fiber optics cable?Ans: The disadvantages of fiber optics cable over twisted pair cable areCost-It is expensive Installation/maintenance-Any roughness or cracking defuses light and altersthe signal Fragility-It is more fragile.

63.What are the propagation type of radio wave ?Ans: Radio wave propagation is dependent upon frequency.There are five propagation type.i)surface propagationii)Tropospheric propagationiii)Ionospheric propagationiv)Line of sight propagationv)space propagation

64.What do you mean by Geosynchronous Satellites ?Ans: Satellite communication uses a satellite in geosynchronous orbit to relay signals.TheSatellite must move at the same speed as the earth so that it seems to remain fixed above acertain spot..Only one orbit can be geosynchronous.This orbit occurs at the equatorial plane andis approximately 22,000 miles from the surface of earth.

65.What are the factors for evaluating the suitability of the media ?Ans: The factors are cost,throughput,attenuation,Electromagneric interference(EMI),securtty.

66.What do you mean by medium access control(MAC) sublayer.Ans: The protocols used to determine who goes next on a multi-access channel belong to a

60.What do you mean by subnetting?Ans: Subnetting divides one large network into several smaller ones. It adds an intermediatelevel of hierarchy in IP addressing.

computer network interview questions |Part7

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

61.What are the advantages of fiber optics cable ?Ans: The advantages of fiber optics cable over twisted pair cable are Noise resistance-As theyuse light so external noise is not a factor. Less signal attenuation-fiber optics transmissiondistance is significantly greater than that of other guided media.Higher bandwidth-It can supporthigher bandwidth.

62.What are the disadvantages of fiber optics cable?Ans: The disadvantages of fiber optics cable over twisted pair cable areCost-It is expensive Installation/maintenance-Any roughness or cracking defuses light and altersthe signal Fragility-It is more fragile.

63.What are the propagation type of radio wave ?Ans: Radio wave propagation is dependent upon frequency.There are five propagation type.i)surface propagationii)Tropospheric propagationiii)Ionospheric propagationiv)Line of sight propagationv)space propagation

64.What do you mean by Geosynchronous Satellites ?Ans: Satellite communication uses a satellite in geosynchronous orbit to relay signals.TheSatellite must move at the same speed as the earth so that it seems to remain fixed above acertain spot..Only one orbit can be geosynchronous.This orbit occurs at the equatorial plane andis approximately 22,000 miles from the surface of earth.

65.What are the factors for evaluating the suitability of the media ?Ans: The factors are cost,throughput,attenuation,Electromagneric interference(EMI),securtty.

66.What do you mean by medium access control(MAC) sublayer.Ans: The protocols used to determine who goes next on a multi-access channel belong to a

Page 92: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

sublayer of the data link layer is called the multi-access channel(MAC) sublayer.It is the buttompart of data link layer.

67.What do you mean by ALOHA ?Ans: It is the method used to solve the channel allocation problem .It is used for:i)ground based radio broadcastingii)In a network in which uncoordinated users are competing for the use of single channel.It is of two types:1.Pure aloha2.Slotted aloha

68.What is pure ALOHA?Ans: It lets users transmit whenever they have data to sent.Collision may occur but due tofeedback property sender can know the status of message.conflict occur when at one time morebits are transmitted.The assumptions are :i)all frame size is same for all user.ii)collision occur when frames are transmitted simultaneouslyiii)indefinite population of no of user.iv)N=number of frames/frame timeiv)it obeys poisson’s distribution if N>1 there will be collision 0<1

69.What is slotted ALOHA?Ans: In this method time is divided into discrete intervals,each interval corresponding to oneframe.It requires user to agree on slot boundaries.Here data is not send at any time instead it waitfor beginning of the next slot.Thus pure ALOHA is tuened into discrete one.

70.What do you mean by persistent CSMA(carrier sense multiple access) ?Ans: When a station has data to send,it first listens to the channel to see if anyone else istransmitting at that moment.If channel is busy it waits until the station becomes idle. Whencollision occurs it waits and then sends.It sends frame with probability 1 when channel is idle.

computer network interview questions |Part8

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

71.What do you mean by non persistent CSMA(carrier sense multiple access) ?Ans: Here if no one else is sending the station begins doing so itself.However if the channel is

sublayer of the data link layer is called the multi-access channel(MAC) sublayer.It is the buttompart of data link layer.

67.What do you mean by ALOHA ?Ans: It is the method used to solve the channel allocation problem .It is used for:i)ground based radio broadcastingii)In a network in which uncoordinated users are competing for the use of single channel.It is of two types:1.Pure aloha2.Slotted aloha

68.What is pure ALOHA?Ans: It lets users transmit whenever they have data to sent.Collision may occur but due tofeedback property sender can know the status of message.conflict occur when at one time morebits are transmitted.The assumptions are :i)all frame size is same for all user.ii)collision occur when frames are transmitted simultaneouslyiii)indefinite population of no of user.iv)N=number of frames/frame timeiv)it obeys poisson’s distribution if N>1 there will be collision 0<1

69.What is slotted ALOHA?Ans: In this method time is divided into discrete intervals,each interval corresponding to oneframe.It requires user to agree on slot boundaries.Here data is not send at any time instead it waitfor beginning of the next slot.Thus pure ALOHA is tuened into discrete one.

70.What do you mean by persistent CSMA(carrier sense multiple access) ?Ans: When a station has data to send,it first listens to the channel to see if anyone else istransmitting at that moment.If channel is busy it waits until the station becomes idle. Whencollision occurs it waits and then sends.It sends frame with probability 1 when channel is idle.

computer network interview questions |Part8

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

71.What do you mean by non persistent CSMA(carrier sense multiple access) ?Ans: Here if no one else is sending the station begins doing so itself.However if the channel is

sublayer of the data link layer is called the multi-access channel(MAC) sublayer.It is the buttompart of data link layer.

67.What do you mean by ALOHA ?Ans: It is the method used to solve the channel allocation problem .It is used for:i)ground based radio broadcastingii)In a network in which uncoordinated users are competing for the use of single channel.It is of two types:1.Pure aloha2.Slotted aloha

68.What is pure ALOHA?Ans: It lets users transmit whenever they have data to sent.Collision may occur but due tofeedback property sender can know the status of message.conflict occur when at one time morebits are transmitted.The assumptions are :i)all frame size is same for all user.ii)collision occur when frames are transmitted simultaneouslyiii)indefinite population of no of user.iv)N=number of frames/frame timeiv)it obeys poisson’s distribution if N>1 there will be collision 0<1

69.What is slotted ALOHA?Ans: In this method time is divided into discrete intervals,each interval corresponding to oneframe.It requires user to agree on slot boundaries.Here data is not send at any time instead it waitfor beginning of the next slot.Thus pure ALOHA is tuened into discrete one.

70.What do you mean by persistent CSMA(carrier sense multiple access) ?Ans: When a station has data to send,it first listens to the channel to see if anyone else istransmitting at that moment.If channel is busy it waits until the station becomes idle. Whencollision occurs it waits and then sends.It sends frame with probability 1 when channel is idle.

computer network interview questions |Part8

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

71.What do you mean by non persistent CSMA(carrier sense multiple access) ?Ans: Here if no one else is sending the station begins doing so itself.However if the channel is

Page 93: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

already in use,the station does’t continuously sense it rather it waits for a random period of timeand then repeats.It leads better channel utilization but longer delay.

72.What do you mean by p persistent CSMA(carrier sense multiple access) ?Ans: It applies to slotted channels.when a station becomes ready to send,it senses the channel.Ifit is idle it transmits with a probability P,with a probability Q=P-1It defers until the next slot.If that slot is also idle,it either transmits or defers again withprobability P and Q.The process is repeated until either the frame has been transmitted or anotherstation begins transmitting.

73.What is FDDI?Ans: It is high performance fiber optic token ring LAN running at 100Mbps over distance up1000 stations.FDDI access is limited by time.A FDDI cabling consist of two fiber rings.i)one transmitting clockwiseii)one transmitting counterclockwise

74.What is Firewalls?Ans: It is an electronic downbridge which is used to enhance the security of a network. It’sconfiguration has two components.i)Two routersii)Application gatewaythe packets traveling through the LAN are inspected here and packets meeting certain criteria areforwarded and others are dropped.

75.What is Repeaters ?Ans: A receiver receives a signal before it becomes too weak or corrupted,regenerates theoriginal bit pattern,and puts the refreshed copy back onto the link.It operates on phycal layer ofOSI model.

76.What is Bridges?Ans: They divide large network into smaller components.They can relay frames between twooriginally separated LANs.They provide security through partitioning traffic.They operate onphycal and data link layer of OSI model.

77.What is Routers ?Ans: Router relay packets among multiple interconnected networks.They receive packet fromone connected network and pass it to another network.They have access to network layeraddresses and certain software that enables them to determine which path is best for transmissionamong several paths.They operate on phycal,data link and network layer of OSI model.

78.What is Gateway ?Ans: It is a protocol converter.A gateway can accept a packet formatted for one protocol andconvert it to a packet formatted for another protocol.It operates on all the seven layers of OSImodel.

Page 94: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

79.What do you mean by Data Terminal Equipment(DTE) ?Ans: It is any device that is source of or destination for binary digital data.At phycal layer it canbe a terminal computer. They generate or consume information.

80.What do you mean by Data Terminating Equipment (DCE) ?Ans: Data circuit terminating equipment includes any functional unit that transmit or receivesdata in the form of an analog or digital signal through a network.DTE generates digital data andpasses them to a DCE ,the DCE converts the data to a form acceptable to the transmission mediaand sends the converted signal to another DCE on the network.

computer network interview questions |Part9

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

81.What do you mean by protocol stack ?Ans: The list of protocols used by certain system ,one protocol per layer is called protocol stack.

82.What do you mean by peer ?Ans: Entities comprising the corresponding layers on different machines are called peers.It maybe• hardware device.• processes• human beingpeers communicate by using protocol.

83.What do you mean by broadcasting ?Ans: Broadcast system allow addressing a packet to all destination by using a special code inaddress field.when packet is transmitted it is received and processed by every machine on thenetwork.

84.What are the advantages of broadcast network.Ans:• a single communication channel is shared by all computers.• packets are transmitted and received by all the computer.• address field is attached to whom it is intended.• multicasting is used in network.

79.What do you mean by Data Terminal Equipment(DTE) ?Ans: It is any device that is source of or destination for binary digital data.At phycal layer it canbe a terminal computer. They generate or consume information.

80.What do you mean by Data Terminating Equipment (DCE) ?Ans: Data circuit terminating equipment includes any functional unit that transmit or receivesdata in the form of an analog or digital signal through a network.DTE generates digital data andpasses them to a DCE ,the DCE converts the data to a form acceptable to the transmission mediaand sends the converted signal to another DCE on the network.

computer network interview questions |Part9

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

81.What do you mean by protocol stack ?Ans: The list of protocols used by certain system ,one protocol per layer is called protocol stack.

82.What do you mean by peer ?Ans: Entities comprising the corresponding layers on different machines are called peers.It maybe• hardware device.• processes• human beingpeers communicate by using protocol.

83.What do you mean by broadcasting ?Ans: Broadcast system allow addressing a packet to all destination by using a special code inaddress field.when packet is transmitted it is received and processed by every machine on thenetwork.

84.What are the advantages of broadcast network.Ans:• a single communication channel is shared by all computers.• packets are transmitted and received by all the computer.• address field is attached to whom it is intended.• multicasting is used in network.

79.What do you mean by Data Terminal Equipment(DTE) ?Ans: It is any device that is source of or destination for binary digital data.At phycal layer it canbe a terminal computer. They generate or consume information.

80.What do you mean by Data Terminating Equipment (DCE) ?Ans: Data circuit terminating equipment includes any functional unit that transmit or receivesdata in the form of an analog or digital signal through a network.DTE generates digital data andpasses them to a DCE ,the DCE converts the data to a form acceptable to the transmission mediaand sends the converted signal to another DCE on the network.

computer network interview questions |Part9

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

All computer network Interview Questions

81.What do you mean by protocol stack ?Ans: The list of protocols used by certain system ,one protocol per layer is called protocol stack.

82.What do you mean by peer ?Ans: Entities comprising the corresponding layers on different machines are called peers.It maybe• hardware device.• processes• human beingpeers communicate by using protocol.

83.What do you mean by broadcasting ?Ans: Broadcast system allow addressing a packet to all destination by using a special code inaddress field.when packet is transmitted it is received and processed by every machine on thenetwork.

84.What are the advantages of broadcast network.Ans:• a single communication channel is shared by all computers.• packets are transmitted and received by all the computer.• address field is attached to whom it is intended.• multicasting is used in network.

Page 95: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

85.What do you mean by point to point network?Ans: Point to point network consist of many connections between individual pair ofmachines.large networks are point to point.Routing algorithm plays an important in point topoint network.It uses stored ad forword technique.It is a packet switching network.

86.What are the design issue of layers ?Ans: The design issue of layer are• Addressing technique.ie source and destination address• Types of communication• Error control• Order of message.• Speed matching• Multiplexing and demultiplexing.

87.What are the protocols in application layer ?Ans: The protocols defined in application layer are• TELNET• FTP• SMTP• DNS

88.What are the protocols in transport layer ?Ans: The protocols defined in transport layer are• TCP• UDP

89.Define TCP ?Ans: It is connection oriented protocol.It consist byte streams oeiginating on one machine to bedelivered without error on any other machine in the network.while transmitting it fragments thestream to discrete messages and passes to interner layer.At the destination it reassembles themessages into output stream.

90.Define UDP ?Ans: It is unreliable connectionless protocol.It is used for one-shot,client-server type,requesr-reply queries and applications in which prompt delivery is required than accuracy.

computer network interview questions |Part10

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

85.What do you mean by point to point network?Ans: Point to point network consist of many connections between individual pair ofmachines.large networks are point to point.Routing algorithm plays an important in point topoint network.It uses stored ad forword technique.It is a packet switching network.

86.What are the design issue of layers ?Ans: The design issue of layer are• Addressing technique.ie source and destination address• Types of communication• Error control• Order of message.• Speed matching• Multiplexing and demultiplexing.

87.What are the protocols in application layer ?Ans: The protocols defined in application layer are• TELNET• FTP• SMTP• DNS

88.What are the protocols in transport layer ?Ans: The protocols defined in transport layer are• TCP• UDP

89.Define TCP ?Ans: It is connection oriented protocol.It consist byte streams oeiginating on one machine to bedelivered without error on any other machine in the network.while transmitting it fragments thestream to discrete messages and passes to interner layer.At the destination it reassembles themessages into output stream.

90.Define UDP ?Ans: It is unreliable connectionless protocol.It is used for one-shot,client-server type,requesr-reply queries and applications in which prompt delivery is required than accuracy.

computer network interview questions |Part10

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

85.What do you mean by point to point network?Ans: Point to point network consist of many connections between individual pair ofmachines.large networks are point to point.Routing algorithm plays an important in point topoint network.It uses stored ad forword technique.It is a packet switching network.

86.What are the design issue of layers ?Ans: The design issue of layer are• Addressing technique.ie source and destination address• Types of communication• Error control• Order of message.• Speed matching• Multiplexing and demultiplexing.

87.What are the protocols in application layer ?Ans: The protocols defined in application layer are• TELNET• FTP• SMTP• DNS

88.What are the protocols in transport layer ?Ans: The protocols defined in transport layer are• TCP• UDP

89.Define TCP ?Ans: It is connection oriented protocol.It consist byte streams oeiginating on one machine to bedelivered without error on any other machine in the network.while transmitting it fragments thestream to discrete messages and passes to interner layer.At the destination it reassembles themessages into output stream.

90.Define UDP ?Ans: It is unreliable connectionless protocol.It is used for one-shot,client-server type,requesr-reply queries and applications in which prompt delivery is required than accuracy.

computer network interview questions |Part10

July 26th, 2010

If you would like to view All computer network interview questions only at one place visit belowlink

Page 96: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

All computer network Interview Questions

91.Define IP ?Ans: Internetwork protocol (IP) is the transmission mechanism used by TCP/IP protocol.It is anunreliable and connectionless datagram protocol.It provides no error checking and tracking.

92.What do you mean by client server model ?Ans: In client server model ,the client runs a program to request a service and the server runs aprogram to provide the service.These two programs communicate with each other. One serverprogram can provide services to many client programs.

93.What are the information that a computer attached to a TCP/IP internet must possesses?Ans: Each computer attached to TCP/IP must possesses the following information• Its IP addesss• Its subnet mask• The IP addesss of the router.• The Ip address of the name server.

94.What is domain name system(DNS)?Ans: Domain Name System (DNS )is a client server application that identifies each host on theinternet with a unique user friendly name.

95.What is TELNET ?Ans: TELNET is a client –server application that allows a user to log on to a remotemachine,giving the user access to the remote system. TELNET is an abbreviation of terminalNetwork.

96.What do you mean by local login and remote login ?Ans: When a user logs into a local time-sharing system ,it is called local login. When a userwants to access an application program or utility located on a remote machine,he or she performsremote login.

97.What is Network Virtual Terminal ?Ans: A universal interface provided by TELNET is called Network Virtual Terminal(NVT)character set.Via this interface TELNET translates characters (data or command) that come fromlocal terminal into NVT form and delivers them to the network.

98.What do you mean by Simple Mail Transfer Protocol ?Ans: The TCP/IP protocol that supports electronic mail on the internet is called Simple MailTransfer Protocol.SMTP provides for mail exchange between users on the same or differentcomputer and supports Sending a single message to one or more recipient Sending message thatinclude text, voice,video,or graphics.Sending message to users on network outside the internet.

99.What is Hypertext Transfer Protocol(HTTP) ?Ans: It is the main protocol used to access data on the World Wide Web .the protol transfers data

Page 97: Question - Wikispaces 1. What does static ... C language interview questions | Part1 1. ... 1-Calloc takes two arguments Calloc(b,c ) wh ere b no of object and c size of object

in the form of plain text,hypertext,audio,video,and so on. It is so called because its efficiencyallows its use in a hypertext environment where there are rapid jumps from one document toanother.

100.What is URL ?Ans: It is a standard for specifying any kind of information on the World Wide Web.

101. What is World Wide Web ?Ans: World Wide Web is a repository of information spread all over the world and linkedtogether.It is a unique combination of flexibility,portability,and user-friendly features .TheWorld Wide Web today is a distributed client-server service,in which a client using a browsercan access a service using a server.The service provided is distributed over many locations calledweb sites.

102.What is HTML ?Ans: Hypertext Markup Language (HTML) is a language for creating static web pages