Professional Documents
Culture Documents
PART-A
PART- B
6 a) Write a C program to Check whether the given string is palindrome or not. (5+5)
b) Explain about pointer arithmetic and arrays with example.
(OR)
7. a) Write a C program to sort the 10 strings (entered by the user) in lexicographical order
(dictionary order). (5+5)
b) Describe the concept of dynamic memory allocation.
8. a) Write a C program that takes two complex numbers as structures and adds them
b) Explain about array of structures with example.
(OR)
10 a) Write a C program to copy the content from one file to another file. (5+5)
b) What is a file pointer? Explain the steps for sequential file operations
(OR)
***
Code No:PPS192002 R18
PART-A
PART- B
2. a) Explain the different types of data types used in ‘C’ language. (5+5)
b) Write a C program to calculate the sum of individual digits of a given number.
(OR)
3. a) How while loop is different from do while loop? Explain. (5+5)
b) Write a program to find GCD between two given numbers.
4 a) Apply binary search to search key 15 in the list 7 9 10 12 14 15 25? (5+5)
b) Write a C Program to implement linear search technique.
(OR)
5 a) Discuss about different kinds of arrays in C. (5+5)
b) Write a C program to find smallest and largest numbers in a given array.
Code No:PPS192002 R18
***
Code No:PPS192003 R18
PART-A
PART- B
8. a) How are the members of a ‘Union’ are initialized and accessed? (5+5)
b) Explain the following i) Array of structures ii) Structure containing array
(OR)
9 a) Define and declare a structure to store date, which including day, month, year (5+5)
and explain nested structure concept using date structure
b) Discuss about enumerated type.
***
Code No:PPS192004 R18
PART-A
1. a) Define algorithm and flowchart . (2M)
b) Write a for loop statement to print numbers from 10 to 1. (2M)
c) What is the use of Ternary operator? (2M)
d) List advantages of functions. (2M)
e) What is an array? How it is different from ordinary variable? (2M)
f) Find the value of *y, *(y + 1) for the following program fragment:
char x [ ] = “Life is beautiful”;
char *y = &x [ 3 ]; (2M)
g) Compare and contrast calloc() and malloc() (2M)
h) What is nested structure? Give an example. (2M)
i) Differentiate arrays and structures? (2M)
j) Write short note on fseek() . (2M)
PART- B
(OR)
7. a) Discuss on string Input and Output functions?
b) Write the procedure for swapping two strings using pointers?
8. a) How to save the memory while using structures? Explain. (Assume that all (5+5)
Members of a structure are of type unsigned integers.)
b) Write a program to calculate average marks and total marks in a class of 5
students by using structure concept.
(OR)
9. a) Demonstrate how one structure can be copied to another of the same type. (5+5)
b) Write a C Program to add and multiply two complex numbers using structures.
***