Answer:
In C++:
#include<iostream>
#include<vector>
using namespace std;
int main(){
int len, num;
vector<int> vect;
cout<<"Length: ";
cin>>len;
for(int i = 0; i<len;i++){
cin>>num;
vect.push_back(num);}
vector<int>::iterator iter;
for (iter = vect.end() - 1; iter >= vect.begin(); iter--){
cout << *iter << ", ";}
}
Explanation:
This declares the length of vector and input number as integer
int len, num;
This declares an integer vector
vector<int> vect;
This prompts the user for length
cout<<"Length: ";
This gets the input for length
cin>>len;
The following iteration gets input into the vector
<em> for(int i = 0; i<len;i++){</em>
<em> cin>>num;</em>
<em> vect.push_back(num);}</em>
This declares an iterator for the vector
vector<int>::iterator iter;
The following iterates from the end to the beginning and prints the vector in reverse
<em> for (iter = vect.end() - 1; iter >= vect.begin(); iter--){</em>
<em> cout << *iter << ", ";}</em>
<em />
<em />
Answer:
Disadvantages:
1. A division may feel separated from the parent company because it has too much independence
2. This feeling of separation may lead to the division only worrying about meeting it's goals and objectives and not the companies as a whole
3. This system may be more expensive to operate and cannot share resources with other divisions
Explanation:
Answer:
Following are the solution to the given choices:
Explanation:
Given:
double currentBalance[91];//defining a double array
In point a:
The name of the array is= currentBalance.
In point b:
91 double values could be saved in the array. It requires 8bytes to hold a double that if the array size is 91*8 = 728
In point c:
Each element's data type is double.
In point d:
The array index range of values is between 0 and 90 (every array index starts from 0 and ends in N-1, here N=91).
In point e:
To access first element use currentBalance[0], for middle currentBalance[91/2] , for last currentBalance[90]
Answer:
c. Better
Explanation:
Truncate command response time is better as compared to Delete command.
Answer:
Option (d) Software firewall is placed between the normal application and the networking components of the operating system
Explanation:
- Software Firewalls protect the computer from trojans and malicious content which can arise from unsafe applications.
- It also protect the computer from external network.
- It filters the data to and from a software application in the desktop.
- It also filters the data to and from a network.
- It safeguards the computer from not loosing access to the attackers.
- It is customizable software and has to be monitored like installing updates and storage spaces etc.
- Software Firewall in conjunction with the Hardware Firewall must be used for the security of the desktop and the networks.