Check whether the following program has any mistake. If yes, point out the mistakes and correct them; if no, predict the output of the program. #include #include int main() { RECT aRect = { 0, 0, 100, 100 }; RECT* pRect = &aRect; pRect.top += 10; std::cout << pRect.top; }
  • Determine whether the following code has syntax erros or not. If it is correct, predict its output. If it is incorrect, point out the mistake(s). #include using std::cout; class CNode { public: int data; CNode* next; CNode(int n, CNode* p); }; int main() { CNode c(3, NULL); CNode b(2, &c); CNode a(1, &b); CNode* p = &a; while (p != NULL) { cout << a.data << "\n"; p = p->next; } } CNode::CNode(int n, CNode* p) { data = n; next = p; }