What is wrong with the above code?

```1 int numList[1000];
2 srand(123);
3 for(int i = 0; i<1000; i++)
4 {
5 numList[i] = rand()%1000 +5;
6 cout << numList[i];
7 }```

A. Line 2 – should be seed(123);
B. Line 5 – rand() should have a number in the parentheses for random number generation
C. Line 3 – should be i=1000;
D. None the above.


D

Computer Science & Information Technology

You might also like to view...

During project execution, explicit tasks are designated in a _______ to manage security, safety, and other critical requirements of ICT product development.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Empty elements appear in code as ____________________ tags.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Write a SELECT statement to list first and last names of all instructors sorted by last name.

What will be an ideal response?

Computer Science & Information Technology

How does overlaying affect program development time?

What will be an ideal response?

Computer Science & Information Technology