🇮🇳 UGC NET Computer Science · subject

UGC NET Computer Science Programming Languages and Computer Graphics Syllabus

The Programming Languages and Computer Graphics syllabus for UGC NET Computer Science in full: 7 chapters, 21 topics and 22 sub-topics, every one listed below, plus 51 Programming Languages and Computer Graphics flashcards with answers.

7Chapters
21Topics
22Sub-topics
51Flashcards

Programming Languages and Computer Graphics syllabus: all 7 chapters

Expand any chapter to see its topics and sub-topics.

  1. Language Design and Translation Issues

    5 topics
    • Programming Language Concepts, Paradigms and Models
    • Programming Environments, Virtual Computers and Binding Times
    • Programming Language Syntax
    • Stages in Translation
    • Formal Transition Models
  2. Elementary Data Types

    1 topic
    • Properties of Types and Objects; Scalar and Composite Data Types
  3. Programming in C

    1 topic
    • Tokens, Identifiers, Data Types, Sequence Control, Subprogram Control, Arrays, Structures, Union, String, Pointers, Functions, File Handling, Command Line Arguments, Preprocessors
  4. Object Oriented Programming

    1 topic
    • Class, Object, Instantiation, Inheritance, Encapsulation, Abstract Class, Polymorphism
  5. Programming in C++

    1 topic
    • Tokens, Identifiers, Variables and Constants; Data types, Operators, Control statements, Functions Parameter Passing, Virtual Functions, Class and Objects; Constructors and Destructors; Overloading, Inheritance, Templates, Exception and Event Handling; Streams and Files; Multifile Programs
  6. Web Programming

    1 topic
    • HTML, DHTML, XML, Scripting, Java, Servlets, Applets
  7. Computer Graphics

    11 topics
    • Video-Display Devices
    • Raster-Scan and Random-Scan Systems
    • Graphics Monitors
    • Input Devices
    • Points and Lines
    • Line Drawing Algorithms
    • Mid-Point Circle and Ellipse Algorithms
    • Scan Line Polygon Fill Algorithm
    • Boundary-Fill and Flood-Fill
    • 2-D Geometrical Transforms and Viewing
      • Translation
      • Scaling
      • Rotation
      • Reflection
      • Shear Transformations
      • Matrix Representations and Homogeneous Coordinates
      • Composite Transforms
      • Transformations Between Coordinate Systems
      • Viewing Pipeline
      • Viewing Coordinate Reference Frame
      • Window to View-Port Coordinate Transformation
      • Viewing Functions
      • Line and Polygon Clipping Algorithms
    • 3-D Object Representation, Geometric Transformations and Viewing
      • Polygon Surfaces
      • Quadric Surfaces
      • Spline Representation
      • Bezier and B-Spline Curves
      • Bezier and B-Spline Surfaces
      • Illumination Models
      • Polygon Rendering Methods
      • Viewing Pipeline and Coordinates
      • General Projection Transforms and Clipping

UGC NET Computer Science Programming Languages and Computer Graphics flashcards — 51 questions with answers

  1. What is a programming paradigm, and name the four major paradigms.

    A programming paradigm is a fundamental style/approach to building programs. The four major paradigms are: Imperative (procedural), Object-Oriented, Functional, and Logic (declarative) programming.

  2. In programming language concepts, what is meant by 'binding' and 'binding time'?

    Binding is the association of an attribute (e.g., type, value, memory) with an entity (e.g., variable). Binding time is the moment this association is fixed: language-design time, language-implementation time, compile time, link time, load time, or run time.

  3. Define static binding and dynamic binding with an example of when each occurs.

    Static (early) binding is fixed before run time, e.g., variable types in C resolved at compile time. Dynamic (late) binding is fixed at run time, e.g., virtual function calls resolved via the object's actual type at execution.

  4. What is a 'virtual computer' (virtual machine) in the context of programming environments?

    A virtual computer is an abstract layer (hardware, OS, language libraries) that presents a higher-level machine to a program, hiding lower-level details. Each layer is implemented by the layer beneath it (e.g., JVM running on the OS running on hardware).

  5. List the main stages in the translation (compilation) of a program.

    1) Lexical analysis (scanning), 2) Syntax analysis (parsing), 3) Semantic analysis, 4) Intermediate code generation, 5) Code optimization, 6) Target code generation. Symbol-table management and error handling span all stages.

  6. What does the lexical analysis phase of a compiler produce, and what is a token?

    Lexical analysis (scanner) reads source characters and groups them into tokens. A token is a categorized unit such as a keyword, identifier, constant, operator, or punctuation symbol; the actual text is its lexeme.

  7. In formal transition models, what are the four components used to describe programming language syntax via grammar?

    A context-free grammar G = (V, T, P, S): V = nonterminals (variables), T = terminals, P = production rules, S = start symbol. It is the basis of formal syntax (often written in BNF).

  8. What is BNF (Backus-Naur Form) used for in language definition?

    BNF is a formal metalanguage notation used to specify the context-free syntax (grammar) of programming languages, defining nonterminals, terminals, and production rules.

  9. Differentiate scalar data types from composite data types.

    Scalar (primitive) types hold a single indivisible value (int, float, char, bool). Composite (structured) types are built from other types (arrays, structures, unions, records).

  10. In a type system, what does 'L-value' and 'R-value' of an object mean?

    The L-value is the object's location (address) that can appear on the left of an assignment. The R-value is the object's contents/value used on the right of an assignment.

  11. What is the difference between sequence control and subprogram control in programming languages?

    Sequence control governs the order of statement/expression execution (sequencing, selection, iteration). Subprogram control governs invocation and return between subprograms, including parameter passing and recursion.

  12. In C, what is the difference between an identifier and a keyword?

    An identifier is a user-defined name for variables, functions, etc. (letters, digits, underscore; cannot start with a digit). A keyword is a reserved word with predefined meaning (e.g., int, while, return) that cannot be used as an identifier.

  13. In C, how does an array name relate to a pointer when passed to a function?

    An array name decays to a pointer to its first element. Passing an array passes this pointer (by reference effectively), so the function can modify the original array; size information is lost and must be passed separately.

  14. What is the key difference between a structure and a union in C?

    A structure allocates separate memory for each member (total size = sum of members + padding). A union shares one memory block for all members (size = largest member); only one member holds a valid value at a time.

  15. In C, what is the difference between call by value and call by reference?

    Call by value copies argument values into parameters, so changes do not affect the caller's variables. Call by reference passes addresses (via pointers in C), so the function can modify the caller's variables.

  16. What is a dangling pointer in C, and what commonly causes it?

    A dangling pointer points to memory that has been freed or gone out of scope. It is caused by using a pointer after free(), returning the address of a local variable, or after the pointed-to object is deallocated.

  17. In C, what is the role of the preprocessor and name three common preprocessor directives.

    The preprocessor processes source text before compilation. Common directives: #include (file inclusion), #define (macro/constant definition), #ifdef/#ifndef/#endif (conditional compilation).

  18. In C, what are argc and argv in command line arguments?

    In int main(int argc, char *argv[]): argc is the count of command-line arguments (including the program name), and argv is an array of strings holding those arguments; argv[0] is the program name.

  19. In C file handling, what is the difference between text mode and binary mode, and name the function to open a file.

    fopen() opens a file. Text mode may translate newline characters and is for human-readable data; binary mode reads/writes raw bytes with no translation, used for non-text data.

  20. What is the difference between fgets() and gets() in C string handling?

    gets() reads a line with no bounds checking (unsafe, removed from modern C). fgets() reads up to a specified size limit and retains the newline, preventing buffer overflow.

Show the other 31 Programming Languages and Computer Graphics flashcards
  1. Define the four pillars of Object-Oriented Programming.

    1) Encapsulation (binding data and methods, hiding internals), 2) Abstraction (exposing essential features only), 3) Inheritance (deriving new classes from existing ones), 4) Polymorphism (one interface, many forms).

  2. What is the difference between a class and an object?

    A class is a blueprint/template defining attributes and behaviors. An object is a runtime instance of a class with its own state; creating an object is called instantiation.

  3. What is an abstract class in C++, and how is one created?

    An abstract class cannot be instantiated and serves as a base for derived classes. In C++ it is created by declaring at least one pure virtual function (e.g., virtual void f() = 0;).

  4. Differentiate compile-time polymorphism from run-time polymorphism in C++.

    Compile-time (static) polymorphism is achieved via function/operator overloading and templates, resolved at compile time. Run-time (dynamic) polymorphism is achieved via virtual functions and inheritance, resolved at run time through the vtable.

  5. What is a virtual function in C++ and why is it used?

    A virtual function is a member function declared with the 'virtual' keyword in a base class, allowing it to be overridden in derived classes. It enables run-time polymorphism via dynamic dispatch using the object's actual type.

  6. What is the difference between a constructor and a destructor in C++?

    A constructor has the class name, no return type, runs automatically on object creation to initialize it, and can be overloaded. A destructor (~ClassName) runs automatically on object destruction to release resources, takes no arguments, and cannot be overloaded.

  7. What is function overloading in C++ and on what basis are overloaded functions distinguished?

    Function overloading allows multiple functions with the same name in the same scope, distinguished by their parameter list (number, types, or order of parameters). Return type alone cannot distinguish overloads.

  8. List the main types of inheritance supported in C++.

    Single, Multiple, Multilevel, Hierarchical, and Hybrid inheritance. Multiple/hybrid inheritance can cause the diamond problem, resolved using virtual base classes.

  9. What is a template in C++ and what are its two kinds?

    A template enables generic programming by writing code parameterized over types. The two kinds are function templates (generic functions) and class templates (generic classes), e.g., template<class T>.

  10. In C++ exception handling, what is the purpose of try, throw, and catch?

    try encloses code that may raise an exception; throw signals/raises an exception; catch handles a thrown exception of a matching type. This separates error-handling code from normal flow.

  11. What is the difference between the C++ stream operators << and >> with cin/cout?

    cout << uses the insertion operator to write/output data to a stream. cin >> uses the extraction operator to read/input data from a stream. They are overloaded for built-in types.

  12. In C++ multifile programs, what is the purpose of the 'extern' keyword?

    'extern' declares that a variable or function is defined in another file/translation unit, providing a reference without allocating storage, enabling sharing of globals across multiple files.

  13. What does HTML stand for, and what is the difference between HTML and DHTML?

    HTML = HyperText Markup Language, used to structure static web pages. DHTML (Dynamic HTML) is not a language but a combination of HTML, CSS, and client-side scripting (JavaScript) plus the DOM to create interactive, dynamic pages.

  14. What is the primary difference between HTML and XML?

    HTML has predefined tags and focuses on displaying/formatting data. XML (eXtensible Markup Language) lets users define custom tags and focuses on storing and transporting data; it is case-sensitive and requires well-formed, properly closed tags.

  15. What is the difference between a Java Applet and a Java Servlet?

    An applet is a client-side Java program that runs in a browser/JVM on the client. A servlet is a server-side Java program that runs on a web server to handle requests and generate dynamic responses (e.g., HTML).

  16. What is the difference between client-side scripting and server-side scripting?

    Client-side scripting (e.g., JavaScript) runs in the user's browser to handle interactivity and validation. Server-side scripting (e.g., servlets, PHP) runs on the server to process requests, access databases, and generate dynamic content.

  17. What is the difference between a Raster-Scan and a Random-Scan (vector) display system?

    Raster-scan stores the image as a pixel array (frame buffer) and refreshes line-by-line; suited for realistic shaded images. Random-scan draws lines directly point-to-point from a display file; gives high-resolution smooth lines but cannot shade well.

  18. In a raster display, what is the frame buffer and how is color depth related to it?

    The frame buffer (refresh buffer) is the memory holding intensity/color values for every pixel. Color depth = bits per pixel; n bits give 2^n colors (e.g., 8 bits = 256 colors). Total memory = width x height x bits-per-pixel.

  19. Define refresh rate and aspect ratio for a video display device.

    Refresh rate is how many times per second the screen is redrawn (e.g., 60 Hz) to avoid flicker. Aspect ratio is the ratio of horizontal to vertical dimensions/pixels of the display (e.g., 4:3, 16:9).

  20. What is interlacing in raster-scan displays?

    Interlacing refreshes odd-numbered scan lines in one pass and even-numbered lines in the next, displaying all even/odd lines alternately. It allows showing the whole image at half the bandwidth/refresh, reducing flicker on slower systems.

  21. State the basic Digital Differential Analyzer (DDA) line-drawing algorithm steps.

    Compute dx, dy; set steps = max(|dx|,|dy|); xinc = dx/steps, yinc = dy/steps; start at (x1,y1); repeatedly add increments and plot the rounded point. DDA uses floating-point arithmetic, causing rounding and accumulation errors.

  22. What advantage does Bresenham's line algorithm have over the DDA algorithm?

    Bresenham's algorithm uses only integer addition, subtraction, and bit shifting (no floating point or rounding), making it faster and free of accumulated rounding error compared to DDA.

  23. In Bresenham's line algorithm (slope 0<m<1), what is the initial decision parameter?

    p0 = 2*dy - dx, where dx = x2-x1 and dy = y2-y1. If pk < 0, plot (x+1, y) and pk+1 = pk + 2*dy; else plot (x+1, y+1) and pk+1 = pk + 2*dy - 2*dx.

  24. In the midpoint circle algorithm, what is the initial decision parameter for a circle of radius r centered at origin?

    p0 = 1 - r (or 5/4 - r, approximated to 1 - r). Starting at (0, r): if pk < 0, next point (xk+1, yk) with pk+1 = pk + 2xk+1 + 1; else (xk+1, yk-1) with pk+1 = pk + 2xk+1 + 1 - 2yk+1.

  25. What symmetry does the midpoint circle algorithm exploit to reduce computation?

    Eight-way (octant) symmetry: it computes points only for one 45-degree octant and reflects them to the other seven octants, e.g., from (x,y) it plots (±x,±y) and (±y,±x).

  26. On what principle does the Scan-Line Polygon Fill algorithm operate?

    For each scan line crossing the polygon, it finds intersections with polygon edges, sorts them by x, and fills pixels in pairs (between odd-even pairs of intersections), using an edge table and active edge list.

  27. What is the difference between the Boundary-Fill and Flood-Fill algorithms?

    Boundary-fill fills outward from a seed until it reaches a specified boundary color. Flood-fill replaces all connected pixels of a specific interior (old) color with a new color, regardless of a single boundary color; useful when boundaries have multiple colors.

  28. Why are homogeneous coordinates used in 2-D geometric transformations?

    Homogeneous coordinates represent a 2-D point (x,y) as (x,y,1), allowing translation, rotation, and scaling to all be expressed as 3x3 matrix multiplications. This lets multiple transformations be combined (composed) into a single matrix.

  29. Give the 2-D transformation matrices (homogeneous) for translation and scaling.

    Translation by (tx,ty): [[1,0,tx],[0,1,ty],[0,0,1]]. Scaling by (sx,sy): [[sx,0,0],[0,sy,0],[0,0,1]]. Applied to point [x,y,1]^T.

  30. What is the 2-D rotation transformation matrix for an angle θ about the origin?

    [[cosθ, -sinθ, 0], [sinθ, cosθ, 0], [0, 0, 1]], so x' = x cosθ - y sinθ and y' = x sinθ + y cosθ (counterclockwise about the origin).

  31. Name common methods of 3-D object representation in computer graphics.

    Boundary representations (B-reps) such as polygon meshes and wireframes; space-partitioning representations such as octrees; plus constructive solid geometry (CSG), sweep representations, and parametric/spline surfaces (e.g., Bezier, B-spline).

UGC NET Computer Science Programming Languages and Computer Graphics FAQ

What is in the UGC NET Computer Science Programming Languages and Computer Graphics syllabus?

UGC NET Computer Science Programming Languages and Computer Graphics is split into 7 chapters: Language Design and Translation Issues, Elementary Data Types, Programming in C, Object Oriented Programming, Programming in C++, Web Programming and Computer Graphics. Together they contain 21 topics and 22 sub-topics.

How many chapters are in UGC NET Computer Science Programming Languages and Computer Graphics?

7 chapters, containing 21 topics and 22 sub-topics. The largest chapter is Computer Graphics, with 11 topics.

Are there flashcards for UGC NET Computer Science Programming Languages and Computer Graphics?

Yes — a 51-card Programming Languages and Computer Graphics deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.