Data type? Such as int, float or string (called VARCHAR sometimes in a database)
Answer:
#include <iostream>
using namespace std;
class ProblemSolution {
private:
int num1, num2;
public:
ProblemSolution(int n1, int n2) {
num1 = n1;
num2 = n2;
}
int calculateSum() {
int sum = 0;
sum = num1 + num2;
return sum;
}
void printSum() {
// calculateSum will return sum value that will be printed here
cout <<"Sum = "<< calculateSum();
}
~ProblemSolution() {
cout << "\nDestructor is called " << endl;
};
};
int main() {
int a, b;
cout << "Enter a: ";
cin >> a;
cout << "Enter b: ";
cin >> b;
// Initiallizing object pointer of type ProblemSolution
ProblemSolution *objPtr = new ProblemSolution(a,b);
// printing Sum
objPtr->printSum();
// delete objPtr to relaease heap memory :important
delete objPtr;
return 0;
}
Explanation:
we will initialize a pointer "objPtr" and initallize the constructor by passing 2 values a and b followed by the keyword "new". the keyword "new" allocates memory in the heap. we can access class member functions using arrow "->". it is important to delete objPtr at the end of the program so that the heap memory can be freed to avoid memory leakage problems.
Answer:
manipulation
Explanation:
This stuff should not be used at all since use induction through manipulation of consumers thoughts
Answer:
Please explain what you mean by this.
Explanation:
Answer:
c) Trojan horse
Explanation:
A Trojan horse is designed to damage, disrupt, steal, or in general inflict some other harmful action on your data or network. A Trojan acts like a bona fide application or file to trick you. Once installed, a Trojan can perform the action it was designed for.
If a set of instructions to increase a programmer’s pay rate by 10 percent is hidden inside an authorized program and it changes and updates the payroll file, then this instructions called a Trojan horse.
A trap door, also known as a back door, provides a secret or undocumented method of gaining access to an application, operating system or online service.
A virus worm is a malicious, self-replicating program that can spread throughout a network without human assistance