Semester : S1 and S2
Subject : Computer Programming
Year : 2018
Term : JULY
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:2
20
21
22
23
24
b)
a)
b)
a)
b)
a)
b)
a)
b)
a)
b)
E2110
the string is a palindrome or not.
Explain how string variables are declared and initialised in C program. (2)
Write a function in © to check whether the given number is prime or not. Call the (5)
6
function from main function.
Give the advantages of pointers in C. Is there any relationship between an array (3)
name and a pointer? Justify your answer.
Write a © program to read an array of integers_and sort them in ascending order (5)
using pointers.
Explain cal! by value and call by referencein C with an example. (3)
PART C
Answer any two questions each carries 14 marks
Write a C program to read set of numbers from an input file ‘value.dat’and store (| 0)
the sorted numbers in an output file’sort.res’.
How command line arguments are passed in © program? Explain with an (4)
example.
Write a C program to perform selection sort for a given set of numbers and (10)
explain how the following set of numbers is sorted using selection sort.
(1, 5, 3, 9, 12, 4}
Write a C program to sort given set of numbers using Bubble sort. (4)
Write a C program to create a text file and display its content. (7)
Write a C program to search a given number from a set of numbers using linear (7)
search method. Explain linear search method with an example.
%%%%
Page 2 of 2