Sie sind auf Seite 1von 5

MANIPAL INSTITUTE OF TECHNOLOGY

(A constituent college of Manipal University, Manipal)

Manipal Karnataka 576 104

DEPARTMENT OF MASTER OF COMPUTER APPLICATION


LABORATORY MANUAL Department Laboratory : Master of Computer Application : System Programming And Microprocessor Lab (MCA 531) Semester & branch Name of the faculty No of contact hours/week : 3rd Semester, MCA : Archana.H :3

Submitted by: MRS. ARCHANA H

(Signature of the faculty) Date:22/07/2011 Approved by: Dr. Krishnamoorthi Makkithaya

(Signature of HOD) Date:

LIST OF PROGRAMS
PART A SYSTEM PROGRAMMING WEEK 1 Introduction to LEX. Structure of LEX program. 1) Write a lex program to display HELLO when the user presses the enter key. 2) Write a lex program to display your name taken as input along with a message when the enter key is pressed. 3) Write a lex program to check whether the given input is a number, word or a special character. WEEK 2 4) Write a lex program to count the number of a) Positive and negative integers b) Positive and negative decimals 5) Write a lex program to count number of characters, words, lines and spaces in a given string. 6) Write a lex program to count the vowels and consonants in the given string. 7) Write a lex program to accept the language anbm where n>=0 and m>=1. Optional a) Write a lex program to check whether the given sentence is simple or compound b) Write a lex program to implement a calculator. WEEK 3 8) Program to recognize a valid arithmetic expression and identify the identifiers and operators present. Print them separately. 9) Write a lex program to count the number of characters, words, spaces and lines in a given input file. 10) Program to recognize and count the number of identifiers in a given input file. WEEK 4 11) Write a lex program to count the number of printf and scanf statements in a valid c program and replace respectively with write and read statement.

12) Write a lex program to count the number of comment line and tab space in a given c program. Also eliminate the comment and copy that program into a separate file. WEEK 5 Introduction to YACC. 13) Write a yacc program to display GOOD MORNING when morning is typed. 14) Write a yacc program to test the validity of an arithmetic expression. WEEK 6 15) Write a yacc program to evaluate a given arithmetic expression. 16) Write a yacc program to recognize valid identifiers. 17) Write a yacc program to recognize the language anbn, n>=0. WEEK 7 18) Write a yacc program to identify a valid if statement or if-then-else statement. 19) Write a yacc program to check validity of a simple c program and also valid loop structure in it. WEEK 8 20) Program to recognize strings aaab, abbb, ab and a using the grammar (am bn, m>0, n>=0). 21) Program to recognize the grammar (anb, n>=10). PART B MICROPROCESSOR WEEK 9 22) Write a program to add two 8/16 bit numbers. 23) Write a program to illustrate the use of subtract instruction. 24) Write a program to multiply two 8 bit numbers and two 16 bit numbers. 25) Write a program to perform a) 16 bit/8 bit division b) 32 bit/16 bit division Optional a) Write a program to compare two bytes and check whether they are equal or not.

WEEK 10 26) Write a program to find the sum of first N numbers. 27) Write a program to find the Factorial of a given byte. 28) Write a program to find the sum of all elements in a word array. 29) Find the Minimum And Maxmimum byte in an array of bytes. 30) Find the GCD and LCM of two given bytes. Optional A) Find the number of odd and even elements in a given byte array B) Write a program to search for a particular element in a given array using Linear Search WEEK 11 31) Write a program to compare two Strings and check whether they are equal or not. 32) Write a program to reverse a given String and check whether it is Palindrome or not. 33) Write a program to search a character in a String. Optional a) Write a program to count the number of Alphabets, Digits and Special Characters in a given String. b) Write a program to convert Uppercase Characters to Lowercase and Vice Versa in a given String containing Upper And Lower Case Characters, as well as some Special Characters WEEK 12 34) Compute the Factorial of a positive integer N using procedure. 35) Write a program to accept a line of text and display using dos function. Optional a) Write a program to accept password from the user and then validate and display. b) Write a program to check the keyboard status.

WEEK 13 End Semester Examination

LAB EVALUTION
INTERNAL EVALUATION - 60 marks System Programming - 40 marks Microprocessor - 20 marks 6 evaluations done on alternate weeks. Each evaluation includes: Execution 3 marks Documentation 5 marks Viva - 2 marks Total - 10 marks END SEMESTER EXAM TOTAL MARKS - 40 marks - 100

INSTRUCTIONS TO STUDENTS
1) Students should be regular and come prepared for the lab practice. 2) In case a student misses a lab, it is his/her duty to complete the missed program. 3) Students should bring the observation book, lab manual and prescribed text book and class notes regularly. 4) They should implement the program individually. 5) The program they write should meet the following criteria a) Program should be interactive with appropriate prompt messages, error messages and descriptive messages for outputs. b) Comments should be used at appropriate places. c) Use meaningful names for variables and functions. d) Program title and output should be clearly written. 6) Once the execution is over, they should show the program and results to the instructor and copy the same in the observation book. 7) Questions for lab tests and exam need not necessarily be limited to the questions in the manual, but could involve some modification or combinations of the questions.

Das könnte Ihnen auch gefallen