0% found this document useful (0 votes)
18 views2 pages

Sample Paper 2

Uploaded by

jundhuliya.2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Sample Paper 2

Uploaded by

jundhuliya.2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Unit I: Introduction to Computer and Programming Concepts (20 Marks)

(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.

Unit II: Basics of C (20 Marks)


(6 Marks)
Write a program in C to:

Accept a character input.


Display whether it is a vowel or consonant.
Convert the character to uppercase if it is lowercase and vice versa.
(6 Marks)
What are bitwise operators in C? Explain the use of AND, OR, XOR, NOT operators
with examples.

(5 Marks)
Write a C program to:

Accept two numbers from the user.


Perform arithmetic operations using the appropriate operators (add, subtract,
multiply, divide).
(3 Marks)
Explain the use of preprocessor directives in C. What are header files and macros?

Unit III: Arrays and Pointers (15 Marks)


(6 Marks)
Write a C program to implement a dynamic array using malloc() and free() functions.
Display the elements of the array after memory allocation.

(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.

Unit IV: Functions (10 Marks)


(5 Marks)
Explain Call-by-value and Call-by-reference parameter passing methods with
examples.

(5 Marks)
Write a C program to find the factorial of a number using recursion.

Unit V: User-defined Data Types and File Handling (15 Marks)


(6 Marks)
a) Explain the concept of arrays of structures in C with an example.
b) Write a C program to input and display data for a list of students using arrays
of structures.

(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().

You might also like