Explanation:
The surface of the Cd contains a long Spiral track of data and a drive that shines a laser at the surface of the surface of the CD and can detect the reflective areas and the bumps by the amount of laser light they reflect.
The drive converts the reflection into 1s and 0s to read digital data from the disc. and hence playing what is on the disc
Answer:
<em>This program is written in C++</em>
<em>Comment are used to explain difficult lines</em>
<em>The first program that prints 0 to 20 (in decimal) starts here</em>
#include<iostream>
int main()
{
//Print From 0 to 20
for(int i = 0;i<21;i++)
{
std::cout<<i<<'\n';
}
}
<em>The modified program to print 0 to 20 in hexadecimal starts here</em>
#include<iostream>
using namespace std;
int main()
{
//Declare variables to use in conversion;
int tempvar, i=1,remain;
//Declare a char array of length 50 to hold result
char result[50];
//Print 0
cout<<"0"<<endl;
// Iterate from 1 to 20
for(int digit = 1; digit<21; digit++)
{
//Start Conversion Process
//Initialize tempvar to digit (1 to 20)
tempvar = digit;
while(tempvar!=0)
{
//Divide tempvar by 16 and get remainder
remain = tempvar%16;
if(remain<10)
{
result[i++]=remain + 48;
}
else
{
result[i++] = remain + 55;
}
//Get new value of tempvar by dividing it by 16
tempvar/=16;
}
//Print result
for(int l=i-1;l>0;l--)
{
cout<<result[l];
}
i=1;
cout<<endl;
}
return 0;
}
//The Program Ends Here
See Attachments for program 1 and 2; program 2 is the modified version of 1
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
IsTeenager = ( ( kidAge >= 13 ) && ( kidAge <= 19 ) ) ? true : false;
Another way:
if( ( kidAge >= 13 ) && ( kidAge <= 19 ) )
isTeenager = true;
else
isTeenager = false;
Answer: macro virus
Explanation:
The virus that uses virus uses the language of an application which is vital in recording the sequence of the keystrokes and the instructions in an application, like spreadsheet or the word processing in order to hide virus code is the macro virus.
A macro virus is simply a computer virus which is written in same macro language that is being used for software programs. When a software application is being infected by the macro virus, it leads to a sequence of actions which automatically start when the application is being opened.
You could assign values to variables and break it up into if else-if else statements.
<span>Pseudocode:</span>
if a < b and b < c:
print("increasing")
else if a > b and b > c:
print("decreasing")
else:
print("neither")
Hope this helps.