Quiz Space

Intro to C Programming End Term: 24 December 2023, Set AEF3 (September 2023 term)

Question 1

+4 marksOne correct option

Consider the below C program.

c
#include <stdio.h>
int a = 10;
int main()
{
int a = 30;
{
printf("Value of a is %d", a);
}
printf("\nValue of a is %d", a);
return 0;
}

Which of the following is the correct output for the above program?

  1. A

    Value of a is 30
    Value of a is 30

  2. B

    Value of a is 30
    Value of a is 10

  3. C

    Value of a is 10
    Value of a is 10

  4. D

    Value of a is 10
    Value of a is 30

Question 2

+4 marksOne correct option

Consider the below C program.

c
#include <stdio.h>
int main()
{
int a = 3;
switch(a++)
{
case 1: a = a + 20;
case 2: a = a - 3;
case 3: a = a * 4;
case 4: a = a / 2;
default: a = a * a;
}
printf("%d", a);
}

What will be the output of the above C program?

  1. A

    12

  2. B

    2

  3. C

    16

  4. D

    1

  5. E

    64

Question 3

+4 marksOne correct option

Consider the below C program.

c
#include <stdio.h>
void compute (int a, int b)
{
a = a + 5;
b = b - 2;
}
int main()
{
int a = 234, b = 316;
compute(a, b);
printf("%d %d", a, b);
return 0;
}

What will be the output of the above C program?

  1. A

    Compile Time Error

  2. B

    239 314

  3. C

    234 316

  4. D

    239 316

  5. E

    234 314

22 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 End Term 24 Dec 2023 Set AEF3 paper

The IIT Madras BS Introduction to C Programming (Intro to C Programming) End Term paper sat on 24 Dec 2023, in the September 2023 term, set AEF3: 25 questions for 100 marks in 180 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 End Term 24 Dec 2023 Set AEF3 at a glance
TermSeptember 2023 term
SubjectIntroduction to C Programming
Course codeCS1101
Questions25
Marks100
Duration180 min
MCQ17
MSQ6
Numerical2
Official paperIIT M ES FOUNDATION FN EXAM FEF1 24 Dec 2023
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More Intro to C Programming