Semester : S1 and S2
Subject : Computer Programming
Year : 2019
Term : DECEMBER
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:2
19 a)
20 ஐ
21 a)
22 a)
23 a)
b)
24 a)
b)
B192003 Pages: 2
PART B
Answer any four full questions, each carries 8 marks.
Differentiate break and continue statements with examples.
Write a program to print the pattern 101010... using for loop.
Give the syntax of “do..while” loop. How is it different from “while” loop?
Explain with examples.
Write a C program to check whether a number is Armstrong or not.
Explain with an example how multidimensional arrays are declared?
Write a C program to find transpose of a matrix.
Create a structure for an employee with following information:- empid, name and
salary. Write a program to read the details of ‘n’ employees and display the
details of employees whose salary is above 10000. Use pointer to structure.
How do pointers differ from variables in C?
Define recursion with an example. Differentiate between iteration and recursion.
Write a C program to find the GCD of two numbers using recursive function.
PART C
Answer any two full questions, each carries14 marks.
Write a C program using function to find the decimal equivalent of a binary
number.
Illustrate sorting of the following elements using bubble sort (ascending)
21, 32, 45, 14,67,8, 54,9
What are the file I/O functions in C? Explain about the task performed by each
function.
Describe the output generated by the following program
#include
int a=3;
fun(int x)
{ at=x;
return(a);
}
void امتهم )
{ int i;
for(i=1 ;i<=6;++i)
{ a=fun(i);
printf(““%od”,a);
}
}
Write a C program to copy the content from one file to another file.
When fopen() is not able to open a file, what it returns? Explain in brief.
मम मं मर
Page 2 of 2
(5)
(3)
(5)
(3)
(4)
(4)
(5)
(3)
(4)
(4)
(6)
(8)
(8)
(6)
(10)
(4)