How To Exam?

a knowledge trading engine...


Banaras Hindu University (BHU) 2005 M.C.A -102: Introduction to Programming Language Through C - Question Paper

Thursday, 17 January 2013 05:05Web


MCA (Semester I)
exam 2004-2005
MCA-102: Introduction to Programming Language Through C


MCA (Semester I) Examination 2004-2005 MCA-102: Introduction to Programming Language Through C

Time: Three hours    Maximum Marks: 70

Note: Answer Five Questions in all, including Question No.1, which is compulsory.

Figures on the right-hand side margin indicate Max Marks for each Question.

1. Answer all the parts:    (3+3+4+4=14)

(a)    What are High Level Programming Languages? Give two examples. What are the benefits of using High Level Programming Languages?

(b)    What will be the value of K in the following C expression? Given num=30.

K = (num>5?(num<=10?100:200):500)

(c)    What is an Abstract Syntax Tree? Construct the Abstract Syntax Tree for the Infix expression: b*b-4*a*c.

(d)    What will be the output of following C Programme?

main()

{

int i=1, j=1; for ( ; ; )

{

if (i>5)

break;

else

j+=1; printf (\n %d, j); i+=j;

}

}

2. (a) What are Compilers and Interpreters? How are they different? Give two examples (7) each of Compiled and Interpreted languages.

(b) Differentiate between Call by value and Call by reference methods of parameter (7) passing to a function giving an example of each.

3.    (a) What do you mean by Scope of a variable? Differentiate between Global and (7)

Local Scope of variables giving an example of each.

(b) Explain with examples the syntax & working of following C constructs:    (7)

while do.....while, For.....

4.    (a) What are Storage classes in C? Explain the method of declaration and working of (7)

the four storage classes in C.

(b) What is recursion? Write a recursive function in C to compute the Factorial value (7) of an integer. The Factorial of an integer n is defined as n X (n-1)X (n-2)X.....X1.

5.    (a) Define an Array? Write a Programme in C to sort an array of integers in ascending (7)

order.

(b) What is a pointer variable? How is a Pointer Variable declared? How is the    (7)

address of a variable determined? How pointer can be used to pass an entire array to a function in C?

6.    (a) Explain the usage of following Console I/O functions in C:    (7)

scanf ( ), printf ( ), getch ( ), getche ( ), getchar ( ), gets ( ), puts ( ).

(b) Write a Programme in C to copy one file to another. The Programme should read (7) the filenames at command line.

7.    Write short notes on any two of the following:    (7 X 2 = 14)

(a)    Structured Programming.

(b)    C preprocessor.

(c)    Structures and unions in C.

(d)    Strings & String Functions in C.











Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Banaras Hindu University (BHU) 2005 M.C.A -102: Introduction to Programming Language Through C - Question Paper