Programming MCQS - QUESTION DETAILS

What is the purpose of the 'rand' function in C?
A. Generate a random float
B. Generate a random integer
C. Return a fixed value
D. Find the square root

'rand' generates a random integer in C.

Similar Questions

How do you declare a pointer in C?






What is the role of the 'strcpy' function in C?






What is the purpose of the 'continue' statement in a loop?






Which operator is used to access the value pointed to by a pointer in C?






Which of the following is a bitwise AND operator in C?






What is the output of printf("%s", "Hello" + 1);?






How do you close a file in C?






What is the purpose of the 'fgets' function in C?






What is the output of printf("%c", 'A' + 1);?






What does the 'sizeof' operator return for a pointer variable?