z, a[2].p -> z); Options: (1) Nagpur Raipur Kanpur (2) Nagpur Nagpur Nagpur (3) Kanpur Ka... | Pyqs " />
Aspire Faculty ID #18410 · Topic: UGC NET Computer Science June 2023 (Paper II) · Just now
UGC NET Computer Science June 2023 (Paper II)

What is the output of following code?

main()

struct s1

{
char *z;

int i;

struct s1 *p;

}

static struct s1 a[] = {

{"Nagpur", 1, a + 1}

{"Raipur", 2, a + 2}

{"Kanpur", 3, a}

};

struct s1 *ptr = a;

printf("%s %s %s\n", a[0].z, ptr -> z, a[2].p -> z);

}

Solution

a[0].z = Nagpur

ptr = a, so ptr -> z = a[0].z = Nagpur

a[2].p = a, so a[2].p -> z = a[0].z = Nagpur

Final Answer: (b) Nagpur Nagpur Nagpur

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

Nearest first
1
What will be the output of the following code?include <stdio.h>int main() {int a, b, c;a = 0x10; b = 010;c = a + …
Topic: UGC NET Computer Science June 2023 (Paper II)
2
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)
3
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 < 100}. What is the…
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: I/O p…
Topic: UGC NET Computer Science June 2023 (Paper II)
5
The clipping process in computer graphics is used for
Topic: UGC NET Computer Science June 2023 (Paper II)
6
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)
7
The following table shows the time between failures for a software: Error number: 12 3 4 5&nbs…
Topic: UGC NET Computer Science June 2023 (Paper II)
8
Match List I with List II LIST I LIST II A. Parallel FFT I. Θ(n²) B. Iterative FFTII. Θ(n)&nbs…
Topic: UGC NET Computer Science June 2023 (Paper II)
9
Which of the following is not a solution representation in a genetic algorithm?1.Binary valued2.Real valued3.Permutatio…
Topic: UGC NET Computer Science June 2023 (Paper II)
10
Match List I with List II LIST I LIST II  A Δ B (A - B) ∪ (A - C) A - (B ∪ C) (A - B…
Topic: UGC NET Computer Science June 2023 (Paper II)

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

Ascending by ID
1
Match List I with List II List I List II A. The running time of straight forward recursive method to com…
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
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)
4
How will you free the memory allocated by the following program?#include <stdio.h>#define MAXROW 3#define MAXCOL …
Topic: UGC NET Computer Science June 2023 (Paper II)
5
Sutherland Hodgeman method is used on
Topic: UGC NET Computer Science June 2023 (Paper II)
6
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)
7
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)
8
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)
9
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)
10
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)
Ask Your Question or Put Your Review.

loading...