CSI_LAB_JOURNAL
CSI_LAB_JOURNAL
6 Function Overloading
9 Arrays in C++
12 Calculator Application
1
2
SECTION-I
C++
Programming
3
4
Program no. 1
• Write a program in c++ that adds and subtracts the given two
numbers and display the sum and difference.
Initials for
Attendance • Enter the program and verify the execution of the same on the
computer.
Source program
#include <iostream.h>
#include <conio.h>
void main ()
{
int a,b,c,d;
Completion clrscr ();
for: cout<<"Enter value of a := ";
cin>>a;
1)Source cout<<"Enter value of b := ";
Program cin>>b;
c=a+b
cout << "The sum is : -"<<c;
2) Program d=a-b
Output cout <<"\n "The difference is : -"<<d;
getch();
3) Program }
Logic
4) Questions
Signature for
completion
5
Output after execution
Enter value of a: = 7
Enter value of b: = 5
The sum is : - 12
The difference is: 2
1) Declaration of variables
2) Accept the numbers.
3) Add and subtract the numbers
4) Display the sum and difference
Questions:
6
Program no. 2
Date :
Aim : To study if else construct in C++.
…… /… /…
Problem statement
2) Program
Output
3) Program Logic
4) Questions
Signature for
completion
7
8
9
Output after execution
Questions:
Date :
Aim : To study for and do... while loop in C++.
…… /… /… Problem statement
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
11
12
13
Output after execution
Questions:
14
Program no.4
Date :
Aim : To study the switch case constructs.
…… /… /… Problem statement
• Write a program in c++ to display the day using the switch case
construct. The user will input only the day number.
Initials for • Enter the program and verify the execution of the same on the
Attendance
computer.
Source program
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
15
16
Output after execution
Questions:
Date :
Aim : To study the function and related terms in C++.
…… /… /… Problem statement
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
19
20
Output after execution
QUESTIONS:
Date :
Aim : To study the overloading of functions in C++.
…… /… /… Problem statement
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
23
24
25
OUTPUT AFTER EXECUTION
QUESTIONS:
Date :
AIM: To study the function calling methods.
…… /… /…
Problem statement
Source program
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
27
28
29
OUTPUT AFTER EXECUTION
QUESTIONS:
1) Explain the difference between call by value and call by reference method
of calling functions.
2) What is pointer in C++? Explain the operators related to that.
30
Program no. 8
FACTORIAL OF A NUMBER
Date :
Aim: To study the recursive function in C++ function.
…… /… /…
Problem statement
Source program
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
31
32
33
OUTPUT AFTER EXECUTION
QUESTIONS:
Date :
Aim: To study the array and it’s access in C++.
…… /… /… Problem statement
Source program
Completion
for:
1)Source
Program
2) Program
Output
3) Program
Logic
4) Questions
Signature
for
completion
35
36
37
OUTPUT AFTER EXECUTION
QUESTIONS:
38
SECTION II
VISUAL BASIC
PROGRAMMING
39
40
Program no. 10
AREA OF CIRCLE
Date :
AIM: To study the event procedures related to command button
…… /… /… control.
PROBLEM STATEMENT
2) Form
Design
3) Output
4) Questions
Signature
for
completion
41
FORM DESIGN
OUTPUT
QUESTIONS:
Date :
AIM: To study the iteration construct using do Loop.
…… /… /… PROBLEM STATEMENT
Completion
for:
1)Program
Code
2)Form
Design
3)Output
3) Questions
Signature
for
completion
43
FORM DESIGN
OUTPUT
QUESTIONS:
1) What is iteration construct? Explain the do and for loop in Visual Basic.
2) Write the code for above problem using for loop.
44
Program no. 12
CALCULATOR APPLICATION
Date :
AIM : To design the application and learn the event procedures
…… /… /… forming the project.
PROBLEM STATEMENT
Completion
for:
1)Program
Code
2)Form
Design
3)Output
3) Questions
Signature
for
completion
45
FORM DESIGN
OUTPUT
QUESTIONS: