What is wrong with the above code?
Code for the next three questions – this code is supposed to fill and array with random numbers
1.
```
int numList[1000];
```
2.
```
srand(123);
```
3.
```
for(int i = 0; i<1000; i++)
```
4.
```
{
numList[i] = rand()%1000 +5;
cout << numList[i];
}
```
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. None the above.
You might also like to view...
Suppose the unary ! operator is an overloaded member function of class String. For a String object s, which function call is generated by the compiler when it finds the expression !s?
a. s.operator!() b. s.operator!( default_value1, default_value2,…) c. operator!( s ) d. A compiler error results because no arguments are given.
The statement shared_ptr
A) a single allocation of a dynamic block of memory. B) two allocations of two different dynamic blocks of memory. C) three allocations of three different dynamic blocks of memory. D) no allocations of dynamic memory. E) None of the above
Which statement is false?
a. The Collections API provides a set of public static methods for converting collections to unmodifiable versions. b. Unmodifable wrappers throw ModificationExceptions if attempts are made to modify the collection. c. You can use an unmodifiable wrapper to create a collection that offers read-only access to others while allowing read-write access to yourself. d. You can create the kind of collection mentioned in part (c) simply by giving others a reference to the unmodifiable wrapper while you also retain a reference to the wrapped collection itself.
Offers visitors a choice from a given set of options.
a. Hidden fields b. Select boxes c. Radio buttons d. Password box e. Checkboxes f. Email, telephone, and URL input types