C Language Interview Question and Answers

26. What is static identifier?
 
  • A file–scope variable that is declared static is visible only to functions within that file.
  • A function–scope or block–scope variable that is declared as static is visible only within that scope.
  • Further more, static variables only have a single instance.
  • In the case of function or block–scope variables, this means that the variable is not “automatic” and thus retains its value across function invocations.
 
Your Name Your Email-ID
Your Answer
27. What is a dynamic constructor?
  The constructor can also be used to allocate memory while creating objects. Allocation of memory to objects at the time of their construction is known as dynamic construction of objects.The memory is allocated with the help of the new operator.
 
Your Name Your Email-ID
Your Answer
28. What is the difference between an Array and a List?
  The main difference between an array and a list is how they internally store the data.
Whereas Array is collection of homogeneous elements. List is collection of heterogeneous elements.
 
Your Name Your Email-ID
Your Answer
29. What are the advantages of inheritance?
 
  • Code reusability
  • Saves time in program development.
 
Your Name Your Email-ID
Your Answer
30. what is difference between function overloading and operator overloading?
  A function is overloaded when same name is given to different function.
While overloading a function, the return type of the functions need to be the same.
 
Your Name Your Email-ID
Your Answer