You are here:

C/Multiple page output

Advertisement


Question
Hello sir:
I am coding a program which keeps record of all employees of an organization. There is an option to list all employees. Now here is the problem. I have more than 100 employees' entry in the program, that whenever I try to list all the employees, the result is more than a page long and I can only view the employees at the end of the list. Is there a way to make the program wait for the user to hit a key, then go forward to next page? (Ex: we do dir/p in dos to view a page-wise list. I want to do exactly that.)

Regards,
Parixyt

Answer
Sir,

I don't know about multiple pages in C.

But, You have another option for this is to show 5 records at each hit. User will hit a key then it will show 5 records. After hiting it again it will show next 5. This is possible using getch() and flag variable and goto statement.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Kedar Desai

Expertise

You can ask me any questions about C and c++

Experience

I don't have practical experience. But i have knowledge about C as I belong to IT field since last 5 years.

Education/Credentials
I an studying in MCA from Maharashtra (Mumbai University)

©2012 About.com, a part of The New York Times Company. All rights reserved.