All Exams Test series for 1 year @ ₹349 only

UGC NET 2018 Paper 2 Computer Science Question Paper (08-Jul-2018); Download PDF

UGC NET 2018 Paper 2 (Computer Science & Applications) conducted on 8th July 2018 was a specialized test for Assistant Professor and JRF aspirants. It comprised 100 MCQs (2 marks each) covering core CS topics like Data Structures, Algorithms, DBMS, Operating Systems, and Computer Networks, with no negative marking. This paper tested both conceptual depth and problem-solving skills, making it essential for aspirants to practice previous year papers to identify repeating patterns and high-weightage topics.

Free
UGC NET 2018 Paper 2 Computer Science Prev Year Paper (08-Jul-2018)
120 Minutes
100 Questions
200 Marks
English
Showing 1 - 5 of 100 questions
Page 1 of 20

Q3.

What is the output of the following JAVA program?

class simple

{

public static void main(String[ ] args)

{

simple obj = new simple( );

obj.start( );

}

void start( )

{

long [ ] P= {3, 4, 5};

long [ ] Q= method (P);

System.out.print (P[0] + P[1] + P[2]+”:”);

System.out.print (Q[0] + Q[1] + Q[2]);

}

long [ ] method (long [ ] R)

{

R [1]=7;

return R;

}

} //end of class

Q4.

What is the output of the following ‘C’ program ? (Assuming little - endian representation of

multi-byte data in which Least Significant Byte (LSB) is stored at the lowest memory address.)

#include <stdio.h>

#include <stdlib.h>

/* Assume short int occupies two bytes of storage */

int main ( )

{

union saving

{

short int one;

char two[2];

};

union saving m;

m.two [0] = 5;

m.two [1] = 2;

printf(’’%d, %d, %d\n”, m.two [0], m.two [1], m.one);

}/* end of main */

Q5.

Given below are three implementations of the swap( ) function in C++ :

(a)

 void swap (int a, int b) 

 {

 int temp;

 temp = a;

 a = b;

 b = temp;

 }

 int main( )

 {

 int p = 0, q = 1;

 swap (p, q);

 }

 (b)

 void swap (int &a, int &b) 

 {

 int temp;

 temp = a;

 a = b;

 b = temp;

 }

 int main( )

 {

 int p = 0, q = 1;

 swap (p, q);

 }

 (c)

 void swap (int *a, int *b)

 {

 int *temp;

 temp = a;

 a = b;

 b = temp;

 }

 int main( )

 {

 int p = 0, q = 1;

 swap (&p, &q);

 swap (&p, &q);


Which of these would actually swap the contents of the two integer variables p and q ?

Page 1 of 20
Jump to:
Need Expert Advice?
Test Series
UGC NET img
Teaching
UGC NET Library and Information Science 2024 - 2025 Mock Test Series
66 Tests 4 Tests Free
715 Attempts
4.4(17)
English, Hindi