Aspire Faculty ID #18414 · Topic: UGC NET Computer Science June 2023 (Paper II) · Just now
UGC NET Computer Science June 2023 (Paper II)

How will you free the memory allocated by the following program?
#include <stdio.h>

#define MAXROW 3
#define MAXCOL 4

int main()
{
    int **p, i, j;

    p = (int **)malloc(MAXROW * sizeof(int*));

    return 0;
}

Solution

Memory allocated using malloc() is released using free().


Here, memory is allocated to pointer p, so it should be freed as: free(p);

Previous 10 Questions — UGC NET Computer Science June 2023 (Paper II)

Nearest first
1
Find the sum of all four digit numbers formed using the digits 1, 2, 4 and 6.
Topic: UGC NET Computer Science June 2023 (Paper II)
2
Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence:4, 34, 10, …
Topic: UGC NET Computer Science June 2023 (Paper II)
3
Match List I with List II&nbsp;List I&nbsp;List II&nbsp;A. The running time of straight forward recursive method to com…
Topic: UGC NET Computer Science June 2023 (Paper II)
4
What is the output of following code?main()struct s1{char *z;int i;struct s1 *p;}static struct s1 a[] = {{"Nagpur", 1, …
Topic: UGC NET Computer Science June 2023 (Paper II)
5
What will be the output of the following code?include &lt;stdio.h&gt;int main() {int a, b, c;a = 0x10; b = 010;c = a + …
Topic: UGC NET Computer Science June 2023 (Paper II)
6
Given below are two statements:Statement I: Fuzzifier is a part of a fuzzy systemStatement II: Inference engine is a pa…
Topic: UGC NET Computer Science June 2023 (Paper II)
7
Let R = {x : x ∈ N, x is multiple of 3 and x ≤ 100} and S = {x : x ∈ N, x is multiple of 5 and x &lt; 100}. What is the…
Topic: UGC NET Computer Science June 2023 (Paper II)
8
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.Assertion A: I/O p…
Topic: UGC NET Computer Science June 2023 (Paper II)
9
The clipping process in computer graphics is used for
Topic: UGC NET Computer Science June 2023 (Paper II)
10
Given below are two statements:Which of the following concurrency control protocol ensures both conflict serializabilit…
Topic: UGC NET Computer Science June 2023 (Paper II)

Next 10 Questions — UGC NET Computer Science June 2023 (Paper II)

Ascending by ID
1
Sutherland Hodgeman method is used on
Topic: UGC NET Computer Science June 2023 (Paper II)
2
Consider the following statementsA. C-Fuzzy means clustering is a supervised method of learningB. PCA is used for dimen…
Topic: UGC NET Computer Science June 2023 (Paper II)
3
Let N denote the set of all natural numbers and R be the relation on N X N defined by (a, b) R(c, d), if ad(b + c) = bc…
Topic: UGC NET Computer Science June 2023 (Paper II)
4
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.Assertion A: A pro…
Topic: UGC NET Computer Science June 2023 (Paper II)
5
Let R (A, B, C, D) be a relational schema with following functional dependencies:$A \to B,\ B \to C$$C \to D$ and $D \t…
Topic: UGC NET Computer Science June 2023 (Paper II)
6
Consider the following table of arrival time and burst time for three processes P0, P1, P2:Process arrival time Burst t…
Topic: UGC NET Computer Science June 2023 (Paper II)
7
Which of the following scenario may lead to an irrecoverable error in a database system?
Topic: UGC NET Computer Science June 2023 (Paper II)
8
Given below are two statements:Which of the following statement/s is/are correct with respect to virtual memoryStatemen…
Topic: UGC NET Computer Science June 2023 (Paper II)
9
Which phase of compiler checks the grammar of programming?
Topic: UGC NET Computer Science June 2023 (Paper II)
10
Let $G = \frac{R}{{0}}$ and $H = {-1, 1}$ be groups under the multiplication. Then, the map $\phi : G \to H$ defined by…
Topic: UGC NET Computer Science June 2023 (Paper II)
Ask Your Question or Put Your Review.

loading...