recategorized by
532 views

1 Answer

0 votes
0 votes
this is not in the today's syllabus

instead we can write a c program for computing product of all the elements in a linked List

int calculate(Node *head){

Node *temp = head;

int product = 1;

while(temp!=Null){

product*=temp->data;

temp=temp->next;

}

return product;

}
cheers :)

Related questions

520
views
0 answers
1 votes
go_editor asked Dec 19, 2016
520 views
Consider the following Ada program:Procedure P is BAD-FORMAT: exception Procedure Q is begin ... if S/='b' then raise BAD-FORMAT end if; ... end Q; Procedure ... 2 end P;Under what conditions are the two handler bodies $1$ and $2$ executed?
508
views
0 answers
0 votes
go_editor asked Dec 19, 2016
508 views
Which of the following features are available in Ada?procedures, monitors, packages, common statement, goto statement, generic unit tasks, backtracking, recursion, exceptions, pragmas, classes.
657
views
1 answers
0 votes
go_editor asked Dec 19, 2016
657 views
What is referential transparency?
656
views
0 answers
1 votes
go_editor asked Dec 20, 2016
656 views
The following table gives the cost of transporting one tonne of goods from the origins A, B, C to the destinations F, G, H. Also shown are the ... above, calculate the values of the duals and determine whether this is an optimal solution.