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:
- What does definiteness mean in the context of algorithms? (1 mark)
- Define a constant in C? (1 mark)
- What is the primary purpose of the
atoi()
function? (1 mark) - How do you call a function in C? (1 mark)
- Declare a structure
Data
that can store an integer and a character. (1 mark) - Which attribute of the
<form>
tag specifies the URL where the form data should be submitted? (1 mark) - Write an algorithm to find the smallest of three numbers. (2 marks)
- 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
- 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; }
- What do the following string functions in C do? (1 + 1 = 2 marks)
(a)strupr()
(b)stricat()
- State two uses of recursive function. (2 marks)
- Why and how do we insert comments in HTML? (2 marks)
- 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);
- What are the attributes of the
<img>
tag, and what do they represent? (3 marks) - Write a brief note on
gets()
andgetchar()
. Using a suitable example explain howgetchar()
can be used to read strings with whitepaces. (2 + 2 =4 marks) - (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) - List any four attributes of the
<hr>
and state their purpose. (4 marks) - Differentiate the followings: (3+1=4 marks)
(a)<p>
and<br>
(b) cellspacing and cellpadding - Describe the html tag used for creating hyperlinks and explain its key attributes. (1+3=4 marks)
- Write a C program that generates the Fibonacci series up to the Nth term, handling negative input values appropriately. (5 marks)
- 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)
- 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)
-
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
- Chemistry
-
Biology
i. Botany
ii. Zoology
- 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:
- Set the title of the HTML page to “Class Schedule.”
- Include a main heading with the text “Class Schedule” at the top of the page.
- Ensure the table has visible borders for all cells and add padding of 10 to all table cells.
- Set ‘Class’, ‘Time’, and ‘Resources’ as table headers.
- Set green color for the table headers.
- Create clickable links for:
- Math Resources → https://example.com/math-resources
- Science Resources → https://example.com/science-resources
- History Resources → https://example.com/history-resources