C Programming Question and Answers

17. What is the syntax for comments in C?
 
  • Below is the syntax for comments in C. The characters or words or anything which are given between "/*" and "*/", won't be considered by C compiler for compilation process. These will be ignored by C compiler during compilations.
  • Syntax : /* your comments here */
 
Your Name Your Email-ID
Your Answer
18. List out some of C compilers?
  There are so many compilers available in market for Windows operating system and UNIX. We are listing some of them here for your reference.
  • AMPC
  • CCS C Compiler
  • ch
  • clang
  • cygwin
  • Digital mars
  • GCC compiler
  • MikroC Compiler
  • Portable C Compiler,Power C, QuickC, Ritchie C Compiler, Small– C.
 
Your Name Your Email-ID
Your Answer
19. What is the difference between exit() and return() in C?
 
  • exit() is a system call which terminates current process.
  • exit() is not an instruction of C language.
  • Whereas, return() is a C language instructions/statements and it returns from the current function (i.e. provides exit status to calling function and provides control back to the calling functions).
 
Your Name Your Email-ID
Your Answer
20. What is the difference between calloc and malloc?
  calloc and malloc are used for dynamic memory allocation. calloc initializes the memory locations to zero by default but malloc memory contains garbage values.
 
Your Name Your Email-ID
Your Answer