Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Overview of C 65
{
if (N == 1)
return result;
else
return( sum (N-1, N + result));
}
void main()
{
int N, total;
printf("\n Enter N");
scanf("%d",&N);
total = sum(N,1);
printf("\n sum =%d", total);
}
Sample output of the program is given below:
1.17.2 Tower of Hanoi
The problem of ‘Tower of Hanoi’, based on a legend of Vietnam, was first described by the mathemati-
cian François Éduoard Anatole Lucas. Later on Henri de Parville also described the same problem based
on an ancient Indian legend. It says that the dome of the Kashi Vishwanth Temple at Banaras marks the
centre of the world. Under the dome there is ‘Tower of Bramah’.
The statement of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582