C-50

These are some commonly asked question during interviews ....

  1. What is C language ?
  2. What does static variable mean?
  3. What are the different storage classes in C ?
  4. What is hashing ?
  5. Can static variables be declared in a header file ?
  6. Can a variable be both constant and volatile ?
  7. Can include files be nested?
  8. What is a null pointer ?
  9. What is the output of printf("%d") ?
  10. What is the difference between calloc() and malloc() ?
  11. What is the difference between printf() and sprintf() ?
  12. How to reduce a final size of executable ?
  13. Can you tell me how to check whether a linked list is circular ?
  14. Advantages of a macro over a function ?
  15. What is the difference between strings and character arrays ?
  16. Write down the equivalent pointer expression for referring the same element a[i][j][k][l] ?
  17. Which bit wise operator is suitable for checking whether a particular bit is on or off ?
  18. Which bit wise operator is suitable for turning off a particular bit in a number ?
  19. Which bit wise operator is suitable for putting on a particular bit in a number ?
  20. Does there exist any other function which can be used to convert an integer or a float to a string ?
  21. Why does malloc(0) return valid memory address ? What's the use ?
  22. Difference between const char* p and char const* p
  23. What is the result of using Option Explicit ?
  24. What is the benefit of using an enum rather than a #define constant ?
  25. What is the quickest sorting method to use ?
  26. When should the volatile modifier be used ?
  27. When should the register modifier be used? Does it really help ?
  28. How can you determine the size of an allocated portion of memory ?
  29. What is page thrashing ?
  30. When does the compiler not implicitly generate the address of the first element of an array ?
  31. What is the benefit of using #define to declare a constant ?
  32. How can I search for data in a linked list ?
  33. Why should we assign NULL to the elements (pointer) after freeing them ?
  34. What is a null pointer assignment error ? What are bus errors, memory faults, and core dumps ?
  35. When should a type cast be used ?
  36. What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
  37. How can I convert a string to a number ?
  38. How can I convert a number to a string ?
  39. Is it possible to execute code even after the program exits the main() function?
  40. What is the stack ?
  41. How do you print an address ?
  42. Can a file other than a .h file be included with #include ?
  43. What is Preprocessor ?
  44. How can you restore a redirected standard stream ?
  45. What is the purpose of realloc( ) ?
  46. What is the heap ?
  47. How do you use a pointer to a function ?
  48. What is the purpose of main( ) function ?
  49. Why n++ executes faster than n+1 ?
  50. What will the preprocessor do for a program ?




No comments:

Post a Comment