LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE & COMPUTER APP.
FIRST SEMESTER – NOVEMBER 2010
CS 1501/CA 1501/CS 1500 – PROGRAMMING IN C
Date : 10-11-10 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
ANSWER ALL THE QUESTIONS: (10 x2=20 marks)
- List any two characteristics of algorithm.
- What is the difference between variable and constant?
- What is the usage of scanf? List the arguments of scanf function.
- What are the disadvantages of using unconditional control statement?
- What is call by reference?
- What is an automatic variable?
- Define Pointer
- What is the difference between union and structure?
- Give the syntax for creating a file.
- What is the significance of EOF?
PART – B
ANSWER ALL THE QUESTIONS: (5 x 8 = 40 marks)
- a) Discuss about the precedence of arithmetic operators.
(OR)
- b) Write an algorithm to find whether a given number is negative, positive or zero.
- a) Discuss about loop statements in C with example.
(OR)
- b) Explain about the control statements in C.
- a) Write note on declaration and use of arrays.
(OR)
- b) Explain about recursive function with example.
- a) Discuss about the usage of pointers for structures.
(OR)
- b) With example explain about user-defined function with example.
- a) Explain about input and output operations in data file.
(OR)
- b) Discuss the different modes of opening a file with example
PART – C
ANSWER ANY TWO QUESTIONS: (2 x 20 = 40 marks)
- a) Discuss about the different data types in C. (10)
- b) Draw the flowchart for finding the sum of 5 digits. (10)
- a) Write a C program to do matrix addition. (10)
- b) Write a C program to find whether a given string is palindrome or not. (10)
- a) Write a C program to prepare the paybill after reading the following details
from the array of structures. (10)
Details: empno, empname, basicpay, da , hra , pf
- b) Write short notes on: (10)
1) ftell 2) fseek 3) fscanf 4) fopen 5) fclose.
Latest Govt Job & Exam Updates: