Pointers can be used to manipulate the size and shape of the object.
Answer: Option 2.
<u>Explanation:</u>
Digital drawing is the point at which a drawing is made utilizing designs programming. Rather than utilizing a pencil and paper, advanced craftsmen draw with a tablet or a PC, alongside a gadget, for example, a mouse or a stylus.
Drawing digitally makes it simpler to pick hues and change them and their levels with a basic snap of your mouse. To put it plainly, advanced workmanship lets you change your canvases without demolishing them and also change the shape and size of the objects easily.
Answer:
The ArrayList initial functionality is 5, there were 4 components.
Then, add 25 more elements by using add()calling 25 times So total number of elements after the completed operation would be 4 + 25= 29.
5th component will be introduced without calling ensureCapacity(); while adding 6th element-> ensureCapacity(2* 5+ 1) it will call, making the capacity 11.
So ArrayList's capacity will be 11.
Next 7th to 11th components will also be added automatically once the 12th element is added, it will name ensureCapacity(2* 11+ 1) and make the capacity 23.
While adding 24th dimension, ensureCapacity(2* 23+ 1) will be called again and this will make the capacity 47.
There will therefore be 3 (three) calls to ensure the feature Ability).
Elements of Rest 25th to 29th will be added seamlessly as ability becomes 47.
Answer:
In C++:
#include<iostream>
using namespace std;
int main(){
int numDays;
cin>>numDays;
cout<<"Days: "<<numDays<<endl;
return 0;
}
Explanation:
This line declares numDays as integer
int numDays;
This line gets user input for numDays
cin>>numDays;
This line prints the required output and ends with a newline
cout<<"Days: "<<numDays<<endl;
I’d say A: Dave is partly right in his answer that gamma rays are the most dangerous, but it is because of their frequency and wavelength, not where they come from.
Gamma rays are the most intense and thus, most harmful electromagnetic waves. Gamma rays radiation poisoning is difficult to shield against. These rays have the most energy and can go through six feet of concrete and damage your DNA as well. The higher the energy waves (gamma, x-ray), the shorter the wavelengths
See below for the modified program in Java
<h3>How to modify the program?</h3>
The for loop statements in the program are:
- for (int i = 0; i < arr.length; i++) { arr[i] = rd.nextInt(1000); }
- for (int i = 0; i < arr.length; i++) { System.out.println(arr[i]); }
To use the enhanced for loop, we make use of the for each statement.
This syntax of the enhanced for loop is:
for(int elem : elems)
Where elem is an integer variable and elems is an array or arrayList
So, we have the following modifications:
- i = 0; for (int num : arr){ arr[i] = rd.nextInt(1000); i++;}
- for (int num : arr) { System.out.println(num); }
Hence, the modified program in Java is:
class Main {
static int[] createRandomArray(int nrElements) {
Random rd = new Random();
int[] arr = new int[nrElements];
int i = 0;
for (int num : arr){
arr[i] = rd.nextInt(1000);
i++;
}
return arr;
}
static void printArray(int[] arr) {
for (int num : arr) {
System.out.println(num);
}
}
}
public static void main(String[] args) {
int[] arr = createRandomArray(5);
printArray(arr);
}
}
Read more about enhanced for loop at:
brainly.com/question/14555679
#SPJ1