Loyola College B.Sc. Computer Science April 2008 Programming In C Question Paper PDF Download

LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

           B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE

BH 1

FIRST SEMESTER – APRIL 2008

CS 1501 – PROGRAMMING IN C

 

 

 

Date : 07-05-08                  Dept. No.                                        Max. : 100 Marks

Time : 1:00 – 4:00

 

PART – A

Answer ALL the Questions:                                                                        (10 x 2 = 20 marks)

 

  1. Give the structure of a ‘C’ program.
  2. List any 4 standard library functions in ‘C’.
  3. What is the difference between the Operators = and = = ?
  4. Explain Scanf() and Printf() functions.
  5. How arrays are declared and initialized?
  6. What do you mean by recursion?
  7. What is a pointer? How is it initialized?
  8. What is the major difference between structure and union?
  9. What does passing by reference mean?
  10. Give the general syntax of the following:
  1. Open statement
  2. Close statement

PART – B

Answer ALL the Questions:                                                                          (5 x 8 = 40 marks)

 

  1. a) List and explain the rules that are to be followed while defining variables. Give examples.
  1. b) What are the relational and logical operators in ‘C’?
  1. a) Write a program for selecting largest of three values using a nested if …else statement.

(OR)

  1. b) Give the general form of switch statement and explain with an example.
  1. a) Distinguish between automatic, external and static variables.

(OR)

  1. b) Write a recursive function to generate the nth Fibonacci number.
  1. a) What do you mean by Self-referential structure?

(OR)

  1. b) Write a program using pointers to compute the sum of all elements stored in an array.
  1. a) Write a C program to accept student’s information and save it into a file ‘student.dat’.

(OR)

  1. b) Write a note on unformatted data file.

PART – C

Answer any TWO Questions:                                                                      (2 x 20 = 40 marks)

 

  1. a) Discuss the steps involved in programming.                                               (4)
  1. b) What are the data types available in ‘C’? (8)
  2. c) What are the loop control structures available in ‘C’? (8)
  1. a) Write a program that will read a text and count all occurrences of a particular word. (10)
  1. b) Write a program to perform Matrix Multiplication. (10)
  1. a) Write a Program that reads in an array of numbers and calculates and displays the row and column sums, as well as the grand total. Place the sum next to their respective rows and columns.            (10)
  1. b) Write Short notes on:
  • Function Prototypes (3)
  • User defined data types (3)
  • Strings (2)
  • Break Statement (2)

 

Go To Main Page

Loyola College B.Sc. Computer Science Nov 2008 Programming In C Question Paper PDF Download

LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

   B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE

NA 01

 

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

 

  1. What is the significance of  conditional operator?
  2. What is the difference between ++I and I++
  3. What are the control characters used in scanf() function?
  4. List the disadvantage of using Goto statement.
  5. Write a function declaration for the following specification:

The function has to return a float value

The arguments are int,char,int

  1. Write a note about automatic variables
  2. What is call by value?
  3. Mention any two usages of pointer.
  4. What are the different file opening modes in C?
  5. 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.

 

  1. (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

  1. (a) Write a down the stages of algorithm development with an example.
  2. (b) Explain loop structures in C.
  3. (a) Explain about storage classes in C.
  4. (b) Explain about function in detail
  5. (a) Explain in detail about pointers.
  6. (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

 

 

Go To Main Page

© Copyright Entrance India - Engineering and Medical Entrance Exams in India | Website Maintained by Firewall Firm - IT Monteur