0% found this document useful (0 votes)
86 views4 pages

Practical 1 (OOP)

This document outlines a practical assignment in an Object Oriented Programming Using C++ course. The assignment involves developing 2 programs using constants, variables, arithmetic expressions, and data type conversion to exhibit problem solving skills. The programs aim to develop skills in defining and declaring constants and variables, using data type conversion, compiling, debugging, and executing programs. Relevant outcomes include writing, compiling, debugging and executing simple C++ programs using the given concepts. Sample questions related to the concepts are provided to ensure achievement of the identified course outcomes.

Uploaded by

Sajjan Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views4 pages

Practical 1 (OOP)

This document outlines a practical assignment in an Object Oriented Programming Using C++ course. The assignment involves developing 2 programs using constants, variables, arithmetic expressions, and data type conversion to exhibit problem solving skills. The programs aim to develop skills in defining and declaring constants and variables, using data type conversion, compiling, debugging, and executing programs. Relevant outcomes include writing, compiling, debugging and executing simple C++ programs using the given concepts. Sample questions related to the concepts are provided to ensure achievement of the identified course outcomes.

Uploaded by

Sajjan Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Name :Chauan aiianShankKa

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 :

Develop C+ programs to solve broad-based


próblems
1. Define and declare constants and variables.
Use data type conversion.
Compile the program.
Debug and execute the program.

IV Relevant Coursé Outcome(s) . i. :


Develop C++ programs to solve problems using Procedure Oriented Approach..

Practical Outcome (POs)


Write/ Compile/ debug Execute simple C++ program using constants,
variables, arithmetic expressions and data type conversion.

VI Relevant Affective domain related Outcome(s)


Select proper programming environmentin C+.
2. Follow ethical practices.
VII Minimum Theoretical Background
C++ Basic Input/Output:
C++ 1/O operation is using the stream concept. Stream is the sequence of bytes or flow of
data. It makes the performance fast. If bytes flow from main memory to device like
PTinter, display screen, or a network connection, ete, this is called as output operation. If
bytes flow from device Jike printer, display screen, or a network connection, etc to main
memory, this is called as input operation.

Maharashtra state Board of Technical Education


Object Oriented Programming Using C++(22316)
VIII Resources required
Remarks
Quantity
Sr. Name Specification
No Resource
1. Hardware Computer (13-15
preferable), RAM

Computer minimum 2 GB and


Systemi : onwards, HDD 40GB and As per batch For all
above size Experiments

Operating Windows /LINUX


system
Turbo C+ Version 3.0
or any
Software
other

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

XI Result (Output of the Program)


*°******°**********e"eo *

.. A.AXNI..... ISQT..

XII Practical Related Questions


Note: Below given are few sample questions for reference. Teacher must design
more such questions so as to ensure the achievement ofidentified CO.

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.)

1. Constant variables can be created in Ct+ by using


a. const b. #define d. Both a& b d. None of these

2. State output of the following code:

#include <iostream. h>


void main ()

typedef int num;


num a =10, b =15;

Maharashtra state Board of Technical Education


Object Oriented Programming Using C++ (22316)
mun C a tb . a b;
Cout < C;

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

4 Which of the following statement is not true about preprocessor directives?


a) These are lines read and processed by the
preprocessor b) They do not produce any code by
themselves
c) These must be written on their own
linedThey end with a semicolon

XIII Exercise

Attempt Q1 or Q2 and Q.3 a or b from the following:


Note: Use Point VII' to X and XI to XV for all relevant programming exercise use
blank pages provided or attach more pages if needed.)

1. Write a Ct+ program to evaluate the following expressions:


b+yb4ac _-b-b4ac
2a 2a
2.Write a C++ program to demonstrate the use of operator precedence.

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.

Maharashtra state Board of Technical Education


Object Oriented Programming Using C++(22316)
a) #include<iosteam. h
#include<conio.h>
The P will be
void main ())
y.5
Clrscr (); Deccuse When eg'n
float r e s
float fl =15.5, f2=2; fes-Cind)f1/(ind
res ( i n t ) fl/(int) f2 ;
Cout<<res<Kendl; Convers
res= (int) (f1/f2) ;
Coutk<res<<endl;
loading yalue trdo tnt
res f1/f2, Bame ol| nappef o t
Coutk<res; Det
getch ();. resinlt
P CA/4
ther
onuer3I0 Ce Olp_(3 CuN
(Space for Answers)
ocng yalue.
*****************°**°*°*°***°*****°°** °°° *°*******°°*****.*** *° **
*****************°************°****
***************** *°°* *****°*°* **° *°***°°°*°*..°°°* * ********* *** ***
*** **°** ***************** ************
*...Ae.KConiQ.b...
*****°***°*** *** ***************°************ ***********
.MO.d..MLLO.. **** °°° **° ** °°
****°°°
*°******************°* ** ***

************* ***
***
****
°**********°*°*°******°° °** *°°**°°°*°*°°* *°°*°*°*°***°e
°*°*****************~***"************************* ***** ***** *******

**°****°°°°

*******************°*******************************.
co°*°**************°*************A*************** '******************************************
*******°.o00ad
******************************
*°°**** .
...}.°.° ****.°******°* *********************************************

****°*** ...a2 ....... *** ******°*********** ***************** **

....vfp........ ..
* *
***. **°***** *°*
***********
*** *******. 2. .2. ..anS..2O. ****
*******°****
***. ****
**°*******°****

4 erecoocoeooo .)......
***************°*** ****************".
***°*****

.
**********************
**********
.qedh. .. . *
**************************************** *
** *
*. .** ** *

****
. * *** *°****** ***
MY
***"******************* . ... .....
****:****************** ***** **

...*
***********************
*******************"****************°************°..
************ ** . * ***
********** **

. .
************************
***********************°*************. .
*****
*********°**°*******
°****°****************************** ******************* ** . .**** **** ******
. ***** ************ ****
************
YY********************** ***
.* ..

*********
... ... . *** *****
*************** ******* ********
******** *
*

.** .
***
*** f
************> ******

********* ******* *
. *******
****************°**********"****"********* . ...
****************"***************
***********************.**** ..** *********
******** ******

Maharashtra state Board of Technical Education

You might also like