C Languages Interview Questions

17. What is the difference between getch() and getche()?
 
  • Both getch() and getche() are used to read single character there is very little difference.
  • Both functions accept a character input value from the user.
  • When getch() is used, the key that was pressed will not appear on the screen. It is automatically captured and assigned to a variable.
  • While when getche() is used, the key that was pressed by the user appears on the screen and is assigned to a variable.
 
Your Name Your Email-ID
Your Answer
18. What are actual arguments?
 
  • When you create and use functions that need to perform an action on some given values, you need to pass these given values to that function.
  • The values that are being passed into the called functions are referred to as actual arguments.
 
Your Name Your Email-ID
Your Answer
19. Is void pointer arithmetic a valid one?
 
  • Arithmetic operation on void pointer is not valid one. Void pointer is a generic pointer.
  • It is not referring int, char or any other data type specifically.
  • So, we need to cast void pointer to specific type before applying arithmetic operations.
 
Your Name Your Email-ID
Your Answer
20. What is the difference between a and "a"?
  Where a is a character constant and "a" is a string.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 5 of 15