Home / Study library / Programming in C / End Term · May 2024 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
Q120 Q122 Q123 Q124 Q125 Q126 Q127 Q128 Q129 Q130 Q131 Q132 Q133 Q134 Q135 Q136 Q137 Q138 Q139 Q140 Q141 Q142 Q143 Q144 Q145 Q146
Question 120 MCQ · 2.0 marks 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 6406533044616. 6406533044617. 6406533044618. 6406533044619. 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. 6406533044633. 6406533044634. 6406533044635. 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?
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
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?
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.
What will be the output of the above C program?
6406533044625. Hello 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.
What will be the output of the above C program?
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.
What will be the output of the above C program?
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.
What will be the output of the above program?
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.
What will be the output of the above program?
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.
What will be the output of the above program?
6406533044604. 3 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.
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.
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.
What will be the output of the above program?
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.
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.
What will the output of the above code?
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.
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. 6406533044649. 6406533044650. 6406533044651. A published solution is not available for this question yet.
Report a correction for Q144
Question 145 NAT · 4.0 marks 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.
What will be the output of the above program?
A published solution is not available for this question yet.
Report a correction for Q146