Computer Science Exam - 2025

Full Marks: 80
Pass Marks: 20
Time: Three hours


Instructions:

Attempt all questions.
The figures in the right-hand margin indicate full marks for the corresponding questions.


Questions:

  1. What does definiteness mean in the context of algorithms? (1 mark)
  2. Define a constant in C? (1 mark)
  3. What is the primary purpose of the atoi() function? (1 mark)
  4. How do you call a function in C? (1 mark)
  5. Declare a structure Data that can store an integer and a character. (1 mark)
  6. Which attribute of the <form> tag specifies the URL where the form data should be submitted? (1 mark)
  7. Write an algorithm to find the smallest of three numbers. (2 marks)
  8. Write the format specifiers used in C for the following types: (2 marks)
    • (A) Floating point in decimal or exponential form
    • (B) Unsigned decimal integer
    • (C) Unsigned octal integer
    • (D) Unsigned hexadecimal integer
  9. Draw the output of the following code: (2 marks)
     #include <stdio.h>
     int main() {
         int i, j;
         printf("**********\n");
         for (i = 1; i <= 4; ++i) {
                for (j = 1; j <= 2 * i - 1;j +=2) {
                       printf("%d, j");
                }
                printf("\n");
         }
        return 0;
      } 
    
  10. What do the following string functions in C do? (1 + 1 = 2 marks)
    (a) strupr()
    (b) stricat()
  11. State two uses of recursive function. (2 marks)
  12. Why and how do we insert comments in HTML? (2 marks)
  13. Draw the output of the following code: (2 marks) ```html

Water molecule: H2O</br> Mathematical eqn.:E= mc2</br>

14. Draw a flowchart to find the factorial of a number. Ensure that negative values are rejected with the message "Invalid input." **(3 marks)**
15. Describe the function of the three logical operators in C. **(3 marks)**
16. State three points of differences between an array and a union in C. **(3 marks)**
17. Explain what the following code does and predict the output: **(3 marks)**
```C
int a = 5, b = 10; 
int *p1 = &a, *p2 = &b; 
int sum = *p1 + *p2; 
printf("Sum = %d\n", sum);
  1. What are the attributes of the <img> tag, and what do they represent? (3 marks)
  2. Write a brief note on gets() and getchar(). Using a suitable example explain how getchar() can be used to read strings with whitepaces. (2 + 2 =4 marks)
  3. (a) What happens to a variable when it is passed to a function using pass-by-value in C?
    (b) Write the function prototype of the following functions:
    (i) average : accepts three real numbers and return their average
    (ii) sayHello : accepts a string and returns no value
    (iii) getPi : does not accept any parameter but returns a real number (1 + 3 =4 marks)
  4. List any four attributes of the <hr> and state their purpose. (4 marks)
  5. Differentiate the followings: (3+1=4 marks)
    (a) <p> and <br>
    (b) cellspacing and cellpadding
  6. Describe the html tag used for creating hyperlinks and explain its key attributes. (1+3=4 marks)
  7. Write a C program that generates the Fibonacci series up to the Nth term, handling negative input values appropriately. (5 marks)
  8. Write a C program to perform a linear search on an array, where the user inputs the array elements and the element to be searched (5 marks)
  9. Write a C program to find the transpose of a square matrix, taking the matrix elements as user input and displaying the transpose in proper matrix format. (5 marks)
  10. Write HTML code to create a web page that replicates the specified layout and style, ensuring your code accurately reflects the described structure and appearance. (5 marks)

## Scheme of Studies

• Subjects of Studies

C. First language

  • Manipuri
  • Assamese

D. Second language

  • English

Science

  1. Chemistry
  2. Biology

    i. Botany
    ii. Zoology


  1. Write HTML code to create a webpage that includes a table displaying the schedule of classes and links to relevant resources. (5 marks)

Class Schedule

Class Time Resources
Mathematics 09:00 AM – 10:30 AM Math Resources
Science 11:00 AM – 12:30 PM Science Resources
History 01:00 PM – 02:30 PM History Resources

Instructions:

  1. Set the title of the HTML page to “Class Schedule.”
  2. Include a main heading with the text “Class Schedule” at the top of the page.
  3. Ensure the table has visible borders for all cells and add padding of 10 to all table cells.
  4. Set ‘Class’, ‘Time’, and ‘Resources’ as table headers.
  5. Set green color for the table headers.
  6. Create clickable links for: