You can Download Chapter 9 Input Output Operators Questions and Answers, Notes, 1st PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.
Karnataka 1st PUC Computer Science Question Bank Chapter 9 Input Output Operators
1st PUC Computer Science Input Output Operators One Mark Questions and Answers
What is a stream?
A stream is an object, where a program can either insert or extract characters to/from it.
Give the classification of streams.
- Input streams
- Output streams
What is an input stream?
Input stream is a sequence of characters from any input device like a keyboard which is inserted to the program of a computer.
What is an output stream?
Output stream is a sequence of characters taken out from the program to output device like a monitor, or printer.
What is meant by stream extraction?
cin is used in conjunction with >> operator, known as extraction or get from the operator.
What is meant by stream insertion?
cout is used in conjunction with << operator, known as insertion or put to the operator.
Give the syntax of cin statement.
Syntax: cin >> variable.
Give the syntax of cout statement.
Syntax: cout<< expression or manipulator
What is cascading in I/O operations?
The cascading is a way to extract/insert multiple values from/into more than one variable using one cin/cout statement.
How is cascading useful in output operations?
The cascading allows the user to use cout once only but use << operator several times to output many values.
What are manipulators?
A manipulator in C++ is used to control the formatting of output and/or input values.
Give an example for manipulator.
end1 is a manipulator.
1st PUC Computer Science Input Output Operators Five Marks Questions and Answers
Describe I/O operator.
1. Input Operator:
The statement cin>> num;
is an input statement and causes the program to wait for the user to type in a number. The operator >>is known as extraction or get from the operator. It takes the value from the keyboard and assigns it to the variable on its right.
2. Output Operator:
The statement cout<< “ the numbers”;
uses the cout identifier that represents the standard output stream ( screen) in C++. The operator < – Sounds incomplete -Author.
A manipulator is a C++ is used to control the formatting of output and/or input values. Manipulators can only be present in input/output statements. The end1 manipulator causes a newline character to be output. end1 is defined in the <iostream> header file and can be used as long as the header file has been included.
Explain input and output cascading with an example each.
The multiple use of << or >>in a one statement is known for cascading.
Cascading of output operator ( >>):
cout<<“ Hello “<<“ ISC
cout<< “Value of B=”<< b;
Cascading of input operator (>>):
cin >> n1 >> n2 >> n3 ;