here is my question send me details clearly and i need scree
here is my question send me details clearly and i need screen shots 0f program and output
Lab Assignment #7 (S0/100)-Linked List Build Forward For implement and testing you can use on-line compiler since there is no input file stream https://www.tutorialspoint.com/compile 11 online.php Problem Suppose that we read a list of integers ending with -999. The following function, buildListForward, builds a linked list in a forward manner) and returns the pointer of the built list: Q1: The bulidListForward function to create a linked List structure with the keyboard inputícin>> num). Change this function to receive the values stored in the array from the main functionCuse int type pointer variable) eg, nodeT^pe* Gat *axayP to int\' Size) Q2: Implement main function to call bulidListForward with an array type actual parameter that contains node information 2. 15, 8, 24, 34 Q3: Declare a struct named nodeType which contains two members info and *link; Q4: Inside of the function buildListForward, change while loop to for loop to be able to get node information from the array and put this node information to newNode Q5: At the main function, print out node information by Traversing the Linked List that we have created at the main function and print out node information as follows:Solution
#include <iostream>
#include <string>
//declaring standard namepsace
using namespace std;
//Defining Stucture.
struct nodeType
{
//variables declaration
int infoo;
nodeType *lnk;
};
nodeType* buildListForward()
{
nodeType *frts, *lst, *newNode;
int num;
cout << \"Enter a list of integers ending with -999.\"
<< endl;
cin >> num;
frts = NULL;
while (num != -999)
{
newNode = new nodeType;
newNode->infoo = num;
newNode->lnk = NULL;
if (frts == NULL)
{
frts = newNode;
lst = newNode;
}
else
{
lst->lnk = newNode;
lst = newNode;
}
cin >> num;
}
return frts;
}
//main method for execution
int main()
{
int stpr;
nodeType *crnt, *had;
had = NULL;
//calling function
had = buildListForward();
crnt = had;
cout << \"Output .\"
<< endl;
while (crnt != NULL)
{
cout<< crnt->infoo << \" \";
crnt = crnt->lnk;
}
cin>>stpr;
return 0;
}

