Answer:
Descriptive Statistics.
Explanation:
First Steve gathered the data and after that he created the pie chart displaying the percentage of psychologists working in different fields.Here Steve used descriptive statistics to display the data that he collected.
Descriptive statistics are the descriptive coefficients that give the abstract of the data collected.
Answer:
# include <iostream.h>
# include <stdio.h>
# include <string.h>
using namespace std;
class citizen
{
int i;
public string name[30];
public long int phonenumber[30];
public void addindividual(string name1)
{
If (i<=30)
{ int flag=0;
for(int j=0; j<=i;j++)
{
if (strcmp(name[i], name1)
{
flag=1;
}
else
{
flag=0;
}
}
If (flag)
{
if (i<30)
{
for(j=i+1;j<=30; j++)
{
cout<<"Enter the name:"; getchar(name[j]);
cout<<"Enter the phone number:"; cin>>phonenumber[j];
i++;
}
else
{
cout<<"The person already exists";
exit();
}
}
else
{
cout<<"array is full:";
exit();
}
}
}
Void main()
{
string str;
cout<<" Enter name:";
getline(cin, str); ;
citizen c1=new citizen();
c1.addindividual(name1);
}
Explanation:
With a little more effort you can make the program allow the user to enter any number of details, but less than 30 overall. We have used here flag, and as a programmer we know why we use the Flag. It is used to check whether certain Boolean condition is fulfilled or not. Here, we are checking whether a given name is present in the array of names, and if it is not present, we add that to the list. And if the name is present, we print, it already exist.
A union is a data type that allows you to define that different data types take up the same space (e.g., an int and a float).
Usually this is not a very safe way of programming, but there can be specific reasons to do it.
- edit: I deliberately give the definition of a union here, because the question can be interpreted in multiple ways. So I see how you could interpret the question as the definition of a linked list as well.
Answer:
the people.
Explanation:
if somebody dies, the person in charge is going to get held responsible.
Answer:
Quick Sort.
Explanation:
Quick Sort will be best suited for an array having 100000 elements instead of the insertion sort algorithm because as we know the average time complexity of quick sort is O(NlogN) and for insertion sort is O(n^2).The sorting totally depends upon the pivot that is being selected in quick sort.
While insertion sort is best suited for arrays that are already sorted it takes O(n) time in those cases.
Since the array that we have is very large and so we need an algorithm that can sort the array faster than the other sorting algorithms.Quick Sort is also inplace and does not requires extra space to do the sorting.