Pages

Sunday, October 13, 2013

CSE (Programming Language) 1st semester examination, 2012



B.Sc (HONS.) IN CSE1, FIRST SEMESTER EXAMINATION, 2012
CSE-112
(Programming Language)
Time -3houts
Full mark-80
[N.B.-the figure in the right margin indicate full mark. Answer any four questions. Proper sequence of answer must be maintained.]
1. (a) what is programming language? Write down some salient feature of C.
   (b) Explain the basic structure of a C program.
   (c) Briefly explain the different form of main () function used in C.
  (d) Write a program to find the area of a circle. (Use  as a symbolic constant)  




 2. (a) What are the difference types of operators used in C? Write a C program to swap the values of two integers using bitwise exclusive or operator.
(b) why do we need to use # include <math.h> and # include <c type.h> statement in C program.
(c ) Describe the process of explicit conversion of data types in C.
(d) Consider the following conditional Statement:-
If (a>b)
   X=a;
                                                                             else
x=b
Produce an equivalent code segment using a ternary operator pair “?:”.
3. (a) what is an array? What are the basic difference between an array and a structure?
   (b) With example show how can declare and initialize two dimensional arrays.
   (c) Write a program to find the n-th Fibonacci series.
  (d) What is null statement? What are the purposes of null statement?
4. (a) what are the different types of loops  C have? Describe a for  loop using general format and flow-chart.
  (b) produce an equivalent code segment using for loop for the following code segment:
SUM=0
n=1;
While (n<=10)
{
SUM = SUM+n*n;
N=n+1
}
Print ƒ (“SUM = %d\n”, SUM);
(c) what are the uses of continue and break in  C?
(d) Describe infinite loops & time loops with example.
(e) What do you mean by call by value and call by reference? Give example.
5. (a) what is an array? How can you overcome the limitation of arrays using structure?
  (b) Describe any four of the string handling functions briefly.
  (c) Write a C program to test whether a given string is a palindrome or not.
  (d) How can an array be explicit initialize at run time? What are purpose of a memory management functions malloc () and calloc ()?
6. (a) Describe the elements of a user defined function.
   (b) What is the difference between union & structure?
  (c) What is a pointer? Declare a pointer variable and initialize it.
   (d) Write a C program to create a file name INPUT. Which will takes some characters from the terminal and then it will read data from INPUT file and will display in the output screen.                                                                                        
                                                                                                                                                                                                                     

0 comments:

Post a Comment