MauryaHub PYQ Practice

cs3005_2026T2_ET_FN.pdf

Programming in C · End Term · May 2026 FN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

Question 2 MCQ · 3.0 marks

Which of the following components is primarily responsible for performing arithmetic and logical operations in a computer?
  1. Arithmetic Logic Unit (ALU)
  2. Control Unit
  3. Memory Unit
  4. Input Unit

A published solution is not available for this question yet.

Question 3 MCQ · 3.0 marks

A 4-byte integer **0x89ABCDEF** is stored beginning at memory address **4000** in a **Little-Endian** system. Which value will be stored at address **4002**?
  1. 0x89
  2. 0xAB
  3. 0xCD
  4. 0xEF

A published solution is not available for this question yet.

Question 4 MCQ · 3.0 marks

Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_3_2]] What will be the output?
Source diagram or notation
  1. 16
  2. 24
  3. 32
  4. Garbage value

A published solution is not available for this question yet.

Question 5 MCQ · 3.0 marks

Which of the following statements about **typedef** in C is correct?
  1. It creates a new data type.
  2. It creates an alias (another name) for an existing data type.
  3. It allocates memory for a variable.
  4. It is used only with structures.

A published solution is not available for this question yet.

Question 6 MCQ · 3.0 marks

Which of the following file opening modes allows **reading and writing** while **preserving the** **existing file contents**?
  1. [[IMAGE:2dfb2c68e2bdce5e_3_3]]
    Source diagram or notation
  2. [[IMAGE:2dfb2c68e2bdce5e_3_4]]
    Source diagram or notation
  3. [[IMAGE:2dfb2c68e2bdce5e_4_5]]
    Source diagram or notation
  4. [[IMAGE:2dfb2c68e2bdce5e_4_6]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 7 MCQ · 3.0 marks

Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_4_7]] What will be the output?
Source diagram or notation
  1. 24
  2. 14
  3. 16
  4. 12

A published solution is not available for this question yet.

Question 8 NAT · 4.0 marks

Consider the following computation steps. [[IMAGE:2dfb2c68e2bdce5e_5_8]] What is the final value stored in **R[3]**?
Source diagram or notation

    A published solution is not available for this question yet.

    Question 9 NAT · 4.0 marks

    Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_5_9]] (ASCII value of **'B'** is **66**.) What will be the output?
    Source diagram or notation

      A published solution is not available for this question yet.

      Question 10 NAT · 4.0 marks

      Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_6_10]] What will be the output?
      Source diagram or notation

        A published solution is not available for this question yet.

        Question 11 MCQ · 5.0 marks

        Consider the following generalized memory computations. [[IMAGE:2dfb2c68e2bdce5e_7_11]] What is the final value stored in **M[3]**?
        Source diagram or notation
        1. 12
        2. 18
        3. 14
        4. 21

        A published solution is not available for this question yet.

        Question 12 MCQ · 5.0 marks

        The decimal equivalent of the following **8-bit signed two's complement** number is [[IMAGE:2dfb2c68e2bdce5e_7_12]]
        Source diagram or notation
        1. -14
        2. -16
        3. -18
        4. 242

        A published solution is not available for this question yet.

        Question 13 MCQ · 5.0 marks

        Consider the following C code. [[IMAGE:2dfb2c68e2bdce5e_8_13]] What will be the output?
        Source diagram or notation
        1. 4
        2. 5
        3. 6
        4. 7

        A published solution is not available for this question yet.

        Question 14 MCQ · 5.0 marks

        Consider the following recursive function. [[IMAGE:2dfb2c68e2bdce5e_9_14]] What will be the output?
        Source diagram or notation
        1. 12
        2. 16
        3. 20
        4. 28

        A published solution is not available for this question yet.

        Question 15 MCQ · 5.0 marks

        Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_10_15]] What will be the output?
        Source diagram or notation
        1. A
        2. G
        3. U
        4. E

        A published solution is not available for this question yet.

        Question 16 MCQ · 5.0 marks

        Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_10_16]] What will be the output?
        Source diagram or notation
        1. 6
        2. 8
        3. 10
        4. 14

        A published solution is not available for this question yet.

        Question 17 MCQ · 4.0 marks

        Which stage of the C compilation process is responsible for expanding macros and processing header files?
        1. Linking
        2. Loading
        3. Preprocessing
        4. Execution

        A published solution is not available for this question yet.

        Question 18 MCQ · 4.0 marks

        Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_11_17]] What will be the output?
        Source diagram or notation
        1. 10 15
        2. 15 20
        3. 15 15
        4. 20 20

        A published solution is not available for this question yet.

        Question 19 MCQ · 4.0 marks

        Which preprocessor directive is used to include the contents of another source or header file into the current program?
        1. [[IMAGE:2dfb2c68e2bdce5e_12_18]]
          Source diagram or notation
        2. [[IMAGE:2dfb2c68e2bdce5e_12_19]]
          Source diagram or notation
        3. [[IMAGE:2dfb2c68e2bdce5e_12_20]]
          Source diagram or notation
        4. [[IMAGE:2dfb2c68e2bdce5e_12_21]]
          Source diagram or notation

        A published solution is not available for this question yet.

        Question 20 MCQ · 4.0 marks

        Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_12_22]] What will be the output?
        Source diagram or notation
        1. 5
        2. 8
        3. 13
        4. Compilation Error

        A published solution is not available for this question yet.

        Question 21 MSQ · 3.0 marks

        Which of the following statements are correct regarding **character encoding**?
        1. ASCII uses 7 bits.
        2. UTF-8 is backward compatible with ASCII.
        3. Every UTF-8 character occupies exactly 8 bits.
        4. Unicode supports a much larger character set than ASCII.

        A published solution is not available for this question yet.

        Question 22 NAT · 5.0 marks

        Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_14_23]] What will be the output printed on the screen?
        Source diagram or notation

          A published solution is not available for this question yet.

          Question 23 NAT · 5.0 marks

          Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_15_24]] What will be the output?
          Source diagram or notation

            A published solution is not available for this question yet.

            Question 24 NAT · 3.0 marks

            Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_16_25]] What will be the output?
            Source diagram or notation

              A published solution is not available for this question yet.

              Question 25 NAT · 3.0 marks

              Consider the following C program. [[IMAGE:2dfb2c68e2bdce5e_17_26]] What will be the output?
              Source diagram or notation

                A published solution is not available for this question yet.

                Question 26 MSQ · 5.0 marks

                Which of the following statements about pointers are correct?
                1. A pointer variable stores the address of another variable.
                2. Pointer arithmetic depends on the data type of the pointer.
                3. Dereferencing a NULL pointer is safe.
                4. Two pointers can point to the same memory location.

                A published solution is not available for this question yet.