Writing Programming Codes and Code Compilation Errors (Other (Not Listed) Sample)
Q1. The following code causes some compilation errors. Find them and correct them.
What is the corrected program output when executed with ./debug2 ?
Q2 .Write a program that prints its own (executable) file size in bytes and in number of printable characters (a character char c is printable if (isalnum(c) > 0 || ispunct(c) > 0 || isspace(c) > 0)).
Q3. Write a program that prints the name of the image files referenced in the the web page http://www.enseignement.polytechnique.fr/index.html. Image files are referenced in HTML both by the attribute HREF of the tag A (e.g. ) and by the attribute SRC of the tag IMG (e.g. ). The output should be as follows.
Programming
Subjective
SUBMITTED TO:
topwriters
SUBMITTED BY:
Q1. The following code causes some compilation errors. Find them and correct them.
Answers
#include
class A {
public:
A() {
std::cout << "constructing object of class A" << std::endl;
}
~A() {
std::cout << "destroying object of class A" << std::endl;
}
void setDatum(int i) {
theDatum = i;
}
int getDatum(void) {
return theDatum;
Other Topics:
- Kohler Cimarron Toilet Reviews Research Assignment Description: Comfort Height; feature offers chair-height seating that makes sitting down and standing up easier for most adults....3 pages/≈825 words| 1 Source | Other | Technology | Other (Not Listed) |
- Python Coding, Running Programming Assignment PaperDescription: NAMES = ['Adam', 'Betty', 'Charlie', 'Debbie', 'Elaine', 'Frank' 'George','Harry', 'Igor', 'Jack', 'Kevin', 'Larry', 'Moe', 'Nancy', 'Ophelia', 'Phil', 'Quentin']...3 pages/≈825 words| No Sources | Other | Technology | Other (Not Listed) |
- Programming: Finding Errors in CodesDescription: Q1. The following code causes some compilation errors. Find them and correct them. Answers #include class A { public: A() { std::cout << "constructing object of class A" << std::endl; } ~A() { std::cout << "destroying object of class A" << std::endl; } void setDatum(int i) { theDatum = i; } int...5 pages/≈1375 words| No Sources | Other | Technology | Other (Not Listed) |