Answer:
The correct pseudocode to find the records of all citizens over the age of 50 is IF(age > 50).
OR EACH item IN citzlist
{
WHILE(not end of citzlist)
{
IF(age > 50)
{
DISPLAY(name)
}
}
}
If this is run, it will bring out all the names of the citizen who are over the age of 50 in the list.
Explanation:
Answer:
A, system software
Explanation:
that is answer an interpreter is a type of system software
Answer:
Java provide all the ADTs you need,therefore you do not need to create any newones.
This statement is not true.
Explanation:
ADTs are those data types which we use but we didn't know their inner working that is how it is working what is happening inside.It is commonly used for Data Structures for example:- In stack we use push and pop operations to insert and to delete element from a stack respectively but we didn't know how it is happening inside.How the stack is implemented and etc.Java provides most of the ADT's but not all.
Answer:
// program in C.
// headers
#include <stdio.h>
// headers
#include <stdlib.h>
// headers
#include <limits.h>
// main function
int main(int argc, char** argv)
{
// read value of N from command line arguments
int N=atoi(argv[1]);
// variables
int max=INT_MIN;
// variable
int min=INT_MAX;
int rA[N],i;
// fill the array with random number
for(i=0;i<N;i++)
{
// generate random number from -50 to +50
rA[i]=rand()%101-50;
// find the Maximum
if(rA[i]>max)
max=rA[i];
// find the Minimum
if(rA[i]<min)
min=rA[i];
}
// print values of array
printf("values of the array are:");
for(i=0;i<N;i++)
{
printf("%d ",rA[i]);
}
// print Maximum
printf("\nMaximum value is:%d",max);
// print Minimum
printf("\nMinimum value is:%d",min);
return 0;
}
Explanation:
Read value of N from command line.Then create an array of size N.Fill the array with random number from -50 to +50.Then find the Maximum of all the elements and assign it to variable "max" and find Minimum from all and assign it to variable "min". then print all the elements of the array, Minimum and Maximum.
Output:
command line argument=10
values of the array are:-18 -18 4 -38 2 6 -42 -20 -6 44 -6 -11 15 -31 1
Maximum value is:44
Minimum value is:-42