Classes called child classes or subclasses inherit methods and variables
Answer:
push, pop, top, clear
Explanation:
push: add a new value
pop: remove and return top value
top: return top value without removing
clear: remove all values
Answer:
1. Network standards.
2. Wi-Fi
3. LTE.
4. NIC.
5. HomePNA.
Explanation:
1. Bluetooth, 3G, and WiMAX are examples of network standards.
2. Wireless local area networks (LANs) and public hotspots use Wi-Fi technology to connect to the Internet.
3. LTE is a newer standard for cell network communications. LTE is an acronym for long term evolution.
4. Your computer needs a NIC to access a network. NIC is an acronym for network interface card.
5. HomePNA allows computers to be networked through ordinary telephone wires. HomePNA is the abbreviation for Home Phoneline Networking Association.
Answer:
C++ code for encryption is given below
Explanation:
#include <iostream>
using namespace std;
//functions to encrypt and decrypt
void encrypt(char str[]);
void decrypt(char str[]);
int main(){
char str[200];
bool done = false;
while(!done){
cout << "Enter a string (enter * to stop): ";
cin.getline(str, 200);
if(str[0] == '*' && str[1] == '\0')
done = true;
else{
encrypt(str);
cout << "Encrypted: " << str << endl;
decrypt(str);
cout << "Decrypted: " << str << endl;
}
cout << endl;
}
}
void encrypt(char str[]){
int i = 1;
for(int j = 0; str[j] != '\0'; j++){
str[j] += i;
i++;
if(i == 11)
i = 1;
}
}
void decrypt(char str[]){
int i = 1;
for(int j = 0; str[j] != '\0'; j++){
str[j] -= i;
i++;
if(i == 11)
i = 1;
}
}