Home / Study library / Programming in C / End Term · Sep 2024 Programming in C · End Term · Sep 2024 · AN
Programming in C · End Term · Sep 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 / 25 published solutions
Q106 Q107 Q108 Q109 Q110 Q111 Q112 Q113 Q114 Q115 Q116 Q117 Q118 Q119 Q120 Q121 Q122 Q123 Q124 Q125 Q126 Q127 Q128 Q129 Q130
Question 106 MCQ · 3.0 marks Which of the following data types will result in the least memory allocation?
A published solution is not available for this question yet.
Report a correction for Q106
Question 107 MCQ · 3.0 marks What is the scope of a variable declared inside a function in C?
6406533529693. Local to the function
6406533529694. Accessible only in main()
6406533529695. Accessible in all functions called by the parent function
A published solution is not available for this question yet.
Report a correction for Q107
Question 108 MCQ · 3.0 marks 6406533529713. In little-endian format, the least significant byte is stored at the highest
memory address.
6406533529714. In little-endian format, the most significant byte is stored at the lowest
memory address.
6406533529715. In big-endian format, the most significant byte is stored at the lowest memory
address.
6406533529716. In big-endian format, the least significant byte is stored at the lowest memory
address.
A published solution is not available for this question yet.
Report a correction for Q108
Question 109 MCQ · 3.0 marks What is the key distinction between stack and heap memory in C programming?
6406533529734. Stack memory is used for storing global variables, while heap memory is used
for storing local variables.
6406533529735. Stack memory is automatically managed for function calls, while heap memory
requires explicit allocation and deallocation.
6406533529736. Stack memory can grow indefinitely, while heap memory has a fixed size
defined at compile time.
6406533529737. There is no difference; stack and heap memory serve the same purpose in C
programming.
A published solution is not available for this question yet.
Report a correction for Q109
Question 110 MCQ · 4.0 marks 6406533529687. Compilation error
A published solution is not available for this question yet.
Report a correction for Q110
Question 111 MCQ · 4.0 marks 6406533529699. Compilation error
A published solution is not available for this question yet.
Report a correction for Q111
Question 112 MCQ · 4.0 marks What will be the output of the following C program?
6406533529712. 10
Garbage Value
A published solution is not available for this question yet.
Report a correction for Q112
Question 113 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q113
Question 114 MCQ · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q114
Question 115 MCQ · 4.0 marks 6406533529729. 6406533529730. 6406533529731. 6406533529732. A published solution is not available for this question yet.
Report a correction for Q115
Question 116 MCQ · 4.0 marks Choose the correct statement for fscanf() and scanf().
6406533529743. fscanf() always reads from standard input whereas scanf() specifies a stream
from which to read
6406533529744. fscanf() specifies a stream from which to read whereas scanf() reads only from
standard input
6406533529745. fscanf() and scanf() have no difference in their functionalities
6406533529746. fscanf() and scanf() can read from any specified stream
A published solution is not available for this question yet.
Report a correction for Q116
Question 117 MCQ · 4.0 marks 6406533529760. 6406533529761. 6406533529762. 6406533529763. A published solution is not available for this question yet.
Report a correction for Q117
Question 118 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q118
Question 119 MCQ · 5.0 marks Consider the following code to check whether the input number is Prime or not. Consider that
input is a positive integer. However, it contains a logical error.
A published solution is not available for this question yet.
Report a correction for Q119
Question 120 MCQ · 5.0 marks 6406533529700. Counts the number of odd numbers from 1 to n.
6406533529701. Counts the number of even numbers from 1 to n.
6406533529702. The sum of odd numbers from 1 to n.
6406533529703. The sum of even numbers from 1 to n.
A published solution is not available for this question yet.
Report a correction for Q120
Question 121 MCQ · 5.0 marks 6406533529739. 6406533529740. 6406533529741. 6406533529742. A published solution is not available for this question yet.
Report a correction for Q121
Question 122 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q122
Question 123 MCQ · 5.0 marks A published solution is not available for this question yet.
Report a correction for Q123
Question 124 MSQ · 4.0 marks Which of the following statement(s) is/are true regarding the “static” keyword in C?
6406533529752. A static variable inside a function retains its value between function calls.
6406533529753. A static global variable has file scope, meaning it is only accessible within the
file where it is declared.
6406533529754. Static variables must be initialized at compile-time.
6406533529755. A static function can be called from other files of the same program.
A published solution is not available for this question yet.
Report a correction for Q124
Question 125 MSQ · 3.0 marks Which of the following statements about pointers is/are true?
6406533529704. A pointer can be incremented to point to the next memory location of its type.
6406533529705. A pointer variable cannot be reassigned after initialization.
6406533529706. Dereferencing a pointer gives the value stored at the memory address it holds.
6406533529707. Dereferencing a pointer gives the memory address it holds.
A published solution is not available for this question yet.
Report a correction for Q125
Question 126 MSQ · 3.0 marks Which of the following statement(s) is/are true about **unions** in C?
6406533529725. Unions can contain members of different data types.
6406533529726. The size of a union is the sum of the sizes of all its members.
6406533529727. Unions can be nested within other unions or structures.
6406533529728. The size of a union is dynamically allocated based on the size of its members.
A published solution is not available for this question yet.
Report a correction for Q126
Question 127 NAT · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q127
Question 128 NAT · 4.0 marks Consider the following code.
What will be the output of the program?
A published solution is not available for this question yet.
Report a correction for Q128
Question 129 NAT · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q129
Question 130 NAT · 4.0 marks A published solution is not available for this question yet.
Report a correction for Q130