Home / Study library / Programming in C / End Term · May 2024 Programming in C · End Term · May 2024 · FN
Programming in C · End Term · May 2024 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 / 27 published solutions
Q134 Q136 Q137 Q138 Q139 Q140 Q141 Q142 Q143 Q144 Q145 Q146 Q147 Q148 Q149 Q150 Q151 Q152 Q153 Q154 Q155 Q156 Q157 Q158 Q159 Q160 Q162
Question 134 NAT · 3.0 marks A discrete distribution pdf, f(D), defined as
A published solution is not available for this question yet.
Report a correction for Q134
Question 136 MSQ · 3.0 marks Which of the following statements is/are true about the if statement in C?
6406533052477. else if is compulsory to use with if statement.
6406533052478. else is compulsory to use with if statement.
6406533052479. else or else if is optional with if statement.
6406533052480. Multiple else if are allowed with if statement.
A published solution is not available for this question yet.
Report a correction for Q136
Question 137 MCQ · 3.0 marks Which of the following statements accurately describes the base case in a recursive function in C?
6406533052497. The base case is the first statement executed within the function.
6406533052498. The base case is a condition that triggers an infinite call within the function.
6406533052499. The base case is the condition that ensures the recursive function terminates.
6406533052500. The base case is the condition when the function calls itself.
A published solution is not available for this question yet.
Report a correction for Q137
Question 138 MCQ · 3.0 marks Which of the following statements correctly initializes a pointer variable ptr to hold the address of
another integer variable var in C?
6406533052501. 6406533052502. 6406533052503. 6406533052504. A published solution is not available for this question yet.
Report a correction for Q138
Question 139 MCQ · 3.0 marks What character marks the end of a string in C?
6406533052513. ‘*’ (asterisk)
6406533052514. ‘$’ (dollar sign)
6406533052515. ‘\0’ (null terminator)
6406533052516. ‘#’ (hash sign)
A published solution is not available for this question yet.
Report a correction for Q139
Question 140 MCQ · 3.0 marks Which of the following statement is true about structures and unions in C regarding memory
allocation?
6406533052525. Structures allocate memory based on the sum of all member sizes.
6406533052526. Unions allocate memory based on the sum of all member sizes.
6406533052527. Memory is shared between members in the structures.
6406533052528. Unions and structures allocate memory in the same way.
A published solution is not available for this question yet.
Report a correction for Q140
Question 141 MCQ · 3.0 marks Which memory region in C programming is used for storing local variables and function
parameters?
6406533052542. Heap memory
6406533052543. Stack memory
6406533052544. Code segment
6406533052545. Global memory
A published solution is not available for this question yet.
Report a correction for Q141
Question 142 MCQ · 3.0 marks Which function is used to write data to a file in C programming?
A published solution is not available for this question yet.
Report a correction for Q142
Question 143 MCQ · 3.0 marks In C preprocessor directives, what does the ## operator do when used in macro definitions?
6406533052562. Excludes a token
6406533052563. Compares two tokens
6406533052564. Concatenates two tokens
6406533052565. Multiplies two tokens
A published solution is not available for this question yet.
Report a correction for Q143
Question 144 MCQ · 4.0 marks 6406533052481. Value of c: 200
6406533052482. Value of c: 31
6406533052483. Value of c: -1
6406533052484. Value of c: 170
A published solution is not available for this question yet.
Report a correction for Q144
Question 145 MCQ · 4.0 marks 6406533052493. main → sum → sum → prod → printf
6406533052494. main → printf → sum → sum → prod
6406533052495. main → printf → prod → sum → sum
6406533052496. main → prod→ sum → sum → printf
A published solution is not available for this question yet.
Report a correction for Q145
Question 146 MCQ · 4.0 marks 6406533052505. End Term Exam
A published solution is not available for this question yet.
Report a correction for Q146
Question 147 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q147
Question 148 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q148
Question 149 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q149
Question 150 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q150
Question 151 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q151
Question 152 MCQ · 5.0 marks 6406533052489. a = 1, b = 2
a = 2, b = 1
6406533052490. a = 2, b = 1
a = 1, b = 2
6406533052491. a = 1, b = 1
a = 2, b = 2
6406533052492. a = 2, b = 2
a = 1, b = 1
A published solution is not available for this question yet.
Report a correction for Q152
Question 153 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q153
Question 154 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q154
Question 155 MCQ · 5.0 marks 6406533052546. Value of a: 0
Value of a: 1
6406533052547. Value of a: 1
Value of a: 2
6406533052548. Value of a: some_garbage_value
Value of a: some_garbage_value
6406533052549. Value of a: 1
Value of a: 1
A published solution is not available for this question yet.
Report a correction for Q155
Question 156 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q156
Question 157 MSQ · 4.0 marks Select the correct statements from the below that dynamically allocate memory to hold a
maximum of 2 characters. Assume size of int is 4 bytes, size of char is 1 byte and size of pointer is
8 bytes.
6406533052538. char* a = (char*)malloc(16);
6406533052539. char* a = (char*)malloc(2);
6406533052540. char* a = (char*)malloc(2*sizeof(char));
6406533052541. char* a = (char*)malloc(2*sizeof(char*));
A published solution is not available for this question yet.
Report a correction for Q157
Question 158 MSQ · 5.0 marks 6406533052529. (*p1_ptr).hp = 95;
6406533052530. p1->hp -= 5;
6406533052531. p1_ptr->hp -= 5;
6406533052532. p1_ptr.hp = 95;
A published solution is not available for this question yet.
Report a correction for Q158
Question 159 NAT · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q159
Question 160 NAT · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q160
Question 162 MCQ · 0.0 marks **Note:**
For numerical answer type questions, enter your answer correct upto two decimal places without
rounding up or off unless stated otherwise.
6406533052573. Instructions has been mentioned above.
6406533052574. This Instructions is just for a reference & not for an evaluation.
A published solution is not available for this question yet.
Report a correction for Q162