Professional Documents
Culture Documents
SAI MADHAN
MCA | SEMESTER 1
REGISTER NO: 190951144
January - 2019
MCSL-017: C and Assembly Language Programing
Assignment Code
MCA (1)/L017/Assignment/2018-19
MCSL-017: C Programing and Assembly Language Lab
Problem Statement
To create a Banking Application to minimize workloads and ensure
record maintainability and to provide faster services.
Application Features
This application allows employees to
A. Create Accounts for customers
B. View Account details of a customer
C. Modify/Update customer details
D. Delete Records
Source Code
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
/* Structure declaration */
struct Account
{
char CustomerName[50];
long int AccountNo;
char AccountType[15];
char Phone[12];
MCSL-017: C Programing and Assembly Language Lab
char Address[100];
char NomineeName[50];
long Balance;
char JoinDate[12];
};
/* main( ) function */
void main()
{
int choice;
while(1)
{
fflush(stdin);
gets(records[pos].JoinDate);
printf("Account Creation successful");
}
case 4:
printf("\n Enter the address of customer : ");
fflush(stdin);
gets(records[i].Address);
break;
/* Update name of the nominee */
case 5:
printf("\n Enter the name of nominee : ");
fflush(stdin);
gets(records[pos].NomineeName);
break;
/* Update account balance */
case 6:
printf("\n Enter the current account balance : ");
fflush(stdin);
scanf("%ld",&records[pos].Balance);
break;
default:
printf("Wrong Input");
}
Printf(“success!”);
break;
}
}
if(count == 0)
printf("\n Record not found !");
MCSL-017: C Programing and Assembly Language Lab
}
pos--;
printf(“Success!”);
break;
}
}
if(count == 0)
printf("\n Record not found !");
}
Sample Output
1. Creating Account
Enter address of Customer: No.1, Xyz Street, z area, Chennai, Tamilnadu, India
Contact Address : No.1, Xyz Street, Zyx area, Chennai, TamilNadu, India
Success!
4. Delete Record
Success!
No Records found!
MCSL-017: C Programing and Assembly Language Lab
Assembly Language
DATA SEGMENT
Source Code
data segment
a dw 1234h
b dw 5678h
c dd ?
data ends
code segment
assume ds:data, cs:code
start:
mov ax,data
mov ds,ax
mov ax,a
mov bx,b
mul bx
mov word ptr c,ax
mov word ptr c+2,dx
int 3
code ends
end start
MCSL-017: C Programing and Assembly Language Lab
Source Code
data segment
a db 09h
b db 02h
c dw ?
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov al,a
mov bl,b
add al,bl
mov c,ax
int 3
code ends
end start
MCSL-017: C Programing and Assembly Language Lab
Source Code
MOV AL, 10
BYTE_VALUE DB 1500 ; A byte value is defined
WORD_VALUE DW 300 ; A word value is defined
ADD BYTE_VALUE, 65 ; An immediate operand 65 is added
MOV AX, 45H ; Immediate constant 45H is transferred toAX