Question Paper


B. Sc  DEGREE EXAMINATION

C Programming


Time: 3 Hrs                                                                                         Maximum: 80 Marks


Part A (Short Answer Questions)
Answer All, Each question carries 1 mark

1.          List the important features of C programming language?
2.          What are relational operators?
3.          Explain what is an array?
4.          How an integer array variable may be declared in C?
5.          Write down an example for an unconditional branch statement in C?
6.          Explain what are strings?      
7.          What are header files?
8.          What is sizeof( ) function?
9.          What are translator programs?
10.      Why C is known as a case sensitive language?
                                                                                                                   (10 x 1=10)
Part B (Brief Answer Questions)
Answer Any Eight, Each question carries 2 marks
11.  Define what are flowcharts?
12.  Explain what are decision making statements?
13.  Explain the break statement in C.
14.  Explain what are primary data types?
15.  What are pointers? Explain.
16.  Explain the role of C Pre-processor.
17.  What are global variables?
18.  What are multi-dimensional arrays? Give an example.
19.  What is meant by call by reference function call?
20.  Differentiate between scope and life of a variable?
21. What are macro expansions in C?
22. What is feof() function?
                                                                                                                   (8 x 2=16)
Part C (Short Essay Type Questions)
Answer Any Six, Each question carries 4 marks
     23. Write a program to find the largest number in an array?
     24. What is a nested if statement?
     25. Explain the syntax of do- while loop?
     26. Explain gets() and puts() functions?
     27. What is dynamic memory allocation?
     28. How implicit type conversion and explicit type conversions takes place  in C?
     29. Write a program to swap two numbers.
     30. What are recursive functions?
     31. Explain any two built-in string handling functions?
                                                                                                                        (6 x 4 = 24)
Part D (Long Essay Type Questions)
Answer Any Two, Each question carries 15 marks
     32. Write a program to find the sum of all elements in an MxN matrix?
     33. Differentiate between Structures and Unions?
     34. Write a program to find the count of odd and even numbers in an array of n numbers?
     35. Differentiate between built-in and user-defined function with necessary examples?
                                                                                                                        (2 x 15 = 30)

!!!!!!!!!!!!!!!!!!!%%%%%%%%%%%%%%%%%%%%!!!!!!!!!!!!!!!!!

C PROGRAMING
Part A (Answer All; each carry ONE mark )

1.      Explain how an array is declared?
2.      What are decision making statements?
            3.      Write down the statements required to make w point to a variable containing a value 32.
4.      Draw the flowchart representation of while loop.
5.      List the main features C programming language.

Part B  (Answer Any Six; each carry TWO marks )

6.      What are the advantages of using functions in program writing?
7.      What is a nested for loop?
8.      Explain the steps for making a function call?
9.      Explain the strcmp( ) function?
10.  What are pointers? Explain.
11.  Write a program to swap two numbers using pointer variables.
12.  Explain the switch statement.
13.  Write a program to count the occurrence of character ‘e’ in a string?

Part C        (Answer Any Two; each carry FOUR marks )

14.  Differentiate between built-in function and user-defined function with necessary examples?
15.  Write a program to find the largest and second largest number from a set of n numbers?

16.  Set a loop that repeats exactly ten times and outputs the result; CAP# 1, HAT# 2, CAP# 3, HAT# 4, CAP# 5, HAT# 6 , CAP# 7, HAT# 8, CAP# 9, HAT#10.

!!!!!!!!!!!!!!!!!!!%%%%%%%%%%%%%%%%%%%%!!!!!!!!!!!!!!!!!

IV Semester  I Internal Examination February. 2013

C Programming

Time: 1hour                                                                    Weight: 10

PART A


1.      Which of the following is a translator program?
      a) Windows XP b) Compiler c) Linux d) Assembly Program
2.      ------- is a loop statement?
      a) switch b) while c) while- do d) none of these
3.      --------- is a logical operator?
4.      a) && b) %  c) <= d) ++
                                                                                                                        (weight: 1)
     State True or False

5.      C is case sensitive language.
6.      break is an unconditional branch statement.
7.      C is NOT the native language of UNIX OS.
8.      Header file contains definitions of functions
                                                                                                                        (weight: 1)


PART B
(Answer any TWO)

9. Explain what are primary data types?
10. What are the key features of C programming language?
11. Define what is an Array?                                                                             (weight: 1)
                                               
PART C
(Answer any ONE)

12. What is a nested if statement?
13. Explain the syntax of for loop?
                                                                                                                        (weight: 2)
PART D
(Answer any ONE)
14. Write a program to find the number of elements above and below the average in an array of n numbers?
15. Briefly explain the decision making statements in C?
                                                                                                                        (weight: 4)

========================================================================


INTERNAL EXAMINATION

PART A

1. How many bit are assigned for a float data type variable?
a) 8 b) 2 c) 1 d) 16 

2. Which is the relational operator?
a)  &&  b) ++   c) !=  d) ?: 

3. Which a Decision Making  statement?
a) break b) continue c) if-else d) return 

4.  Which statement declares a integer array ?
a)  int mn[[20] b)  int mn[i]  c) int mn(10)  d)     int mn<10>                               (weight:1)

5. break statement is used in the programs for -----------.
6. --------- instruction permits to select one from  a number of statements.
7. --------- the conditional operator in C.
8. --------- an example for a header file.                                                                       (weight:1)


PART B
Answer Any Two

11. Write a program to swap two numbers.
12. Explain what are decision making statements?
13. Explain what is an array? How an array integer array  is initialized?       (weight:1 Each)

PART C
Answer Any One

14. Explain what is switch statement?  Give an example.  
15. What are the  loop statements supported in C?.                                                     (weight: 2)

PART D
Answer Any One

17. Write a short note on data types in C?
18. Write a program  to find the largest and smallest  number in an array?                      (weight:4)
           

No comments:

Post a Comment