Answer: FALSE
Though C++ is developed using the fundamentals of ‘C’ programming Language which is a Low Level Language, It is additionally most importantly have Object Oriented Programming (OOP’s) principle which are mainly used in developing the mobile, desktop applications.
So C++ is not a Low level language it is a High Level Programming language.
Answer: TRUE
As x and y values negative numbers, these two integer variables are stored in computer memory in 2’s compliment. The 2’s compliments of ‘x’ and ‘y’ are:
X = 1111 1111 1111 1011
Y = 1111 1111 1111 1101
Firstly, as per the precedence and associativity rule, ((y>0) || ( y ==x+2 )) will be evaluated.
Eventhough Y>0 is FALSE, Y == X+2 will be TRUE. So as a result Entire Expression is TRUE.
Next , (x<y) will be evaluated and this condition also TRUE.
So as a result Entire Expression is TRUE.
3.
Answer: TRUE
It is best practice to write all the functions before testing. This makes the testing easy.
4.
Answer: TRUE
Yes operators too take the input has parameters and returns the result of the expression.
Example:
int x=6,y=7;
x=x+y; // Here addition operator as inputs x, y and it returns result of x, y variables.
5.
Answer: TRUE
The object to the left side of the plus sign that is in case of
A + B ; expression ‘A’ is the calling object.
6.
Answer: TRUE
Inorder to write to a file in C++ program it is mandatory to create an object for ofstream class.
7.
Answer: FALSE
In order to read from the file it is mandatory to open a file using fopen() library function, this is because to read from file we have to use fread() library function for which we have to pass the File descriptor of fopen() library function.
8.
Answer: TRUE
Even though we can change the particular operator function body i.e, inside + operator function we can do division and multiplication other operations, it is not advisable or recommended.
9.
Answer: TRUE
The purpose and main intension of the Friend function is to access the private data of a class outside of it i.e, can be in other functions and classes.
10.
Answer: FALSE
The Destructor is called automatically only when the program terminates. The purpose of the class destructor is used to deallocate the memory which was allocated by the Constructor.
11.
Answer: FALSE
Though it is not mandatory to have a constructor when we are designing a class but it is highly recommended to define a constructor. This is because as part of the complex designs we may requires to use copy and parameterized constructors in that scenario it is must to define a Default constructor for each class.
12.
Answer: TRUE
Yes, array index always starts with zero. This is to ensure that array name indicates the starting address of the array.
Example:
int arr[3] ={ 1, 2, 3};
Here, arr is an array name. When we print the value of ‘’arr[0]’’ or ‘’(arr+0)’’ we will get the first value of the array i.e, 1.
Part t True er Fahe ( pts each) Tue or false? true F or fase -C++8...
C++ Assignment - Only Implementation file( VectorDouble.cpp file) required. The header file is already given. Please help, thumbs up guaranteed. Chapter 8 discussed vectors, which are like arrays that can grow in size. Suppose that vectors were not defined in C++. Define a class called VectorDoublethat is like a class for a vector with base type double. Your class VectorDoublewill have a private member variable for a dynamic array of doubles. It will also have two member variables of type...
Objectives You will implement and test a class called MyString. Each MyString object keeps track of a sequence of characters, similar to the standard C++ string class but with fewer operations. The objectives of this programming assignment are as follows. Ensure that you can write a class that uses dynamic memory to store a sequence whose length is unspecified. (Keep in mind that if you were actually writing a program that needs a string, you would use the C++ standard...
Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...
Multiple Choice Multiple Choice Section 2.1 - 2.2 Introduction to Classes Here is the start of a class declaration: class foo { public: void x(foo f); void y(const foo f); void z(foo f) const; ... Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function? A. Only x can alter the private member variables of the object that activates the function. B. Only y can alter the private member variables...
This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...
8.9 Coding lab #5: create a dynamic array ADT and a singly linked list ADT. Honor Code Your answers to this homework must be your own work.You are not allowed to share your solutions.You may not engage in any other activities that will dishonestly improve your results or dishonestly improve or damage the results of others. Plagiarism Plagiarism is when you copy words, ideas, or any other materials from another source without giving credit. Plagiarism is unacceptable in any academic environment....
The both files are included. Where are these which are colorful. Point.h and point.cpp Hor this assignment you are provided the files for a class called point. Download the h and .cpp files and include them in your project. IheじML diagram below details the class Point くくfriend>> ostream& operator.((ostream&, point&) <ごfriend::. İstream& operator:..イ1stream&-point& - : double - v doublc getX) double getYO double - sctX( double): void - set Y(double) : void - point(double-0.0, double-0.0 operator-(const point& bool perator< const...
RE-POSTED - Computer Science staff, I need this question answered. It will determine a pass or a fail. Its very imortant that this and the other questions posted are answered 100% Thank you. 13 - Template C++ Advance Please Only answer assignment if your code is 100%. When pasteing your code use text so I may copy and paste into visual studio. The code and questions must be answered 100% correct and works. Thank you. Programming Assignment Convert the int...
Santa Monica College CS 20A: Data Structures with C++ Spring 2019 Name: True/False: Circle one Assignment 1 ID: 1. True / False 2. True / False 3. True / False 4. True / False 5. True / False 6. True / False 7. True / False 8. True / False 9. True / False 10. True / False Variable and functions identifiers can only begin with alphabet and digit. Compile time array sizes can be non-constant variables. Compile time array...