Practical 1 (OOP)
Practical 1 (OOP)
Roll No:10
nrolment No:2ool180 124
Ohiect Oriented P'rOgramming Using C ++
(22316)
Practical No. 1:
Develop minimum 2 programs using
arithmetic expression, constants, variables,
operators, exhibiting data type conversion.
Practical Significance:
The dcclaration of constants and variables facilitates the evaluation
arithmetic expressions in real life of
The data type conversion helps in real life problems.
of evaluation of
arithmetic problems to get the accurate results
expressions.
Relevant Program Outcomes
1. Basic (POs)
knowledge: Apply knowledge of basic mathematics, sciences and
engineering to solve the broad-based basic
2. Discipline knowledge: Apply Computer engineering problem,
knowledge to solve core computer Computer engineering discipline specific
3. engineering
Experiments and practice: Plan to perform
related problems.
results to
solve.broad-based experiments and practices to use the
4. Computer engineering probfems.
Engineering tools:
Apply relevant Computer technologies and tools with
understanding of the limitations. an
5.
Communication: Communicate effectively in oral and written form.
Competency and Practical skills
This practical is expected to deveiop the following skills in you :
IX Precautions
1. Handle computer system and peripherals with care.
2. Follow safety practices.
Resources used
Specificati
S. No. Name of Resource
Computer System hp 280 GZ-, 1 processot
with broad specifications
Software urbo C
Any other resource usedi
10Qle chiome
.. A.AXNI..... ISQT..
Note: Use Point VIII to X and XIIl to XV for all relevant programming exercise use
blank pages provided or attach more pages if needed.)
3. Regarding following statement which of the statements is true? const int a = 100;
a) Declares a variable a with 100 as its initial value
b) Declares a construction a with 100 as its initial
value cHDeclares a constant a whose value wili be
100
d) Constructs an integer type variable with a as identifier and 100 as value
XIII Exercise
3. Complete thegiventable:_
Program Code Write& justify Qutput
a) #include<iostream. h>
#define PI 3.14159 YP=196
i n t main () Justtt-UaUue o is2
f l o a t r = 2;.
float circle;
circle = 2 * PI * r;
hence mupiccdton o
cout K< cirCle; hre yalue Uadue
return 0;
2 otI be 2S5
his ts assqmed fo
Uar igbe cifde.
************* ***
***
****
°**********°*°*°******°° °** *°°**°°°*°*°°* *°°*°*°*°***°e
°*°*****************~***"************************* ***** ***** *******
**°****°°°°
*******************°*******************************.
co°*°**************°*************A*************** '******************************************
*******°.o00ad
******************************
*°°**** .
...}.°.° ****.°******°* *********************************************
....vfp........ ..
* *
***. **°***** *°*
***********
*** *******. 2. .2. ..anS..2O. ****
*******°****
***. ****
**°*******°****
4 erecoocoeooo .)......
***************°*** ****************".
***°*****
.
**********************
**********
.qedh. .. . *
**************************************** *
** *
*. .** ** *
****
. * *** *°****** ***
MY
***"******************* . ... .....
****:****************** ***** **
...*
***********************
*******************"****************°************°..
************ ** . * ***
********** **
. .
************************
***********************°*************. .
*****
*********°**°*******
°****°****************************** ******************* ** . .**** **** ******
. ***** ************ ****
************
YY********************** ***
.* ..
*********
... ... . *** *****
*************** ******* ********
******** *
*
.** .
***
*** f
************> ******
********* ******* *
. *******
****************°**********"****"********* . ...
****************"***************
***********************.**** ..** *********
******** ******