UGC NET CS 2018 July – II


Question 1
The definitions in an XML document are said to be __________ when the tagging system and definitions in the DTD are all in compliance.
A
well-formed
B
reasonable
C
valid
D
logical
HTML and XML    UGC NET CS 2018 July - II    
Discuss it


Question 2
Consider the JavaScript Code:
var y= ’’12”;
function f( ) {
var y=’’6”;
alert (this.y);
function g( ) {alert (y); }
g( );
}
f( );
If M is the number of alert dialog boxes generated by this JavaScript code and D1, D2, ...., D M represents the content displayed in each of the M dialog boxes, then:
A
M=3; D1 displays ”12”; D2 displays ”6”; D3 displays ”12”.
B
M=3; D1 displays ”6”; D2 displays ”12”; D3 displays ”6”.
C
M=2; D1 displays ”6”; D2 displays ”12”.
D
M=2; D1 displays ”12”; D2 displays ”6”.
Software Engineering    UGC NET CS 2018 July - II    
Discuss it


Question 3
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
A
12 : 15
B
15 : 12
C
12 : 12
D
15 : 15
Java Class and Object    UGC NET CS 2018 July - II    
Discuss it


Question 3 Explanation: 
When above program compliled and run on ide then it will produce 15:15. IDE link Option (D) is correct.
Question 4
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, %dn”, m.two [0], m.two [1], m.one);
}/ * end of main * /
A
5, 2, 1282
B
5, 2, 52
C
5, 2, 25
D
5, 2, 517
UGC NET CS 2018 July - II    
Discuss it


Question 5
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);
}
Which of these would actually swap the contents of the two integer variables p and q?
A
(a) only
B
(b) only
C
(c) only
D
(b) and (c) only
C Functions    UGC NET CS 2018 July - II    
Discuss it


Question 6
In Java, which of the following statements is/are True? S1 : The ‘final’ keyword applied to a class definition prevents the class from being extended through derivation. S2 : A class can only inherit one class but can implement multiple interfaces. S3 : Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading. Code:
A
S1 and S2 only
B
S1 and S3 only
C
S2 and S3 only
D
All of S1, S2 and S3
UGC NET CS 2018 July - II    
Discuss it


Question 7
Which of the following statements is/are True? P : C programming language has a weak type system with static types. Q : Java programming language has a strong type system with static types. Code:
A
P only
B
Q only
C
Both P and Q
D
Neither P nor Q
Principles of Programming Languages    UGC NET CS 2018 July - II    
Discuss it


Question 7 Explanation: 
C programming language has a weak type system with static types but Java programming language has a strong type system with static types. Both Statements are correct. So, option (C) is correct.
Question 8
A graphic display system has a frame buffer that is 640 pixels wide, 480 pixels high and 1 bit of color depth. If the access time for each pixel on the average is 200 nanoseconds, then the refresh rate of this frame buffer is approximately :
A
16 frames per second
B
19 frames per second
C
21 frames per second
D
23 frames per second
Image Processing    UGC NET CS 2018 July - II    
Discuss it


Question 9
Which of the following statements is/are True regarding the solution to the visibility problem in 3D graphics ? S1 : The Painter’s algorithm sorts polygons by depth and then paints (scan - converts) each Polygon on to the screen starting with the most nearest polygon. S2 : Backface Culling refers to eliminating geometry with backfacing normals. Code:
A
S1 only
B
S2 only
C
Both S1 and S2
D
Neither S1 nor S2
Computer Graphics    UGC NET CS 2018 July - II    
Discuss it


Question 10
Consider the matrix M = representing a set of planar (2D) geometric transformations in homogeneous coordinates. Which of the following statements about the matrix M is True?
A
M represents first, a scaling of vector (2, 1) followed by translation of vector (1, 1)
B
M represents first, a translation of vector (1, 1) followed by scaling of vector (2, 1)
C
M represents first, a scaling of vector (3, 1) followed by shearing of parameters (−1, 1)
D
M represents first, a shearing of parameters (−1, 1) followed by scaling of vector (3, 1)
Linear Algebra    UGC NET CS 2018 July - II    
Discuss it


There are 99 questions to complete.


My Personal Notes arrow_drop_up


Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.