×
My under eye areas maybe dark but my future will be bright and that is more important.
--Your friends at LectureNotes
Close

UGC NET CS july 2018 previous year question paper solved with explanation

  • Other
  • 137 Views
  • 4 Offline Downloads
  • Uploaded 28 days ago
Umesh Kumar
Umesh Kumar
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

COMPUTER SCIENCE AND APPLICATION (UGC-NET) NET JULY 2018 PAPER -II (MCQ) PAPER - II COMPUTER SCIENCE AND APPLICATIONS Note : This paper contains hundred (100) objective type questions of two (2) marks each. All questions are compulsory. 1. The definitions in an XML document are said to be __________ when the tagging system and definitions in the DTD are all in compliance. (1) well-formed (2) reasonable (3) valid (4) logical Explain -: A valid XML document is defined in the XML specification as a well-formed XML document which also conforms to the rules of a Document Type Definition (DTD). 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, ...., DM represents the content displayed in each of the M dialog boxes, then : (1) M=3; D1 displays ”12”; D2 displays ”6”; D3 displays ”12”. (2) M=3; D1 displays ”6”; D2 displays ”12”; D3 displays ”6”. (3) M=2; D1 displays ”6”; D2 displays ”12”. (4) M=2; D1 displays ”12”; D2 displays ”6”. Explain -: Initially, f() is called. Then this.y shall display the local value of the variable y which is 6. Next g() is the function which is just defined but it will not get executed untill it is called. Only once g() is called and then it will display y which is the value of global variable=12 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); By Mr. UMESH KUMAR, MCA (GGU) Page | 1 NET/SET/GATE/JRF OTHER EXAM

Text from page-2

COMPUTER SCIENCE AND APPLICATION (UGC-NET) NET JULY 2018 PAPER -II (MCQ) 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 (1) 12 : 15 (2) 15 : 12 (3) 12 : 12 (4) 15 : 15 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 */ 1) 5, 2, 1282 (2) 5, 2, 52 (3) 5, 2, 25 (4) 5, 2, 517 5. Given below are three implementations of the swap( ) function in C++ : Which of these would actually swap the contents of the two integer variables p and q ? (1) (a) only (2) (b) only (3) (c) only (4) (b) and (c) only By Mr. UMESH KUMAR, MCA (GGU) Page | 2 NET/SET/GATE/JRF OTHER EXAM

Text from page-3

COMPUTER SCIENCE AND APPLICATION (UGC-NET) NET JULY 2018 PAPER -II (MCQ) 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 : (1) S1 and S2 only (2) S1 and S3 only (3) S2 and S3 only (4) All of S1, S2 and S3 Explain -: Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists. 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 : (1) P only (2) Q only (3) Both P and Q (4) Neither P nor Q Explain:- 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 (3) is correct. 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 : (1) 16 frames per second (2) 19 frames per second (3) 21 frames per second (4) 23 frames per second Answer: (1) 16 frames per second Reason : Here 640 pixel wide is width of screen means vertical line on screen and 480 pixels high is means vertical line on screen. Now width (w) = 640 px and height (h) = 480 px Total = 640 x 480 = 307200 Color depth = 1-bit/px Memory required for total pixel = w x h x Color Depth Memory required for total pixel = 640 x 480 x 1-bit = 307200 1 pixel takes 200 nano second to refresh To refresh the whole screen = 640 x 480 x 200 ns = 61440000 nano second For 1 nano second = ____1____ screen 61440000 By Mr. UMESH KUMAR, MCA (GGU) Page | 3 NET/SET/GATE/JRF OTHER EXAM

Text from page-4

COMPUTER SCIENCE AND APPLICATION (UGC-NET) NET JULY 2018 PAPER -II (MCQ) 9 Now Convert nano seconds to second we multiply above value with 10 9 For 1 nano second = ____1____ x 10 = 16.2760 = 16 (Approximately) 61440000 The above solved values is closed to Option (1). 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 : (1) S1 only (2) S2 only (3) Both S1 and S2 (4) Neither S1 nor S2 For S1 Statement :  The painter's algorithm, also known as a priority fill, is one of the simplest solutions to the visibility problem in 3D computer graphics.  The name "painter's algorithm" refers to the technique employed by many painters for painting distant parts of a scene before parts which are nearer thereby covering some areas of distant parts.  The painter's algorithm sorts all the polygons in a scene by their depth and then paints them in this order, farthest to closest.  It will paint over the parts that are normally not visible which solving the visibility problem at the cost of having painted invisible areas of distant objects. So according to above paragraph the option S1 is FALSE. For S2 Statement :  Backface culling is an important part of how a 3D engine performs visibility checks. Its purpose is to detect polygons that are invisible in a particular scene that is, polygons that face away from the viewer.  The process is similar to clipping, which determines if polygons are within the camera's field of view at all, and if not, are not rendered.  Back-face culling is a method in computer graphics programming which determines whether a polygon of a graphical object is visible; if it is not, the polygon is "culled" from rendering process, which increases efficiency by reducing the number of polygons that the hardware has to draw.  The vertices of front-facing polygons wind in a clockwise fashion, so polygons that face away from the camera are in a counter-clockwise order relative to the current view.  When back-faces are culled, these polygons are not drawn. By Mr. UMESH KUMAR, MCA (GGU) Page | 4 NET/SET/GATE/JRF OTHER EXAM

Lecture Notes