Answer:
b. TRUE
Explanation:
Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.
This is because , assuming a pass by value semantics would require us to copy the value of the istream or ostream object which would be meaningless. In fact these objects don't even have a copy constructor at all. So such objects are always passed by reference.
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:
Library Functions: Library functions are the ones which are predefined functions.
Explanation:
Library Functions must be used along with the appropriate header files .
Header files contains the signature of library functions.
Using these functions it reduces the time of the programmer .
List of some library Functions:(in C Language)
- printf()
- scanf()
- sqrt()
- strcpy()
- strcmp()
Answer:
Antivirus Software
Explanation:
The software that the question is describing is known as an Antivirus Software. Like mentioned, this is a computer program that is used with the main goal of preventing, detecting, and removing malicious files on the computer known as computer viruses. They also act as a shield to prevent these malicious files from entering the computer through the internet, but like any other software these Antivirus Softwares can be exploited by hackers to gain access into a system.
Answer:
The table data is displayed as it is when it is converted into the text. Only the borders of the table get vanished. The data is displayed in the form of rows and columns.
Explanation:
- Microsoft word has a feature that it converts the table into text and vice versa.
- This feature helps as sometimes the table does not attracts much as the text do.
- So for converting the table into text we take following steps:
- Select the entire table.
- Go to Layout tab.
- Locate the Data group.
- Click on "Convert to text"
The table will be converted to simple text.
I hope it will help you!