Docsity

C Programming and Data Structures Question Paper, Exams of Abnormal Psychology

Toggle sidebar
bg1
Model Question Paper
PROGRAMMING IN C AND DATA STRUCTURES
(14PCD13/14PCD23)
Time: 3 hrs. Max. Marks:
100
Note: Answer any FIVE full questions, choosing one full question from each
modu
le
.
MODULE
1
1) a. What is pseudo code? How it is used as a problem-
solving tool.
(6
Marks)
b. What is an operator? Explain the arithmetic, relational, logical, and
assignment operators in C language.
(10 Marks)
c. Write a program in C to print the numbers from 4 to 9 and their squares. (4 Marks)
OR
2) a.
Write and explain the basic concepts of a C program.
(8 Marks)
b.
Write the guidelines to use printf() function in C language.
(8 Marks)
c.
Write a program in C to find the area and perimeter of a circle.
(4 Marks)
MODULE
2
3) a. Explain the two way selection (if, if-else, nested if-else, cascaded if-
else) in C language with syntax .
(8 Marks)
b. Explain the switch statement with s
yntax and example.
(8 Marks)
c. Design and develop a C program to read a
year
as an input and find
whether it is
leap year
or not. Also consider end of the centuries.
(4 Marks)
OR
4) a.
Explain the different types of loops in C with syntax and example.
(8 Marks)
pf3
pf4

Partial preview of the text

Download C Programming and Data Structures Question Paper and more Exams Abnormal Psychology in PDF only on Docsity!

Model Question Paper PROGRAMMING IN C AND DATA STRUCTURES (14PCD13/14PCD23) Time: 3 hrs. Max. Marks: 100

Note: Answer any FIVE full questions, choosing one full question from each module.

MODULE 1

  1. a. What is pseudo code? How it is used as a problem-solving tool. (6 Marks)

b. What is an operator? Explain the arithmetic, relational, logical, and assignment operators in C language.

(10 Marks)

c. Write a program in C to print the numbers from 4 to 9 and their squares. (4 Marks)

OR

  1. a. Write and explain the basic concepts of a C program. (8 Marks)

b. Write the guidelines to use printf() function in C language. (8 Marks)

c. Write a program in C to find the area and perimeter of a circle. (4 Marks)

MODULE 2

  1. a. Explain the two way selection (if, if-else, nested if-else, cascaded if- else) in C language with syntax.

(8 Marks)

b. Explain the switch statement with syntax and example. (8 Marks) c. Design and develop a C program to read a year as an input and find whether it is leap year or not. Also consider end of the centuries.

(4 Marks)

OR

  1. a. Explain the different types of loops in C with syntax and example. (8 Marks)

b. Explain the use of break and continue statement in loops with example. (6 Marks) c. Design and develop a C program to r everse of an integer number NUM and check whether it is PALINDROME or NOT.

(6 Marks)

MODULE 3

  1. a. What is an array? Explain the declaration and initialization of one and two dimensional arrays with example.

(6 Marks)

b. Explain void and parameter less functions in C with examples. (6 Marks) c. Write a C program that: i. Implements string copy operation STRCOPY (str1,str2) that copies a string str1 to another string str2 without using library function. ii. Reads a sentence and prints frequency of each of the vowels and total count of consonants.

(8 Marks)

OR

  1. a. Explain any five string manipulation library functions with examples. (10 Marks)

b. What is function parameter? Explain different types of parameters in C functions.

(4 Marks)

c. Write a C function isprime (num) that accepts an integer argument and returns 1 if the argument is prime, a 0 otherwise. Write a C program that invokes this function to generate prime numbers between the given ranges.

(6 Marks)

MODULE 4

  1. a. What is a structure? Explain the syntax of structure declaration with example.

(4 Marks)

b. What is a file? Explain how the file open and file close functions (6 Marks)