LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
FIRST SEMESTER – APRIL 2012
CS 1503/CA 1503 – PROGRAMMING IN C
Date : 28-04-2012 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
Answer ALL questions: (10×2=20 marks)
- Define variable in c language.
- What is explicit conversion?
- What is the use of goto statement?
- Give two examples for entry controlled loop.
- List out any two string functions.
- Write any two advantages of user defined functions.
- What is the major difference between structure and union?
- Write any two benefits of pointers.
- What is a file?
- Mention the use of typedef.
PART – B
Answer ALL questions: (5×8=40 marks)
- a) Explain the primary datatypes of C.
(OR)
- b) Write about precedence of arithmetic operators with example.
- a) Explain for loop and whole loop with examples.
(OR)
- b) Write a C program to check the given number is prime or not.
- a) Explain about array with an example.
(OR)
- b) Write a C program to find a factorial of a number using function.
- a) Discuss briefly about operation on pointers with examples.
(OR)
- b) Write a note on user defined data types.
- a) Explain the malloc() and calloc() function.
(OR)
- b) Explain the following file handling function i) fopen() ii) facanf() iii) fclose()
PART – C
Answer any TWO questions: (2×20=40 marks)
- a) Explain the different types of operators in C.
- b) Discuss on the various forms of IF statement with an example.
- a) What is meant by parameter passing? Explain any two parameter passing methods
with examples.
- b) Explain the following i) expressions ii) unary operators iii) logical operators
- iv) header files.
- a) Explain the various preprocessor directives with examples.
- b) Explain the file oriented character I/o
Latest Govt Job & Exam Updates: