C Language Interview Question and Answers

46. What is recursion?
  A recursion function is one which calls itself either directly or indirectly it must halt at a definite point to avoid infinite recursion.
 
Your Name Your Email-ID
Your Answer
47. What are the characteristics of arrays in C?
 
  • An array holds elements that have the same data type.
  • Array elements are stored in subsequent memory locations
  • Two-dimensional array elements are stored row by row in subsequent memory locations.
  • Array name represents the address of the starting element
 
Your Name Your Email-ID
Your Answer
48. What is the differentiate between for loop and a while loop? What are it uses?
  For executing a set of statements fixed number of times we use for loop while when the number of iterations to be performed is not known in advance we use while loop.
 
Your Name Your Email-ID
Your Answer
49. What is the difference between printf(...) and sprintf(...)?
  printf(....) -------------> is standard output statement
sprintf(......)-----------> is formatted output statement.
 
Your Name Your Email-ID
Your Answer
50. What is an explicit constructor?
  A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.Explicit constructors are simply constructors that cannot take part in an implicit conversion.
 
Your Name Your Email-ID
Your Answer