Sample Paper 2
Sample Paper 2
(5 Marks)
Describe the various components of computer organization (CPU, memory unit, I/O
units) and how they interact with each other.
(5 Marks)
Discuss the differences between syntax errors and semantic errors in C programming.
Provide examples of each.
(5 Marks)
Explain the concepts of object code, source code, and executable code in the
context of a program's execution process. How do compilers and interpreters help in
this process?
(5 Marks)
What are Top-down and Bottom-up design strategies in algorithm development? Explain
with an example.
(5 Marks)
Write a C program to:
(4 Marks)
Explain the concept of pointer to structure with an example.
(5 Marks)
Write a C program that accepts a string and uses pointer arithmetic to reverse the
string.
(5 Marks)
Write a C program to find the factorial of a number using recursion.
(6 Marks)
a) Describe the file handling functions in C. Explain how files are opened and
closed.
b) Write a program to read data from a file and display its content.
(3 Marks)
What is dynamic memory allocation in C? Explain its importance and use with a
simple example using malloc().