C Languages Interview Questions

9. What is the use of sizeof() functions?
  sizeof() function is used to find the memory space allocated for each data type in C.
 
Your Name Your Email-ID
Your Answer
10. What is the program development life cycle?
  These are the sequence of events considered by the programmer to design and develop efficient programs.
 
Your Name Your Email-ID
Your Answer
11. Where should typecast functions not used in C?
 
  • Type cast function should not be used in const and volatile declaration.
  • Because, constant value can't be modified by the program once they are defined.
  • And, volatile variables values might keep on changing without any explicit assignment by the program as operating system will be modifying these values.
 
Your Name Your Email-ID
Your Answer
12. What is the difference between functions abs() and fabs()?
 
  • These two functions basically perform the same action, which is to get the absolute value of the given value.
  • Abs() is used for integer values, while fabs() is used for floating type numbers. Also the prototype for abs() is under <stdlib.h>, while fabs() is under <math.h>.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 3 of 15