MauryaHub PYQ Practice

Programming in C · End Term · Sep 2025 · FN

Programming in C · End Term · Sep 2025 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.

0 / 25 published solutions

Question 2 MSQ · 3.0 marks

Which of the following statements are true about the switch statement in C?
6406536048589.
default case is compulsory in every switch.
6406536048590.
Multiple case labels can share the same code block.
6406536048591.
break is optional in a switch case.
6406536048592.
A switch can be written inside another switch.

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
6406536048593.
z = 19
6406536048594.
z = 11
6406536048595.
z = 0
6406536048596.
z = 5

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048597.
1 3 5 7
6406536048598.
1 3 3 5 7
6406536048599.
1 3 5
6406536048600.
1 9 3

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048601.
Inside: a = 7, b = 3 Outside: x = 3, y = 7
6406536048602.
Inside: a = 7, b = 3 Outside: x = 7, y = 3
6406536048603.
Inside: a = 3, b = 7 Outside: x = 7, y = 3
6406536048604.
Inside: a = 3, b = 7 Outside: x = 3, y = 7

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 4.0 marks

Consider the following program.
Source diagram or notation
Assuming each function must complete before its result is used in the next function call, in which sequence are the functions executed?
6406536048605.
main → sub → sub → divi → printf
6406536048606.
main → printf → sub → sub → divi
6406536048607.
main → divi → sub → sub → printf
6406536048608.
main → sub → divi → sub → printf

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MSQ · 3.0 marks

Which of the following is **true** about recursion in C?
6406536048609.
Every recursive function must have a base case.
6406536048610.
Recursive functions are always faster than iterative ones.
6406536048611.
Recursion always leads to infinite calls.
6406536048612.
A recursive function can call itself directly or indirectly.

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 correctly declares and initializes a pointer to a float variable f?
6406536048613.Source diagram or notation
6406536048614.Source diagram or notation
6406536048615.Source diagram or notation
6406536048616.Source diagram or notation

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
6406536048617.
Hello
6406536048618.
World
6406536048619.
o World
6406536048620.
ello World

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 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 Q10

Question 11 MSQ · 5.0 marks

Consider the following program.
Source diagram or notation
If the output is 450, which of the following lines could replace the missing statement?
6406536048622.Source diagram or notation
6406536048623.Source diagram or notation
6406536048624.Source diagram or notation
6406536048625.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 3.0 marks

Which operator is used in C for dynamic memory deallocation?
6406536048626.
free()
6406536048627.
delete
6406536048628.
remove()
6406536048629.
dispose()

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048630.
5
6406536048631.
4
6406536048632.
0
6406536048633.
1

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048634.
20
6406536048635.
30
6406536048636.
99
6406536048637.
Garbage Value

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 are valid storage classes in C?
6406536048638.
auto
6406536048639.
static
6406536048640.
volatile
6406536048641.
extern

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MCQ · 3.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048642.
3
6406536048643.
5
6406536048644.
6
6406536048645.
7

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 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 Q17

Question 18 MCQ · 3.0 marks

Which keyword in C prevents a variable from being modified after initialization?
6406536048647.
restrict
6406536048648.
volatile
6406536048649.
const
6406536048650.
static

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MCQ · 5.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048651.
5 5 5
6406536048652.
5 6 7
6406536048653.
7 7 7
6406536048654.
10 11 11

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048655.
a P
6406536048656.
a r
6406536048657.
a e
6406536048658.
e p

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MSQ · 3.0 marks

Which of the following are valid file handling modes in C?
6406536048659.
"rb"
6406536048660.
"wx"
6406536048661.
"a+"
6406536048662.
"r+"

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 5.0 marks

Consider the following program.
Source diagram or notation
If data.txt is empty before execution, what will be printed?
6406536048663.
Nothing
6406536048664.
H
6406536048665.
e
6406536048666.
Error

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
6406536048667.
B
6406536048668.
A
6406536048669.
F
6406536048670.
0

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 3.0 marks

In macros, which operator is used to substitute the actual argument as a string?
6406536048671.Source diagram or notation
6406536048672.Source diagram or notation
6406536048673.Source diagram or notation
6406536048674.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 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 Q25

Question 26 MCQ · 4.0 marks

What will be the output of the following program?
Source diagram or notation
6406536048676.
5
6406536048677.
4
6406536048678.
20
6406536048679.
Compiler error

A published solution is not available for this question yet.

Report a correction for Q26