Skip to content
VUBuddy

CS609 Midterm Current Solved Subjective Set 2 by Junaid

System Programming PDF 1 MBUpdated 23 Oct 2026
Midterm past paper CS609 Midterm Current Solved Subjective Set 2 by Junaid PDF 1 MB
vubuddy.com
Type
Midterm past paper
Course
CS609 System Programming
Size
PDF 1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 9. Download the file for all 9 pages.

1. Write names of setting point

  •  SetFilePointerEx()

2. SetFilePointer () and SetFilePointerEx () Write a Functions

Answer: SetFilePointer() and SetFilePointerEx() functions are used to change file pointer position. For random file access. SetFilePointer() is clumsy to use for 64 bit operations. SetFilePointerEx() can be more readily used for 64 bit operations.

  1. Write 2 root key management
  •  HKEY_CURRENT_USER
  •  HKEY_LOCAL_MACHINE

4. Write names of 5 predefined root key

  •  HKLM
  •  HKCC
  •  HKCR
  •  HKCU
  •  HKU

5. Define purpose of dwShareMode and write 3 values of it

  •  Dwsharemode specifies how the file will be shared.
  •  0 signifies file will not shared
  •  File_Share_read
  •  Allows for file reading
  •  File_Share_Write
  •  Allows for writing

6. How many standard IO devices used in Operating

  •  Input
  •  Output
  •  Error

7. Modify any record randomly and get the total count of records in the file

Answer: #include " Everything.h" #define STRING_SIZE 256 typedef struct _RECORD { /* File record structure */ DWORD referenceCount; /* 0 meands an empty record */ SYSTEMTIME recordCreationTime; SYSTEMTIME recordLastRefernceTime; SYSTEMTIME recordUpdateTime; TCHAR dataString[STRING_SIZE]; } RECORD; typedef struct _HEADER { /* File header descriptor */ DWORD numRecords; DWORD numNonEmptyRecords; } HEADER;

Q8. Write the name of three flags?

Three flags predefined in Windows

  •  HEAP_GENERATE_EXCEPTIONS
  •  HEAP_NO_SERIALIZE
  •  HEAP_CREATE_ENABLE_EXECUTE

9. Predefined Data types name

  •  HEAP_GENERATE_EXCEPTIONS
  •  HEAP_NO_SERIALIZE
  •  HEAP_CREATE_ENABLE_EXECUTE

10. Remove directory code and Create Directory Code

For create directory we will use the following function

BOOL CreateDirectory(LPCTSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes

For remove directory we will use the following function

BOOL RemoveDirectory( LPCSTR lpPathName

11. Return Handler Definition

12. Dynamic structure

  •  Trees
  •  Linked List
  •  Search Table

13. Which code include in Try Block

Answer: The try block lets you test a block of code for errors.

14. Which code include in except Block

Answer: The except block lets you handle the error.

15. Which code include in else Block

Answer: The else block lets you execute code when there is no error.

16. Which code include in finally block

Answer: The finally block lets you execute code, regardless of the result of the tryand except blocks

17. read,write ,create ,delete

  • read function can be replaced by other functions or methods that allow you to read the contents of a file
  • write function can be replaced by functions or methods that allow you to write to a file, such as fwrite() in C,
  • Create function to create a new file, rather than a separate create function.
  • Delete function to delete a file, rather than a separate delete function.

Q18. Which predefined key is used to store user configuration in window directory?

Answer: On Windows, the HKEY_CURRENT_USER (HKCU) registry key is used to store user-specific configuration settings.

19. How many values can be pass to the nSTDhandle. Write their names

  •  STD_INPUT_HANDLE
  •  STD_OUPUT_HANDLE
  •  STD_ERROR_HANDLE
All CS609 files →
CS609 System Programming All CS609 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.