8
SET - 1 MCA (Revised) Term-End Practical Examination December, 2009 03788 MCSL-017 : C AND ASSEMBLY LANGUAGE PROGRAMMING Time allowed : 2 hours Maximum Marks : 50 Note : There are two parts (C Programming and Assembly Language Programming) in this paper. Each part is for 1 hour duration. Attempt only that part(s) in which you are not successful as yet. Make suitable assumptions, if any. PART - I C Programming Note : Answer the following question. It carries 20 marks. 5 marks are for viva-voce on this part. 1. Write and run a program in C having the following functions : 20 A function to input a string into an array. You may assume the maximum size of such string to be 10 characters. The string may be of any length upto 10 characters. A function that finds the characters at the middle of the string, for example, if the string is 'ABC' then middle character is 'B' and if the string is 'ABCD' then the middle characters are BC. Write the appropriate main () function that demonstrates the use of the two functions. Make and state suitable assumptions, if any. MCSL-017/ S1 1 P.T.O.

Dec-09-017

Embed Size (px)

DESCRIPTION

Dec-09-017

Citation preview

  • SET - 1MCA (Revised)

    Term-End Practical Examination

    December, 2009 03788

    MCSL-017 : C AND ASSEMBLY LANGUAGE PROGRAMMING

    Time allowed : 2 hours Maximum Marks : 50

    Note : There are two parts (C Programming and Assembly Language Programming)in this paper. Each part is for 1 hour duration. Attempt only that part(s) inwhich you are not successful as yet. Make suitable assumptions, if any.

    PART - IC Programming

    Note : Answer the following question. It carries 20 marks. 5 marks are for viva-voce on this part.

    1. Write and run a program in C having the following functions : 20A function to input a string into an array. You may assume the maximum size ofsuch string to be 10 characters. The string may be of any length upto 10 characters.A function that finds the characters at the middle of the string, for example, if thestring is 'ABC' then middle character is 'B' and if the string is 'ABCD' then themiddle characters are BC.Write the appropriate main () function that demonstrates the use of the twofunctions. Make and state suitable assumptions, if any.

    MCSL-017/ S1 1 P.T.O.

  • PART - IIAssembly Language Programming

    Note : Answer the following question. It carries 20 marks. 5 marks are for viva-voce of this part.

    1. Write and run a program in 8086 assembly language that sorts three numbers stored in 20the consecutive memory locations in the ascending order. The sorted numbers shouldbe stored into the memory. Make and state suitable assumptions, if any.

    - o 0 o -

    MCSL-017/ S1 2 6,000

  • SET - 2MCA (Revised)

    Term-End Practical Examination

    December, 2009 03426

    MCSL-017 : C AND ASSEMBLY LANGUAGE PROGRAMMING

    Time allowed : 2 hours Maximum Marks : 50

    Note : There are two parts (C Programming and Assembly Language Programming)in this paper. Each part is for 1 hour duration. Attempt only that part(s) inwhich you are not successful as yet. Make suitable assumptions, if any.

    PART - IC Programming

    Note : Answer the following question. It carries 20 marks. 5 marks are for viva-voce on this part.

    1. Write and run a program in C having the following functions : 20An input function that requests the user to enter two numbers in the range1 to 1000. The function makes sure that the numbers entered by the user are inthe given range.A function that evaluates the Greatest Common Divisor (GCD) of the two numberspassed to this function.Write and run the appropriate main () that uses the two functions such that theGCD of the two input numbers is calculated and printed.

    MC SL-017/ S2 1 P.T.O.

  • PART - IIAssembly Language Programming

    Note : Answer the following question. It carries 20 marks. 5 marks are for viva-voce on this part.

    1. Write and run a program in 8086 assembly language that finds the sum of two unpacked 20single digit BCD numbers. You may assume that the numbers are stored in AL andAH registers. The resultant is converted to equivalent ASCII and stored in the memory.

    - o 0 o -

    MCSL-017/ S2 2 4,000

  • SET-3MCA (Revised)

    Term-End Practical ExaminationDecember, 2009 01086

    MCSL-017 : C AND ASSEMBLY LANGUAGE PROGRAMMING

    Time allowed : 2 hours Maximum Marks : 50

    Note : There are two parts (C Programming and Assembly LanguageProgramming) in this paper. Each part is of 1 hour duration. Attemptonly that part(s) in which you are not successful as yet.Each part has one compulsory question carrying 20 marks. 5 marks arefor viva-voce of that part.Make suitable assumptions, if any.

    PART - IC Programming

    1. Write and run a C program having the following functions : 20

    A function to convert lower case alphabtes in the string to upper case alphabets.(Write your own function).A function to count the number of vowels in the string.Write and run the appropriate main () that accepts the string from the input, usesthe functions written by you and outputs the upper case string and the numberof vowels

    MCSL-017/ S3 1 P.T.O.

  • PART - IIAssembly Language Programming

    1. Write and run a program using 8086 assembly language that squares each digit of a 202-digit packed BCD number, and then adds the two squares. You may assume that thetwo digit BCD number is stored in memory location. The result is left in the DX register.

    - o 0 o -

    MCSL-017/ S3 2 3,000

  • SET - 4

    MCA (Revised)Term-End Practical Examination

    December, 2009 01461

    MCSL-017 : C AND ASSEMBLY LANGUAGE PROGRAMMING

    Time allowed : 2 hours Maximum Marks : 50

    Note : There are two parts (C Programming and Assembly Language Programming)in this paper. Each part is of 1 hour duration. Each part has onecompulsory question Carrying 20 marks and 5 marks are for viva-voce onthat part. Make suitable assumptions, if any.

    PART - I

    C Programming

    1. Write and run program in C that has the following functions : 20An input function that allows input of a 3 x 3 matrix.

    A function that adds two matrices.Write and run the appropriate main ( ) that uses the input function to input twodistinct matrices, and uses the second function to add the matrices. The resultantmatrix is then output.

    MCSL-017/ S4 1 P.T.O.

  • PART - II

    Assembly Language Programming

    1. Write a program in 8086 assembly language that counts the number of alphabet "a" in 20a given string. You may assume that the string is of 10 characters long and is stored inthe memory. The result is left in the AL register.

    - o 0 o -

    MCSL-017/ S4 2 2,000

    Dec-09-017-S1.pdf (p.1-2)Dec-09-017-S2.pdf (p.3-4)Dec-09-017-S3.pdf (p.5-6)Dec-09-017-S4.pdf (p.7-8)