Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
472 Programming and Data Structures
{
i f (sim [j] =»o)
{
f *1 ;
p rin tf ( a\n Found ! Po sitio n o f in teger %d i i %d " , n ,j+ l ) ;
jtr^ajci
}
i f (£a-lO)
p rin tf ( a\n Il«o a n t not found !•);
Q1JTEIHQ
Enter 9even Integers: 2 4 23 45 67 56 89
Enter Integer to Search: 67
Found ! Position of integer £7 is 5
Explanation In the above program an array sim [7] is declaed and it stores seven integers, which
are entered by the programmer. Followed by this, an element is entered to search in the list. This is
done by the for loop and the embedded if statement. The i f () statement checks the entered element
with the list el ...
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

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343