Quiz Space

Intro to C Programming Qualifier: 1 September 2024 (May 2024 term)

Question 1

+4 marksOne correct option

Suppose you have two 8-bit binary numbers, A and B, represented as (00010101)2 and (00000110)2, respectively. Perform the subtraction A−B and determine the decimal equivalent of the result.

  1. A

    19

  2. B

    15

  3. C

    21

  4. D

    6

Question 2

+4 marksOne correct option

Consider the following algorithm where number n stored in register R1, and the final result stored in register R2.
1. R1 = n
2. R2 = 1
3. R2 = R2 * R1
4. R1 = R1 - 1
5. If R1 > 0, go to step 3, otherwise go to step 6.
6. Print(R2)
Which of the following statements represents the correct purpose of the given algorithm?

  1. A

    The algorithm calculates the sum of all numbers from 1 to n.

  2. B

    The algorithm calculates the power of 2 raised to n.

  3. C

    The algorithm calculates the nth Fibonacci number.

  4. D

    The algorithm calculates the factorial of the number n.

Question 3

+4 marksOne correct option

Consider the below C program.

c
#include <stdio.h>
int main() {
int n = 10;
int i = 0, j = 1;
while (i < n) {
printf("%d ", i);
i += j;
j++;
}
return 0;
}

What will be the output of the above program?

  1. A

    0 1 2 3 4 5 6 7 8 9

  2. B

    0 1 3 6

  3. C

    0 2 4 8

  4. D

    1 3 6 10

13 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Intro to C Programming Qualifier 1 Sept 2024 paper

The IIT Madras BS Introduction to C Programming (Intro to C Programming) Qualifier paper sat on 1 Sept 2024, in the May 2024 term: 16 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureIntro to C Programming Qualifier 1 Sept 2024 at a glance
TermMay 2024 term
SubjectIntroduction to C Programming
Course codeCS1101
Questions16
Marks50
Duration120 min
MCQ15
MSQ1
Official paperIIT M ES REATTEMPT AN EXAM QEF1 01 Sep 2024
Negative markingNo negative marking.
Updated

Same Qualifier, other subjects

More Intro to C Programming