Answer:
It really depends - in general every data structure has its use.
Explanation:
Furthermore, traversing the list will be inefficient because the data items are not contiguous in memory, forcing the CPU to jump all over the RAM memory causing further slowdown.
<span>C. real-time operating system</span>
CLS
INPUT "Enter the first number"; a
INPUT "Enter the second number"; b
m = a
n = b
WHILE a <> 0
r = b MOD a
b = a
a = r
WEND
l = (m * n) / b
PRINT "HCF is "; b
PRINT "LCM is "; l
Answer:
// here is code in c.
#include <stdio.h>
// main function
int main()
{
// variable to store year
int year;
printf("enter year:");
// read the year
scanf("%d",&year);
// if year>=2101
if(year>=2101)
{
printf("Distant future");
}
//if year in 2001-2100
else if(year>=2001&&year<=2100)
{
printf("21st century");
}
//if year in 19011-2000
else if(year>=1901&&year<=2000)
{
printf("20th century");
}
// if year<=1900
else if(year<=1900)
{
printf("Long ago");
}
return 0;
}
Explanation:
Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".
Output:
enter year:2018
21st century