MauryaHub PYQ Practice

Programming in C · End Term · May 2024 · AN

Programming in C · End Term · May 2024 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 / 26 published solutions

Question 120 MCQ · 2.0 marks

Source diagram or notation
6406533044565.
3 × 2
6406533044566.
3 × 4
6406533044567.
4 × 3
6406533044568.
2 × 4       **Programming in C** **Section Id :** 64065364134 **Section Number :** 6 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 26 **Number of Questions to be attempted :** 26 **Section Marks :** 100 **Display Number Panel :** Yes **Section Negative Marks :** 0 **Group All Questions :** No **Enable Mark as Answered Mark for Review and** No **Clear Response :** **Maximum Instruction Time :** 0

A published solution is not available for this question yet.

Report a correction for Q120

Question 122 MSQ · 3.0 marks

Which of the following statements is/are true about the switch statement in C?
6406533044596.
The break statement is compulsory to use with switch statement.
6406533044597.
The default statement is compulsory to use with switch statement.
6406533044598.
The default statement is optional with switch statement.
6406533044599.
Multiple case labels can be used with switch statement.

A published solution is not available for this question yet.

Report a correction for Q122

Question 123 MSQ · 3.0 marks

Source diagram or notation
6406533044616.Source diagram or notation
6406533044617.Source diagram or notation
6406533044618.Source diagram or notation
6406533044619.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q123

Question 124 MCQ · 3.0 marks

Which of the following statements correctly declares a pointer variable ptr to hold the address of a character variable ch in C and assigns the address of ch to ptr?
6406533044620.
char *ptr; ptr = &ch;
6406533044621.
char *ptr; ptr = *ch;
6406533044622.
char ptr; ptr = &ch;
6406533044623.
char ptr; ptr = *ch;

A published solution is not available for this question yet.

Report a correction for Q124

Question 125 MCQ · 3.0 marks

Which of the following functions is used in C to allocate memory dynamically during runtime?
6406533044632.Source diagram or notation
6406533044633.Source diagram or notation
6406533044634.Source diagram or notation
6406533044635.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q125

Question 126 MCQ · 3.0 marks

Which of the following statement is true about structures and unions in C regarding memory allocation?
6406533044644.
Structures allocate memory based on the sum of all member sizes.
6406533044645.
Unions allocate memory based on the sum of all member sizes.
6406533044646.
Memory is shared between members in the structures.
6406533044647.
Unions and structures allocate memory in the same way.

A published solution is not available for this question yet.

Report a correction for Q126

Question 127 MCQ · 3.0 marks

Which memory region in C programming is used for storing dynamically allocated memory?
6406533044661.
Heap memory
6406533044662.
Stack memory
6406533044663.
Pointer Segment
6406533044664.
Data segment

A published solution is not available for this question yet.

Report a correction for Q127

Question 128 MCQ · 3.0 marks

Which function is used to read data from a file in C programming?
6406533044669.
fread()
6406533044670.
fget()
6406533044671.
read()
6406533044672.
get()

A published solution is not available for this question yet.

Report a correction for Q128

Question 129 MCQ · 3.0 marks

In C preprocessor directives, what does the # operator do when used in macro definitions?
6406533044681.
Excludes a token
6406533044682.
Concatenates two tokens
6406533044683.
Multiplies two tokens
6406533044684.
Converts a token to a string

A published solution is not available for this question yet.

Report a correction for Q129

Question 130 MCQ · 4.0 marks

Consider the below C program
Source diagram or notation
What will be the output of the above C program?
6406533044600.
Value of c: 22
6406533044601.
Value of c: 150
6406533044602.
Value of c: 0
6406533044603.
Value of c: 0.33

A published solution is not available for this question yet.

Report a correction for Q130

Question 131 MCQ · 4.0 marks

What is the order in which the functions are called in the following C program?
Source diagram or notation
6406533044612.
main → printf → area → square
6406533044613.
main → area → printf → square
6406533044614.
main → area → square → printf
6406533044615.
main → square → area → printf

A published solution is not available for this question yet.

Report a correction for Q131

