Sample Question Pper 1
Sample Question Pper 1
Sample Question Pper 1
(5 Marks)
Define the following terms:
CPU
Memory Unit
I/O Units
Memory Hierarchy
Operating System
(5 Marks)
Explain the basic number system representations in computing. Discuss how binary,
octal, decimal, and hexadecimal number systems are related. Convert the decimal
number 42 into binary, octal, and hexadecimal.
(5 Marks)
What are the steps involved in problem-solving approaches? Explain the significance
of algorithms, flowcharts, and pseudocode in problem-solving. Illustrate with an
example.
(5 Marks)
Discuss the design and analysis of algorithms. Explain Time Complexity and Space
Complexity analysis with examples.
(6 Marks)
Write a C program to perform the following:
If-else
Switch-case
Loops (for, while, do-while)
(5 Marks)
What is type casting in C? Explain the difference between implicit and explicit
type casting with examples. Also, describe the role of storage classes in C.
(4 Marks)
Explain the concept of pointer arithmetic in C. Illustrate with an example of
accessing array elements using pointers.
(5 Marks)
a) What is dynamic memory allocation in C? Explain malloc(), calloc(), realloc(),
and free() with an example.
b) How would you use pointers in C to manipulate a string?
(5 Marks)
Write a C program to compute the Fibonacci series using both iteration and
recursion.
(3 Marks)
Describe file handling in C. Write a C program to open a file, write data to it,
and then close the file.