Explore topic-wise MCQs in C Interview.

This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your C Interview knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?

A. rand() / RAND_MAX
B. rand() % 2
C. rand(0, 1)
D. none of the mentioned
E. randomly?a) rand() / RAND_MAXb) rand() % 2c) rand(0, 1)d) none of the mentioned
Answer» B. rand() % 2
2.

In the following C program, every time program is run different numbers are generated.

A. True
B. False
C. Depends on the platform
D. Depends on the compilerView Answer
Answer» B. False
3.

In the below C program, every time program is run different numbers are generated.

A. True
B. False
C. Depends on the platform
D. Depends on the compilerView Answer
Answer» C. Depends on the platform