C Language Interview Question and Answers

31. Define a class?
 
  • A class represents description of objects that share same attributes and actions.
  • It defines the characteristics of the objects such as attributes and actions or behaviors.
  • It is the blue print that describes objects.
 
Your Name Your Email-ID
Your Answer
32. What is the invalid pointer arithmetic?
 
  • adding ,multiplying and dividing two pointers.
  • Shifting or masking pointer.
  • Addition of float or double to pointer
  • Assignment of a pointer of one type to a pointer of another type
 
Your Name Your Email-ID
Your Answer
33. What is Overriding?
  To override a method, a subclass of the class that originally declared the method must declare a method with the same name, return type (or a subclass of that return type), and same parameter list.
 
Your Name Your Email-ID
Your Answer
34. What is encapsulation?
  Containing and hiding information about an object, such as internal data structures and code. Encapsulation isolates the internal complexity of an object’s operation from the rest of the application.
 
Your Name Your Email-ID
Your Answer
35. What is a pointer variable?
  A pointer variable is a variable that may contain the address of another variable or any valid address in the memory.
 
Your Name Your Email-ID
Your Answer