Answer: (a) sort()
Explanation:
Using sort() the keys are not preserved. However it sorts the array.
example : sort($array);
<u>The possible consequences of intentional virus setting:</u>
Virus is nothing but desktop or laptop or tablet OS has to do certain process as on its own which diverse other to different process such us stealing the data from desktop or laptop or tablet and making slow the performance of desktop and laptop and tablet.
To avoid or protect the computer there are two type of antivirus.
- On desktop or tablet or laptop. (It is called resident firewall).
- Internet gateway. (It is called firewall)
So company create virus and to rectify they make money of that process.
To protect our desktop or laptop or tablet from virus we are protected with law. In case due to virus attacked our laptop or desktop or tablet Is effected we can fine the or sent to jail by law.
Answer:
#include<stdio.h>
//declare a named constant
#define MAX 50
int main()
{
//declare the array
int a[MAX],i;
//for loop to access the elements from user
for(i=0;i<MAX;i++)
{
printf("\n Enter a number to a[%d]",i+1);
scanf("%d",&a[i]);
}
//display the input elements
printf("\n The array elements are :");
for(i=0;i<=MAX;i++)
printf(" %d ",a[i]);
}
Explanation:
PSEUDOCODE INPUTARRAY(A[MAX])
REPEAT FOR I EQUALS TO 1 TO MAX
PRINT “Enter a number to A[I]”
READ A[I]
[END OF LOOP]
REPEAT FOR I EQUALS TO 1 TO MAX
PRINT A[I]
[END OF LOOP]
RETURN
ALGORITHM
ALGORITHM PRINTARRAY(A[MAX])
REPEAT FOR I<=1 TO MAX
PRINT “Enter a number”
INPUT A[I]
[END OF LOOP]
REPEAT FOR I<=1 TO MAX
PRINT A[I]
[END OF LOOP]
Answer:
C)An error message is issued.
Explanation:
If we try to open a file for reading when that file does not exist, we will get an error message.
For example, in Java we will encounter a FileNotFoundException as in the code below:
try {
FileInputStream fis = new FileInputStream("myFile.txt");
DataInputStream dis = new DataInputStream(fis);
BufferedReader br = new BufferedReader(new InputStreamReader(dis));
String str = null;
while ((str = br.readLine()) != null) {
System.err.println(str);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
If the file myFile.txt does not exist we can expect to see an exception stack trace corresponding to FileNotFoundException.