LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
|
FIRST SEMESTER – November 2008
CS 1501 / 1500 – PROGRAMMING IN C
Date : 10-11-08 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
ANSWER ALL THE QUESTION: 10×2=20 Marks
- What is the significance of conditional operator?
- What is the difference between ++I and I++
- What are the control characters used in scanf() function?
- List the disadvantage of using Goto statement.
- Write a function declaration for the following specification:
The function has to return a float value
The arguments are int,char,int
- Write a note about automatic variables
- What is call by value?
- Mention any two usages of pointer.
- What are the different file opening modes in C?
- What is an unformatted data file?
PART – B
ANSWER ALL THE QUESTION: 5 x 8 = 40 Marks
11 (a) Write down the fundamental data types in C Language..
(Or)
(b) Explain logical operators, conditional operator with example.
- (a)Explain about the switch –case statement with an example.
(Or)
(b) Write a program finding the factorial of a given number.
13 (a) Find out the diagonal sim of a given 3×3 matrix.
(Or)
(b) Write a C program to find the second largest in the given array.
14.(a) Discuss about structure with a suitable example.
(Or)
(b) Explain the difference between call by value and call by reference.
- (a) Discuss in detail opening and closing a data file with example.
(Or)
(b) Explain about the file related functions.
PART C
ANY TWO QUESTION: 2 x 20 = 40 Marks
- (a) Write a down the stages of algorithm development with an example.
- (b) Explain loop structures in C.
- (a) Explain about storage classes in C.
- (b) Explain about function in detail
- (a) Explain in detail about pointers.
- (b) Write a C program to create a file with the following details.
Empname, empid, basicpay
Prepare a pay bill with 7% pf and 10% DA
Latest Govt Job & Exam Updates: