Question

Give examples of each of the following: Insertion Operator Extractor Operator Input filestream object Output filestream...

Give examples of each of the following:

Insertion Operator

Extractor Operator

Input filestream object

Output filestream object

Class

Preprocessor command

Directive

Function

Function call

Argument

Assignment statement

Assignment operator

Data type

Declaration statement

Instantiation statement

Three types of repetition structure (statement)

Two types of selection structure

Condition for a selection structure or repetition statement


Homework Answers

Answer #1

Insertion Operator : cout<<"Hello World";

Extractor Operator : cin>>num1;

Input filestream object : ifstream ifs;

Output filestream object : ofstream ofs;

Class : class Student{}

Preprocessor command : #include

Directive : #include<stdio.h>

Function : void fun(int a){}

Function call : fun();

Argument : fun(10);

Assignment statement int x=10;

Assignment operator =

Data type : int

Declaration statement : int x;

Instantiation statement : int x =10

Three types of repetition structure (statement):
while

do while
for
Two types of selection structure
if else
switch

Condition for a selection structure or repetition statement
if(num<10)
for(int i=0;i<10;i++)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
13) An output file stream object (ofstream) receives data and formatters using the stream insertion operator...
13) An output file stream object (ofstream) receives data and formatters using the stream insertion operator << in exactly the same way that the cout object does. True or False 14) The result of a read operation on an input file stream (ifstream) object is a boolean value indicating if the read succeeded or failed. True or False 15) A file stream object must be closed by the program after all the necessary reads or writes are completed. True or...
For each of the following Python programs P and input strings I, give the output P(I),...
For each of the following Python programs P and input strings I, give the output P(I), using the formal definition of P(I) given, and employing any reasonable reference computer C: Definition of P(I), the output of a Python program. Let P be a Python program with respect to a reference computer system C. Suppose P has main function M, and let I be a string of ASCII characters that will be used as input to P. The output of P...
4. The _____ case is performed by the switch statement if a match is not found...
4. The _____ case is performed by the switch statement if a match is not found default first second otherwise Answer: 5. When three relational expressions are joined by OR (||) operators, there must be at least _____ of the relational expressions that evaluate to true for the logical expression to evaluate to true. one two three none of the relational expressions evaluate to true Answer: 6. Which of the following items is an acceptable first character in a Java...
Lab Objectives This lab was designed to inforce the following programming concepts: • Using classes to...
Lab Objectives This lab was designed to inforce the following programming concepts: • Using classes to create a data type SimpleCalculator capable of performing arithmetic operations. • Creating const member functions to enforce the principle of least privilege. The follow-up questions and activities also will give you practice: • Using constructors to specify initial values for data members of a programmer-defined class. Description of the Problem Write a SimpleCalculator class that has public methods for adding, subtracting, multiplying and dividing...
IntNode class I am providing the IntNode class you are required to use. Place this class...
IntNode class I am providing the IntNode class you are required to use. Place this class definition within the IntList.h file exactly as is. Make sure you place it above the definition of your IntList class. Notice that you will not code an implementation file for the IntNode class. The IntNode constructor has been defined inline (within the class declaration). Do not write any other functions for the IntNode class. Use as is. struct IntNode { int data; IntNode *next;...
You are asked to implement a C++ class to model a sorted array of unsigned integers....
You are asked to implement a C++ class to model a sorted array of unsigned integers. The class is to be used in an embedded application that cannot assume the presence of the STL. The array has to be dynamically allocated in such a way that allows programmers using it to specify the required size. Your class should should: (1) provide the appropriate constructors and destructor; (2) provide methods for updating, and showing numbers in/to the array (e.g., to be...
In c++ create a class to maintain a GradeBook. The class should allow information on up...
In c++ create a class to maintain a GradeBook. The class should allow information on up to 3 students to be stored. The information for each student should be encapsulated in a Student class and should include the student's last name and up to 5 grades for the student. Note that less than 5 grades may sometimes be stored. Your GradeBook class should at least support operations to add a student record to the end of the book (i.e., the...
Which of the following is least applicable in black box testing? A) Specification of the system...
Which of the following is least applicable in black box testing? A) Specification of the system B) Understand the environment in which the software will be deployed C) Source code D) Use cases Which of the following “quality dimensions” are applicable for WebApps: A) usability, performance, interoperability B) security, maintainability, navigability C) content, structure, function D) all of the above An objective of content testing is: A) to uncover syntactic errors (e.g., typos, grammar mistakes) in text-based documents, graphical representations,...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
c++ Program Description You are going to write a computer program/prototype to process mail packages that...
c++ Program Description You are going to write a computer program/prototype to process mail packages that are sent to different cities. For each destination city, a destination object is set up with the name of the city, the count of packages to the city and the total weight of all the packages. The destination object is updated periodically when new packages are collected. You will maintain a list of destination objects and use commands to process data in the list....