
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used
in the following program jointly illustrated by the functions [I] to [IV]:
#include<iostream.h>
void Line()
{
}
void
}
void
{
}
void
{
{
for (int L=1; L<=80;L++) cout<<"-";
cout<<endl;
Line (int N)
//Fuction [II]
for (int L=1; L<=N;L++) cout<<"*";
cout<<endl;
Line (char C, A, int N)
for (int L=1; L<=N;L++)
cout<<endl;
void main()
//Fuction [I]
int A=9, B=4, C=3;
char K='#';
Line (int M, int N)
for (int L=1;L<=N;L++) cout<<M*L;
cout<<endl;
Line (K,B);
Line (A,C);
//Fuction [III]
cout<<C;
//Fuction [IV]](https://content.bartleby.com/qna-images/question/5bbab96d-3a42-4c46-9f8d-f4355578cab7/d5cf491b-b208-4791-9d89-2924f34cabb8/mufv9zs_thumbnail.jpeg)
Transcribed Image Text:Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used
in the following program jointly illustrated by the functions [I] to [IV]:
#include<iostream.h>
void Line()
{
}
void
}
void
{
}
void
{
{
for (int L=1; L<=80;L++) cout<<"-";
cout<<endl;
Line (int N)
//Fuction [II]
for (int L=1; L<=N;L++) cout<<"*";
cout<<endl;
Line (char C, A, int N)
for (int L=1; L<=N;L++)
cout<<endl;
void main()
//Fuction [I]
int A=9, B=4, C=3;
char K='#';
Line (int M, int N)
for (int L=1;L<=N;L++) cout<<M*L;
cout<<endl;
Line (K,B);
Line (A,C);
//Fuction [III]
cout<<C;
//Fuction [IV]
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Implement in C Programming 7.6.1: LAB: Simple car Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar variable that performs the following operations: Drives input number of miles forward Drives input number of miles in reverse Honks the horn Reports car status SimpleCar.h contains the struct definition and related function declarations. SimpleCar.c contains related function definitions. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 miles main.c #include <stdio.h> #include "SimpleCar.h" int main() { /* Type your code here. */ return 0;} SimpleCar.h #ifndef SIMPLE_CAR_H#define SIMPLE_CAR_H typedef struct SimpleCar_struct { int miles;} SimpleCar; SimpleCar InitCar();SimpleCar Drive(int dist, SimpleCar car);SimpleCar Reverse(int dist, SimpleCar car);int GetOdometer(SimpleCar car);void HonkHorn(SimpleCar car);void Report(SimpleCar car); #endif SimpleCar.c #include…arrow_forwardIN C++arrow_forwardprogram in C++ with the name, towers.cpp which helps to solve the Towers of Hanoi puzzle using this recursive approach. The main() routine should make a single call to the recursive member function do Towers(). This function then calls itself recursively until the puzzle is solved. Note: solve as soon as possiblearrow_forward
- Develop an algorithm and write a C++ program that counts the letter occurrence in the C-string; make sure you use call by reference to the array of a class with char and count as private member attributes when return from parse function. For the class member methods, provide the public accessor and modifier as well as print functions for the private member attributes. Write a test program that reads a C-string and displays the number of spaces, letters [a-z] [A-Z] and number of numbers [0-9] in the string. In addition to that, you need to output the histogram of the char and count array sorted by the ascii char ascending order. Here is a sample run of the program: <Output; double quote enclosure on string is required in the output> Enter a string: 2024 is coming The number of spaces in "2024 is coming" is 2 The number of letters in "2024 is coming" is 8 The number of numbers in "2024 is coming" is 4 ---- Histogram ---- Char Count space 2 0…arrow_forwardConsider the function definition: void GetNums(int howMany, float& alpha, float& beta) { int i; beta = 0; for (i = 0; i < howMany; i++) { beta = alpha + beta; } } Describe what happens in MEMORY when the GetNums function is called.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education