CS609 CURRENT MIDTERM SOLVED SUBJECTIVE By JUNAID.pdf

Verified academic study resource for CS609 (System Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS609 – System Programming
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
SUBJECTIVE, SOLVED, CURRENT, MIDTERM

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS609.

What this file covers — CS609 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download CS609 CURRENT MIDTERM SOLVED SUBJECTIVE By JUNAID.pdf for free?

You can preview and download "CS609 CURRENT MIDTERM SOLVED SUBJECTIVE By JUNAID.pdf" (CS609 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs609-current-midterm-solved-subjective-by-junaid-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS609 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS609 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS609 solved past papers and handouts verified for 2026 exams?

Yes. All CS609 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                               CS609- SYSTEM
                               PROGRAMMING
                           (SOLVED Current Subjective)
                            FROM MIDTERM PAPERS

BC190202640@vu.edu.pk     For More Visit: vulmshelp.com
Junaidfazal08@gmail.com
                                                          JUNAID MALIK
                                                          (0304-1659294)

AL-JUNAID TECH INSTITUT
1. Write names of setting point
   Answer:
       SetFilePointer()
       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.
3. Write 2 root key management
       HKEY_CURRENT_USER
       HKEY_LOCAL_MACHINE
4. Write names of 5 predefined root key
   Answer:
       HKLM
       HKCC
       HKCR
       HKCU
       HKU
5. Define purpose of dwShareMode and write 3 values of it
   Answer:
       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
   Answer:
       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 */

AL-JUNAID TECH INSTITUT
    SYSTEMTIME recordCreationTime;
    SYSTEMTIME recordLastRefernceTime;
    SYSTEMTIME recordUpdateTime;
    TCHAR dataString[STRING_SIZE];
    } RECORD;
    typedef struct _HEADER { /* File header descriptor */
    DWORD numRecords;
    DWORD numNonEmptyRecords;
    } HEADER;
8. Write the name of three flags?
    Answer:
    Three flags predefined in Windows
        HEAP_GENERATE_EXCEPTIONS
        HEAP_NO_SERIALIZE
        HEAP_CREATE_ENABLE_EXECUTE
9. Predefined Data types name
    Answer:
        HEAP_GENERATE_EXCEPTIONS
        HEAP_NO_SERIALIZE
        HEAP_CREATE_ENABLE_EXECUTE
10. Remove directory code and Create Directory Code
    Answer:
    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
    Answer:

12. Dynamic structure
    Answer:
       Trees
       Linked List
       Search Table

AL-JUNAID TECH INSTITUT
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 try- and
    except blocks
17. read,write ,create ,delete
    Answer:
        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.

18. 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
    Answer:
         STD_INPUT_HANDLE
         STD_OUPUT_HANDLE
         STD_ERROR_HANDLE
20. find GetLastError in code
    Answer:

AL-JUNAID TECH INSTITUT
   The GetLastError() function is a Windows API function that is used to retrieve the
   last error code that occurred in the calling thread. This function is typically used to
   troubleshoot errors that occur in your application, and can be used in conjunction
   with the FormatMessage() function to retrieve a more meaningful error message.
   Here's an example of how to use GetLastError() in C++:
   #include <system_error>

   if (!SomeWin32Function()){
      DWORD error = ::GetLastError();
      std::string message = std::system_category().message(error);
      ...
   }

21. utility of registry
    Answer:
    The Windows Registry is a hierarchical database that stores configuration settings
    and options for the Windows operating system and applications, allowing
    centralized, persistent, easy to access, and customizable configurations.
22. Heap APIs.
    Answer:
    Heap APIs such as malloc(), free(), new, and delete allow dynamic memory
    management during runtime in C/C++.
23. move mode of SetFilePointer.
    Answer:
    SetFilePointer()
    DWORD SetFilePointer(
    HANDLE hFile,
    LONG lDistanceToMove, // for 32-bit file
    PLONG lpDistanceToMoveHigh, // pointer to a long for NTFS
    DWORD dwMoveMethod
    );

24. what api is used to alloc size of block in heap? Write signature.
    Answer:
    SIZE_T HeapSize()

25. Return type of createfile()
    Answer:
    It’s Return Type is
         HANDLE

AL-JUNAID TECH INSTITUT
26. Define the purpose of dwCtrlType identifies the signal and its values can be?
    Answer:
        CTRL_C_EVENT: Indicates that a Ctrl-C sequence was entered through
          keyboards.
        CTRL_CLOSE_EVENT: Indicates that the console window is being
          closed.
        CTRL_BREAK_EVENT: Indicates Ctrl-Break sequence.

More CS609 files

All CS609 files · Midterm Prep 2026 · MCQs Bank