C Programming Question and Answers

25. What is the difference between rand(), random(), and randomize()?
 
  • random() - returns random number between 0 and one less that its argument.
  • rand () – returns successive pseudo random numbers in the range 0 to RAND_MAX.
  • srand() – initializes the random number generator with a given seed value.
  • randomize() – initializes the random number generator with a random value.
 
Your Name Your Email-ID
Your Answer
26. What is bebugging?
  It is the process of injecting known bugs in a program in order to train the students in debugging.
 
Your Name Your Email-ID
Your Answer
27. What is a compiler?
  A compiler is a program that takes source code as its input, check the entire program instruction by instruction for its grammatical accuracy, and if the source code is grammatical accurate, then it translates the program again instruction by instruction to machine language and writes to the disk file.
 
Your Name Your Email-ID
Your Answer
28. What are all decisions control statements in C?
  There are three types of decision making control statements in C language. They are
  • if statements
  • if else statements
  • nested if statements
 
Your Name Your Email-ID
Your Answer