313304 OOP Manual Practical No.1 Answer

Welcome to PracticalKida, in this blog post, we solve 313304 Object Oriented Programming Using C++ OOP Manual Practical No.1 with the title Write programs to evaluate any expression using Input/Output functions.

313304 OOP Manual Practical No.1 Answer

This practical is useful for students when evaluating expressions using different types of operators and input/output functions. Students will be able to assess any expressions in the C++ program.

313304 Manual Practical No.1 Theoretical Background

Operators in C++:
An operator is a symbol that operates on a value to perform specific mathematical or logical
computations. They form the foundation of any programming language. In C++, we have
built-in operators to provide the required functionality. An operator operates the operands. For example,

int c = a + b;

Here, ‘+’ is the addition operator. ‘a’ and ‘b’ are the operands that are being ‘added’.
Different types of operators are:

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Bitwise Operators
  5. Assignment Operators
  6. Ternary or Conditional Operators

Exercise:

  • Write a C++ code to evaluate the following expression using the input-output function:
    y= 5*x-5 where the value of x is taken from the user. Find the value of y.

Answer:

  • Write a program to print the “hi” msg if the entered value is more than 10 otherwise, print the “bye” msg on the output screen. (Use of Relational operator).

Answer:

  • Write a program to print the largest number among two numbers using the Conditional operator.

Answer:

Write “C++” Code for the above exercise on the blank pages attached at the end of the practical.

Practical Related Questions

  • Write a C++ program to evaluate the following expressions: X=(-b-(b2 -4ac))/2a.

Answer:

  • Complete the following table:

Conclusion

We completed 313304 Object Oriented Programming Using C++ OOP Manual Practical No.1 in which we wrote many C++ programs and got desired output.

MSBTE Manual Answer

Suraj Diware
Suraj Diware

Hi everyone, I'm Suraj Diware, and I'm passionate about helping students succeed in MSBTE programs. This blog is dedicated to providing clear and concise explanations of MSBTE curriculum topics, along with practical tips and resources to support your learning journey.

Articles: 701

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *