C Programming Question and Answers

21. What is FIFO?
 
  • In C programming, there is a data structure known as queue. In this structure, data is stored and accessed using FIFO format, or First In First Out.
  • A queue represents a line wherein the first data that was stored will be the first one that is accessible as well.
 
Your Name Your Email-ID
Your Answer
22. What is the difference between pre decrement and post decrement operator?
 
  • Pre decrement operator is used to decrement variable value by 1 before assigning the value to the variable.
  • Post decrement operator is used to decrement variable value by 1 after assigning the value to the variable.
 
Your Name Your Email-ID
Your Answer
23. Is it possible to write a program without a main() functions?
  No, the main functions is mandatory. The execution of all programs begins from the main() function.
 
Your Name Your Email-ID
Your Answer
24. What is file pointer in C?
 
  • File pointer is a pointer which is used to handle and keep track on the files being accessed.
  • A new data type called FILE is used to declare file pointer. This data type is defined in stdio.h file. File pointer is declared as FILE *fp. Where, 'fb' is a file pointer.
  • fopen() function is used to open a file that returns a FILE pointer. Once file is opened, file pointer can be used to perform I/O operations on the file. fclose() function is used to close the file.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 6 of 15