MauryaHub PYQ Practice

Programming in C · End Term · Sep 2025 · AN

Programming in C · End Term · Sep 2025 AN

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

0 / 25 published solutions

Question 2 MCQ · 3.0 marks

Which of the following statements about the do-while loop in C is true?
6406536036525.
The loop body executes at least once regardless of the condition.
6406536036526.
The condition is checked before the loop body executes.
6406536036527.
do-while loops cannot contain nested loops.
6406536036528.
It is identical to a while loop in all cases.

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036529.
2.5
6406536036530.
2.0
6406536036531.
2.00
6406536036532.
Compile error

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 5.0 marks

Which of the following correctly describes the difference between calloc() and malloc() in C?
6406536036533.
malloc() initializes memory with zero, calloc() leaves garbage values.
6406536036534.
calloc() initializes memory with zero, malloc() leaves garbage values.
6406536036535.
Both malloc() and calloc() initialize memory with zero.
6406536036536.
Both malloc() and calloc() leave garbage values.

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 NAT · 4.0 marks

What will be the output of the following program?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 4.0 marks

Which operator has the **highest precedence** from the given below in C?
6406536036538.Source diagram or notation
6406536036539.Source diagram or notation
6406536036540.Source diagram or notation
6406536036541.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MSQ · 4.0 marks

Which of the following are valid ways to declare an array in C?
6406536036542.
int arr[5] = {1,2,3,4,5};
6406536036543.
int arr[] = {10,20,30};
6406536036544.
int arr[3] = {1,2,3,4};
6406536036545.
int arr[5];

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 3.0 marks

Which of the following is a correct statement about pointers in C?
6406536036546.
Pointer stores the value of a variable.
6406536036547.
Pointer stores the address of a variable.
6406536036548.
Pointer stores the memory size of a variable.
6406536036549.
Pointer stores the data type of a variable.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036550.
A C E F
6406536036551.
A D E F
6406536036552.
B D E F
6406536036553.
B C E F

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 5.0 marks

Which of the following keywords can be used to **stop recursion** in C?
6406536036554.
break
6406536036555.
switch
6406536036556.
A base case condition inside if
6406536036557.
continue

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 3.0 marks

What will be the output of the following C program?
Source diagram or notation
6406536036558.
8 2 3 4
6406536036559.
7 2 3 4
6406536036560.
8 1 3 4
6406536036561.
7 2 2 4

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036562.
100
6406536036563.
200
6406536036564.
300
6406536036565.
8

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 NAT · 5.0 marks

What will be the output of the following program?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 4.0 marks

Which storage class makes a variable retain its value across multiple function calls?
6406536036567.
auto
6406536036568.
extern
6406536036569.
static
6406536036570.
register

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MSQ · 5.0 marks

Which of the following statements about structures in C are correct?
6406536036571.
Members can be of different data types.
6406536036572.
Memory allocated is not lesser than the sum of member sizes.
6406536036573.
Structures allow nesting of other structures.
6406536036574.
All members share the same memory location.

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036575.
2 5
6406536036576.
2 7
6406536036577.
1 5
6406536036578.
1 7

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MCQ · 3.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036579.
1
6406536036580.
0
6406536036581.
Compilation Error
6406536036582.
Runtime Error

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MCQ · 4.0 marks

Which function is used to move the file pointer to a specific location?
6406536036583.
fseek()
6406536036584.
ftell()
6406536036585.
rewind()
6406536036586.
fscanf()

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 NAT · 4.0 marks

What will be the output of the following program?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036588.
0 2 4 6 7
6406536036589.
0 2 4 6 8
6406536036590.
0 2 4 5 7
6406536036591.
0 2 4 5 6

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MCQ · 3.0 marks

Which of the following functions is used to dynamically change the size of allocated memory?
6406536036592.
malloc()
6406536036593.
calloc()
6406536036594.
realloc()
6406536036595.
free()

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 4.0 marks

Which of the following statements about macros is **true**?
6406536036596.
Macros are replaced during runtime.
6406536036597.
Macros are handled by the preprocessor.
6406536036598.
Macros can allocate memory dynamically.
6406536036599.
Macros are type-checked by the compiler.

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036600.
16
6406536036601.
7
6406536036602.
12
6406536036603.
10

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 3.0 marks

Which header file must be included to use dynamic memory allocation functions in C?
6406536036604.Source diagram or notation
6406536036605.Source diagram or notation
6406536036606.Source diagram or notation
6406536036607.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 MCQ · 4.0 marks

Which of the following is **not** a valid C preprocessor directive?
6406536036608.
#define
6406536036609.
#include
6406536036610.
#macro
6406536036611.
#ifdef

A published solution is not available for this question yet.

Report a correction for Q25

Question 26 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536036612.
D
6406536036613.
E
6406536036614.
B
6406536036615.
C

A published solution is not available for this question yet.

Report a correction for Q26