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.

Cross

well-formed

Cross

reasonable

Tick

valid

Cross

logical



Question 1-Explanation: 

Explanation:

Correct Answer is (C) Valid.

XML- Extensible MarkUp Language designed to store and transport data. doesn't have predefined tags.self descriptive.

DTD- Data Type Definition.DTD defines structure and the legal elements and attributes of an XML document.

XML with correct syntax is "well formed" and XML validated against DTD is well formed and valid.

XML document are in compliance with the tagging system and definitions in the Document Type Definition (DTD), the document is considered valid.

Quiz of this Question

Please comment below if you find anything wrong in the above post

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:
Cross
M=3; D1 displays ”12”; D2 displays ”6”; D3 displays ”12”.
Cross
M=3; D1 displays ”6”; D2 displays ”12”; D3 displays ”6”.
Cross
M=2; D1 displays ”6”; D2 displays ”12”.
Tick
M=2; D1 displays ”12”; D2 displays ”6”.


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
Cross
12 : 15
Cross
15 : 12
Cross
12 : 12
Tick
15 : 15


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, %d\n”, m.two [0], m.two [1], m.one);
}/ * end of main * /
Cross
5, 2, 1282
Cross
5, 2, 52
Cross
5, 2, 25
Tick
5, 2, 517


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?
Cross
(a) only
Tick
(b) only
Cross
(c) only
Cross
(b) and (c) only


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:
Tick
S1 and S2 only
Cross
S1 and S3 only
Cross
S2 and S3 only
Cross
All of S1, S2 and S3


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:
Cross
P only
Cross
Q only
Tick
Both P and Q
Cross
Neither P nor Q


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 :
Tick
16 frames per second
Cross
19 frames per second
Cross
21 frames per second
Cross
23 frames per second


Question 8-Explanation: 

Total pixels in the frame buffer = (width  x height)= 640 x 480 px = 307200

Here, color depth is 1 bit.

Memory required by frame buffer = Memory required for total pixel =

Total pixels in the frame buffer x (Color depth) = 307200 x 1

If access time for each pixel on the average is 200 ns

Time required to refresh  \"frame buffer\" = Memory required by frame buffer x 200 ns = 61440000 nano second = 61440000 x 10−9 second

Then, refresh rate of frame buffer =

number of frame changes per second = 1 / 61440000 x 10−9 second = 100,00,00,000 / 61440000 = 100,000 / 6144 = 16.2760 = 16 (Approximately)

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:
Cross
S1 only
Tick
S2 only
Cross
Both S1 and S2
Cross
Neither S1 nor S2


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?
Cross
M represents first, a scaling of vector (2, 1) followed by translation of vector (1, 1)
Tick
M represents first, a translation of vector (1, 1) followed by scaling of vector (2, 1)
Cross
M represents first, a scaling of vector (3, 1) followed by shearing of parameters (−1, 1)
Cross
M represents first, a shearing of parameters (−1, 1) followed by scaling of vector (3, 1)


There are 99 questions to complete.

  • Last Updated : 21 Oct, 2021

Share your thoughts in the comments
Similar Reads