Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

KUMAON ENGINEERING COLLEGE, DWARAHAT

IInd Class Test, B. Tech.- Ist year, Branch- EC1


Time allowed: 2 hour

FOC

Maximum Marks: 60

Note: Attempt ALL questions. All questions carry equal marks.


1. Attempt any FOUR parts of following:

(54=20)

(a) Explain various Data types in C with suitable examples ?


(b) What are the different Storage Class? Write a function in C to show the uses of Static Storage
Class?
(c) Write a program in C to swap the contents of two variables without using any other variable?
(d) What are arguments to main ()? Describe it with an appropriate example?
(e) To check whether a given number is Prime or not?
2. Attempt any FOUR parts of following:
(54=20)
(a) What is Recursion in C programming? Write a program to print Fibonacci series of n numbers
using recursion?
(b) How functions are used to support Modular Programming in C? Explain the following terms
with a sample program
(i) Function Declaration (ii) Function Calling-call by value, call by reference.
(c) What is an Array? How Two Dimensional Array are represented in C?
(d) Write a C program to add two given Matrices of dimensions m*n (where m & n >10) to
produce a third matrix?
(e) What are Structure and Union data type in C? How they are used? How their elements are
accessed? Explain with an example?
3. Attempt any two parts of following:
(52=10)
(a) Write a C program to find out Armstrong numbers between 1 to n where n is a real number?
(b) To implement a Calculator which do all arithmetic operation using SWITCH-CASE?
(c) Write a C program which read the name, marks & roll no of student in a structure and arrange
them in descending order of marks obtained?
4. Attempt any two parts of following:
(52=10)
(a) How a String is represented in C? Write a program in C to find if a String is palindrome (same
if read from beginning or end) ?
(b) What are Structure Pointers? Write a C program passing Structure to a function?
(c) What are Standard Streams in C? How a Stream are differ from a file ? Describe the following
file system basics using suitable examples
(i) fprintf() (ii) fscanf() (iii) fread() (iv) fwrite()
.

You might also like