Question 132 MCQ · 4.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of the above C program?
6406533044624.
Hello
6406533044625.
Hello World
6406533044626.
llo World
6406533044627.
o World

A published solution is not available for this question yet.

Report a correction for Q132

Question 133 MCQ · 4.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of the above C program?
6406533044636.
d
6406533044637.
e
6406533044638.
f
6406533044639.
g

A published solution is not available for this question yet.

Report a correction for Q133

Question 134 MCQ · 4.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of the above C program?
6406533044652.
5
6406533044653.
6
6406533044654.
7
6406533044655.
8

A published solution is not available for this question yet.

Report a correction for Q134

Question 135 MCQ · 4.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?
6406533044677.
0
6406533044678.
1
6406533044679.
2
6406533044680.
4

A published solution is not available for this question yet.

Report a correction for Q135

Question 136 MCQ · 4.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?
6406533044686.
10
6406533044687.
20
6406533044688.
30
6406533044689.
Compilation error

A published solution is not available for this question yet.

Report a correction for Q136

Question 137 MCQ · 5.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?
6406533044604.
3 6 9 12 12
6406533044605.
3 6 9 12
6406533044606.
3 6 12 12
6406533044607.
6 9 12 12

A published solution is not available for this question yet.

Report a correction for Q137

Question 138 MCQ · 5.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of the above C program?
6406533044608.
a = 5, b = 10 a = 6, b = 11
6406533044609.
a = 6, b = 11 a = 6, b = 11
6406533044610.
a = 5, b = 10 a = 5, b = 10
6406533044611.
a = 6, b = 11 a = 5, b = 10

A published solution is not available for this question yet.

Report a correction for Q138

Question 139 MCQ · 5.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?
6406533044628.
5 6 -> 6 5 -> 5 6 -> 5 6 -> 5 6
6406533044629.
5 6 -> 6 5 -> 6 5 -> 5 6 -> 6 5
6406533044630.
5 6 -> 6 5 -> 6 5 -> 5 6 -> 5 6
6406533044631.
5 6 -> 6 5 -> 5 6 -> 5 6 -> 6 5

A published solution is not available for this question yet.

Report a correction for Q139

Question 140 MCQ · 5.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?
6406533044640.
1 2 3
6406533044641.
0 1 2
6406533044642.
5 4 3
6406533044643.
2 3 4

A published solution is not available for this question yet.

Report a correction for Q140

Question 141 MCQ · 5.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of the above C program?
6406533044665.
Function called 1 times Function called 1 times Function called 1 times
6406533044666.
Function called 1 times Function called 2 times Function called 3 times
6406533044667.
Function called 1 times Function called 1 times Function called 2 times
6406533044668.
some_garbage_value some_garbage_value some_garbage_value

A published solution is not available for this question yet.

Report a correction for Q141

Question 142 MCQ · 5.0 marks

Consider the following C program.
Source diagram or notation
What will the output of the above code?
6406533044673.
6
6406533044674.
10
6406533044675.
15
6406533044676.
21

A published solution is not available for this question yet.

Report a correction for Q142

Question 143 MSQ · 4.0 marks

Select the correct statements from the below that dynamically allocate memory to hold a maximum of 4 integers. Assume the size of int is 4 bytes.
6406533044657.
int* a = (int*)malloc(16);
6406533044658.
int* a = (int*)malloc(4);
6406533044659.
int* a = (int*)malloc(4*sizeof(int));
6406533044660.
int* a = (int*)malloc(4*sizeof(int*));

A published solution is not available for this question yet.

Report a correction for Q143

Question 144 MSQ · 5.0 marks

Consider the following C program.
Source diagram or notation
If the output of the above program is 15, then select **all** the options that can replace the missing statement line in the above code.
6406533044648.Source diagram or notation
6406533044649.Source diagram or notation
6406533044650.Source diagram or notation
6406533044651.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q144

Question 145 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q145

Question 146 NAT · 5.0 marks

Consider the following C program.
Source diagram or notation
What will be the output of the above program?

A published solution is not available for this question yet.

Report a correction for Q146