uiz Space

May 2026 term · Programming in C · BSCS3005

Programming in C End Term: 13 September 2026 (May 2026 term)

The IIT Madras BS Programming in C (Programming in C) End Term paper sat on 13 Sept 2026, in the May 2026 term: 25 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
25
Marks
100
Duration
180 min
MCQ
16
Numerical
7
MSQ
2

Updated

Official paper: Programming in C 13 Sep 26 · No negative marking.

Question 1

+3 marksOne correct option

Which of the following components is primarily responsible for performing arithmetic and logical operations in a computer?

  1. A

    Arithmetic Logic Unit (ALU)

  2. B

    Control Unit

  3. C

    Memory Unit

  4. D

    Input Unit

Show answer

Correct answer

  • A

    Arithmetic Logic Unit (ALU)

Question 2

+3 marksOne correct option

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. A

    0x89

  2. B

    0xAB

  3. C

    0xCD

  4. D

    0xEF

Show answer

Correct answer

  • B

    0xAB

Question 3

+3 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    16

  2. B

    24

  3. C

    32

  4. D

    Garbage value

Show answer

Correct answer

  • C

    32

Question 4

+3 marksOne correct option

Which of the following statements about typedef in C is correct?

  1. A

    It creates a new data type.

  2. B

    It creates an alias (another name) for an existing data type.

  3. C

    It allocates memory for a variable.

  4. D

    It is used only with structures.

Show answer

Correct answer

  • B

    It creates an alias (another name) for an existing data type.

Question 5

+3 marksOne correct option

Which of the following file opening modes allows reading and writing while preserving the existing file contents?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 6

+3 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    24

  2. B

    14

  3. C

    16

  4. D

    12

Show answer

Correct answer

  • C

    16

Question 7

+4 marksNumerical answer

Consider the following computation steps.

What is the final value stored in R[3]?

Show answer

Correct answer: 36

Question 8

+4 marksNumerical answer

Consider the following C program.

(ASCII value of 'B' is 66.) What will be the output?

Show answer

Correct answer: 84

Question 9

+4 marksNumerical answer

Consider the following C program.

What will be the output?

Show answer

Correct answer: 15

Question 10

+5 marksOne correct option

Consider the following generalized memory computations.

What is the final value stored in M[3]?

  1. A

    12

  2. B

    18

  3. C

    14

  4. D

    21

Show answer

Correct answer

  • C

    14

Question 11

+5 marksOne correct option

The decimal equivalent of the following 8-bit signed two's complement number is

  1. A

    -14

  2. B

    -16

  3. C

    -18

  4. D

    242

Show answer

Correct answer

  • A

    -14

Question 12

+5 marksOne correct option

Consider the following C code.

What will be the output?

  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • B

    5

Question 13

+5 marksOne correct option

Consider the following recursive function.

What will be the output?

  1. A

    12

  2. B

    16

  3. C

    20

  4. D

    28

Show answer

Correct answer

  • B

    16

Question 14

+5 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    A

  2. B

    G

  3. C

    U

  4. D

    E

Show answer

Correct answer

  • A

    A

Question 15

+5 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    6

  2. B

    8

  3. C

    10

  4. D

    14

Show answer

Correct answer

  • B

    8

Question 16

+4 marksOne correct option

Which stage of the C compilation process is responsible for expanding macros and processing header files?

  1. A

    Linking

  2. B

    Loading

  3. C

    Preprocessing

  4. D

    Execution

Show answer

Correct answer

  • C

    Preprocessing

Question 17

+4 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    10 15

  2. B

    15 20

  3. C

    15 15

  4. D

    20 20

Show answer

Correct answer

  • C

    15 15

Question 18

+4 marksOne correct option

Which preprocessor directive is used to include the contents of another source or header file into the current program?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 19

+4 marksOne correct option

Consider the following C program.

What will be the output?

  1. A

    5

  2. B

    8

  3. C

    13

  4. D

    Compilation Error

Show answer

Correct answer

  • B

    8

Question 20

+3 marksOne or more correct options

Which of the following statements are correct regarding character encoding?

Select all that apply.

  1. A

    ASCII uses 7 bits.

  2. B

    UTF-8 is backward compatible with ASCII.

  3. C

    Every UTF-8 character occupies exactly 8 bits.

  4. D

    Unicode supports a much larger character set than ASCII.

Show answer

Correct answers

  • A

    ASCII uses 7 bits.

  • B

    UTF-8 is backward compatible with ASCII.

  • D

    Unicode supports a much larger character set than ASCII.

Question 21

+5 marksNumerical answer

Consider the following C program.

What will be the output printed on the screen?

Show answer

Correct answer: 27

Question 22

+5 marksNumerical answer

Consider the following C program.

What will be the output?

Show answer

Correct answer: 16

Question 23

+3 marksNumerical answer

Consider the following C program.

What will be the output?

Show answer

Correct answer: 17

Question 24

+3 marksNumerical answer

Consider the following C program.

What will be the output?

Show answer

Correct answer: 48

Question 25

+5 marksOne or more correct options

Which of the following statements about pointers are correct?

Select all that apply.

  1. A

    A pointer variable stores the address of another variable.

  2. B

    Pointer arithmetic depends on the data type of the pointer.

  3. C

    Dereferencing a NULL pointer is safe.

  4. D

    Two pointers can point to the same memory location.

Show answer

Correct answers

  • A

    A pointer variable stores the address of another variable.

  • B

    Pointer arithmetic depends on the data type of the pointer.

  • D

    Two pointers can point to the same memory location.