joy1 Posted February 7, 2012 Posted February 7, 2012 where fixed length and variable length record uses?give an example using file name...
immortal Posted February 7, 2012 Posted February 7, 2012 (edited) In fixed length records one should use padding for empty or non-filled spaces. For example :- 18|Alice|21|F|Student*******************$ 19|John|26|M|Professor*****************$ In variable length records padding is not required. Alice|21|F|Student# John|26|M|Professor# Variable records are used when you're not aware of the size of the individual data fields or variables or if you want dynamic allocation of memory at run time so that it allocates as much memory as it is required avoiding unnecessary allocation of memory resources and for fixed length records it is used when you very well know the size of the individual fields or variables. Edited February 7, 2012 by immortal
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now