QI: Answer all of the following: 1- If the following lines of code have errors, correct them; otherwise, write "no errors." int a-10: int b_"5: cont<

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 1TF
icon
Related questions
Question
i need the answer quickly
QI: Answer all of the following:
1- If the following lines of code have errors, correct them; otherwise, write "no errors."
int _a=10:
int b_=5:
cout<<_a--b_):
2- Return by value is better than return by reference. (True, False or It depends on the case)
3- Write lines of code to define a global variable in C++,
4- Modify the following lines of code to display 1 five times only.
while itrue) (
cont<<"1";
C++
5- Why do we use user-defined functions in C++?
Transcribed Image Text:QI: Answer all of the following: 1- If the following lines of code have errors, correct them; otherwise, write "no errors." int _a=10: int b_=5: cout<<_a--b_): 2- Return by value is better than return by reference. (True, False or It depends on the case) 3- Write lines of code to define a global variable in C++, 4- Modify the following lines of code to display 1 five times only. while itrue) ( cont<<"1"; C++ 5- Why do we use user-defined functions in C++?
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr