Study resource

Read at your pace, then save it for later.

Solved 2025: FYUG Even Semester Exam, 2025 Computer Science

UNIT-I

1. Answer any four questions [1x4=4]

(a) What is a computer program?


A computer program is a collection of instructions that can be executed by a computer to perform a specific task.

(b) Define the term 'testing'.


Testing is the process of executing a program with the intent of finding errors or verifying that it meets specified requirements.

(c) What is error?


An error is a flaw or mistake in a program that causes it to produce an incorrect or unexpected result.

(d) What is object code?


Object code is the low-level machine-readable code produced by a compiler or assembler from source code.

3. (b) Write short notes on the following: [2x4=8]

  • Compiler: A program that translates high-level source code into machine-readable object code all at once.
  • Assembler: A utility that translates assembly language code into machine language.
  • Syntax Error: Errors that occur when the code violates the grammatical rules of the programming language.
  • Run-time Error: Errors that occur during the execution of a program, such as division by zero.
  • UNIT-II

    4. (a) What is a flowchart? [1 Mark]

    A flowchart is a graphical representation of an algorithm or process using different symbols

    .

    6. (a) Rules for designing a flowchart & Circle Area [2+6=8]

    Rules for Flowcharting:

  • Use standard symbols (Oval for Start/End, Rectangle for Process).
  • Flow direction should be from top to bottom or left to right.
  • Ensure every flowchart has a single Start and at least one End.
  • Algorithm for Area of Circle:

    1. Start.
    2. Input radius (R).
    3. Calculate Area = 3.14 * R * R.
    4. Display Area.
    5. Stop.

    UNIT-III

    8. (a) What are the different primary data types used in C? [8 Marks]

    Primary data types in C include:

    TypeKeywordDescription
    IntegerintStores whole numbers.
    CharactercharStores a single character.
    Floating PointfloatStores decimal numbers.
    DoubledoubleStores high-precision decimals.

    9. (a) Simple Interest Program [4 Marks]

    #include <stdio.h>
    int main() {
      float p, r, t, si;
      printf("Enter Principal, Rate, Time: ");
      scanf("%f %f %f", &p, &r, &t);
      si = (p * r * t) / 100;
      printf("Simple Interest = %f", si);
      return 0;
    }

    UNIT-IV

    11. (a) Entry-controlled vs Exit-controlled loop [8 Marks]

    FeatureEntry-controlled (while)Exit-controlled (do-while) Condition CheckCheck at the beginning.Check at the end. Min ExecutionZero times.At least once.

    12. (a) Factorial using while loop [5 Marks]

    int n, i=1, fact=1;
    while(i <= n) {
      fact = fact * i;
      i++;
    }

    UNIT-V

    14. (b) Difference between call by value and call by reference. [8 Marks]

    Call by Value: A copy of the actual argument is passed to the function. Changes made in the function do not affect the original variable.
    Call by Reference: The address of the variable is passed. Changes made in the function affect the original variable.

    15. (a) Sum and Average of Array Elements [6 Marks]

    #include <stdio.h>
    int main() {
      int arr[5] = {10, 20, 30, 40, 50}, sum = 0;
      for(int i=0; i<5; i++) { sum += arr[i]; }
      printf("Sum: %d, Avg: %f", sum, sum/5.0);
      return 0;
    }

    Exam Success Strategy

  • Flowcharts: Always use the correct terminal (Oval) and process (Rectangle) symbols to ensure full marks.
  • [span_31](start_span)
  • Syntax: For programs, ensure you include header files like <stdio.h>[span_31](end_span).
  • [span_33](start_span)
  • Keywords: Mention specific keywords like int, float, or while when defining data types or loops[span_33](end_span).
  • © 2026 Knowlet. Dedicated to Student Success.


xxx

Did this help you understand better?

Your feedback improves the quality of this resource for everyone.