node* num1 = new node(9, new node(9, new node(5, new node(9, new node(4, new node(7, NULL))))));
//Title of this code
#include <iostream>
using namespace std;
struct node {
int data;
node* next;
node(int d, node* n): data(d), next(n) {}
};
node* reverse(node* head) {
node* current = head;
node* prev = NULL;
while (current != NULL) {
next = current->next;
current->next = prev;
prev = current;
current = next;
}
return prev;
node* multiply(node* head1, node* head2) {
node* ret = new node(0, NULL);
node* res = ret;
node* curRes = ret;
node* num1 = head1;
cl.exe
995947 * 97489 = 97093877083