LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE & COMPUTER. APP.
FIRST SEMESTER – APRIL 2012
CS 1501/CA 1501/CS 1500 – PROGRAMMING IN C
Date : 02-05-2012 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
Answer ALL the Questions: (10 X 2 = 20 Marks)
- Define Identifier.
- What are unary operators?
- What is the purpose of the getchar function?
- What is the use of goto statement?
- State the advantage of using function in a program.
- Define Arguments.
- What is pointer?
- List out the difference between structure and union.
- What is the primary advantage to using a data file?
- List out the file – type specifications.
PART – B
Answer ALL the Questions: (5 X 8 = 40 Marks)
- a) Explain about the data types available in C with suitable example.
(OR)
- b) Explain the four basic types of constants in C.
- a) What are the commonly used input/output functions in C? How they are accessed?
(OR)
- What is the purpose of do-while statement? How does it differ from the while statement.
- a) Write a recursive C program to find the factorial of a given number.
(OR)
- Write a C program to perform matrix addition.
- a) Explain about passing pointers to function with an example.
(OR)
- Explain about structures and its applications.
- a) Write about creating a data file with an example.
(OR)
- b) Explain any two input/output operations used in file.
PART – C
Answer any TWO Questions: (2 X 20 = 40 Marks)
- a) Discuss in detail about the steps involved in computer programming. (10 marks)
- Explain the various operators in C with example. (10 marks)
- a) Explain in detail about the various looping statement in C. (10 marks)
- Write a C program to swap the values using pointers. (10 marks)
- a) How will you pass structure to function? Explain with a suitable example. (10 marks)
- b) Explain about opening and closing a Data file with an example. (10 marks)
Latest Govt Job & Exam Updates: