Aspire Faculty ID #17528 · Topic: UGC NET Computer Science August 2024 (Paper II) · Just now
UGC NET Computer Science August 2024 (Paper II)

#include<iostream.h>
using namespace std;

void swap(int &x, int &y)
{
    int temp = x;
    x = y;
    y = temp;
}

int main()
{
    int a = 5, b = 10;
    swap(a,b);
    swap(a,b);
    cout << a << " " << b;
    return 0;
}
What will be the output of above code ?

Solution

Initial values

$a = 5,; b = 10$

First call

swap(a,b)

$a = 10,; b = 5$

Second call

swap(a,b)

$a = 5,; b = 10$

Thus final output

5 10

Previous 10 Questions — UGC NET Computer Science August 2024 (Paper II)

Nearest first
1
Consider a CSMA/CD network that transmits data at the rate of 100 Mbps over a 1 kilometre cable with no repeater. If th…
Topic: UGC NET Computer Science August 2024 (Paper II)
2
Host A (on TCP/IPv4 Networks) send an IP Datagram D to host B (also on TCP/IPv4 network). Assume that no error occurred…
Topic: UGC NET Computer Science August 2024 (Paper II)
3
Consider a relation schema $R = (U, V, W, X, Y, Z)$, on which the following functional dependencies hold:${U \rightarro…
Topic: UGC NET Computer Science August 2024 (Paper II)
4
Which of the following statements are TRUE about mutual exclusion in concurrent programming ? (A) Mutual exclusion ensu…
Topic: UGC NET Computer Science August 2024 (Paper II)
5
Arrange the following phases of database design in the correct order :(A) Physical Design(B) Conceptual Design(C) Logic…
Topic: UGC NET Computer Science August 2024 (Paper II)
6
Which of the following are Agile Process Models ? (A) Extreme Programming (XP) (B) Waterfall (C) Scrum (D) Spiral (E) I…
Topic: UGC NET Computer Science August 2024 (Paper II)
7
Consider the following statement regarding special purpose registers. (A) Program Counter (PC) keeps the track of next …
Topic: UGC NET Computer Science August 2024 (Paper II)
8
Consider the transactions $T_1, T_2, T_3$ and the schedules $S_1$ and $S_2$ given below. $T_1 : r_1(x); r_1(z); w_1(z)$…
Topic: UGC NET Computer Science August 2024 (Paper II)
9
Match List - I with List - II.&nbsp;List - I (software design principles)&nbsp;List - II (Definitions)&nbsp;(A) Cohesio…
Topic: UGC NET Computer Science August 2024 (Paper II)
10
Given a project that uses the COCOMO model with an estimated effort of 2000 person-months and a productivity rate of 5 …
Topic: UGC NET Computer Science August 2024 (Paper II)

Next 10 Questions — UGC NET Computer Science August 2024 (Paper II)

Ascending by ID
1
Consider the three-way handshaking process followed during TCP connection establishment between two hosts A and B. Let …
Topic: UGC NET Computer Science August 2024 (Paper II)
2
Arrange the following steps of file handling in C in the correct order :(A) Close the file(B) Read from or write to the…
Topic: UGC NET Computer Science August 2024 (Paper II)
3
Select the Sorting Algorithms that are stable.(A) Quick Sort(B) Bubble Sort(C) Insertion Sort(D) Merge Sort(E) Shell So…
Topic: UGC NET Computer Science August 2024 (Paper II)
4
Match List - I with List - II.&nbsp;List - I (operating system concepts)List - II (characteristics)&nbsp;&nbsp;(A) Pagi…
Topic: UGC NET Computer Science August 2024 (Paper II)
5
Which of the following statements are TRUE about Process Control Block (PCB) ?(A) The PCB contains information about th…
Topic: UGC NET Computer Science August 2024 (Paper II)
6
Arrange the following steps of Feature Driven Development (FDD) process in the correct sequence :(A) Develop an overall…
Topic: UGC NET Computer Science August 2024 (Paper II)
7
Match List - I with List - II.&nbsp;List - I (Recurrence Relations)List - II (Complexity)&nbsp;&nbsp;(A) $T(n)=2T(n/2)+…
Topic: UGC NET Computer Science August 2024 (Paper II)
8
Match List - I with List - II.&nbsp;List - I (Queries)&nbsp;List - II (Probability)&nbsp;(A) A bag contains 6 white and…
Topic: UGC NET Computer Science August 2024 (Paper II)
9
Which of the following is correct way to declare a functional pointer in C ?
Topic: UGC NET Computer Science August 2024 (Paper II)
10
Which of the following best describes the structure of a relational database ?
Topic: UGC NET Computer Science August 2024 (Paper II)
Ask Your Question or Put Your Review.

loading...