Question 1
Which of the C variable qualifiers amongst const and Volatile provides more data safety ? Explain the reason.
Answer 1
const is the qualifier that provides more data security by throwing error when an accidental attempt is made to modify the same.
Question 2
Which is more memory efficient in generic sense - Arrays or Linked Lists ?
Answer 2
Actually, there is no significant difference in memory requirement for arrays and linked lists as both increase with increase in data. (However, linked lists are generally easier to work with dynamic data)
Question 3
Among function declaration and function definition which of the following gives first hand information to the compiler about its return data type and arguments.
Answer 3
Function declaration is the answer, as it precedes function definition. With function declaration, the compiler can get to know about its return data type, the number and type of the arguments etc.
No comments:
Post a Comment