Write a C++ program
Suppose you have to develop small software to assist the primary students. Write a program that will help an elementary school student learn multiplication. Use the rand function to produce two...
more
02/22/20
How do I write this program into a text file
#include <iostream>#include <fstream>#include <string>#include <cstring>#include <cstdlib>#include <iomanip>using namespace std;// global declarations for...
more
02/22/20
Why the last value appear in hexadecimal rather than decimal? c++
struct Node{ Node* next; int num;};int main(){ Node* ptr = new Node; ptr->num = 11; ptr->next = NULL; cout << ptr << " "; cout << &ptr->next << " "; cout...
more
02/20/20
Binary Math computer science
Complete Twos Compliment 8-bit Binary Math on the following expression: 25-68
02/19/20
What is the output of the code segment below? Assume all necessary libraries have been included.
fstream train;
train.open("TTR_Rules.txt", ios::in|ios::out);
char ch;
train.seekp(10, ios::beg);
train.seekg(-2, ios::cur);
train.seekp(10 + train.tellg() - 3);
train.get(ch);
cout...
more
02/12/20
Does an adjacency matrix need to have equal rows and columns?
If it needs to be the same number of rows and columns, then why? If not, then why not?
02/11/20
How do you write an appointment system in Python programming language ?
Appointment System – write a python program in which a professor can pre-populate available time slots for students to select to be advised. It can also send reminder emails to all students with...
more
02/04/20
Fibonacci Graph Program
I have to create a program that will plot on a graph the ratio between consecutive Fibonacci numbers for say 100 numbers that demonstrate the golden ratio. This is what I have: import...
more
01/09/20
Write an access function to locate an element of 2 dimensional array in fortan which uses a column major
to write an access function to find and element of two dimensional array in fortran.
01/09/20
Write an access function to locate an element of 2 dimensional array in fortan which uses a column major
to write an access function to find and element of two dimensional array in fortran.
09/30/19
What are inline namespaces for?
C++11 allows `inline namespace`s, all members of which are also automatically in the enclosing `namespace`. I cannot think of any useful application of this -- can somebody please give a brief,...
more
09/22/19
Static linking vs dynamic linking?
Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I've heard or read the following, but I don't know enough on the...
more
09/16/19
Cycles in family tree software?
I am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The problem is that the customer has two children with...
more
09/15/19
Why do people say there is modulo bias when using a random number generator?
I have seen this question asked a lot but never seen a true concrete answer to it. So I am going to post one here which will hopefully help people understand why exactly there is "modulo bias" when...
more
09/14/19
Why doesn't Java offer operator overloading?
Coming from C++ to Java, the obvious unanswered question is why didn't Java include operator overloading?
Isn't `Complex a, b, c; a = b + c;` much simpler than `Complex a, b, c; a =...
more
09/08/19
What is the effect of extern "C" in C++?
What exactly does putting `extern "C"` into C++ code do?
For example:
extern "C" {
void foo();
}
09/07/19
How to Detect if I'm Compiling Code with a particular Visual Studio version?
Is there any way to know if I'm compiling under a specific Microsoft Visual Studio version?
09/07/19
What is a "cache-friendly" code?
What is the difference between "**cache unfriendly code**" and the "**cache friendly**" code?
How can I make sure I write cache-efficient code?
09/06/19
Is inline assembly language slower than native C++ code?
I tried to compare the performance of inline assembly language and C++ code, so I wrote a function that add two arrays of size 2000 for 100000 times. Here's the code: #define TIMES 100000 ...
more
09/03/19
Give a recursive definition of a language L_bad that does not contain either three 0s or three 1s in a row.
This assumes that ∑ = {0,1}For example,101101 ∈ Lbad011110∉ Lbad
08/23/19
error: request for member '..' in '..' which is of non-class type?
I have a class with two constructors, one that takes no arguments and one that takes one argument.
Creating objects using the constructor that takes one argument works as expected. However, if I...
more
08/22/19
Does the 'mutable' keyword have any purpose other than allowing the variable to be modified by a const function?
A while ago I came across some code that marked a member variable of a class with the `mutable` keyword. As far as I can see it simply allows you to modify a variable in a `const` method:
class...
more
08/18/19
What are C++ functors and their uses?
I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?
08/16/19
What does the C++ standard state the size of int, long type to be?
I'm looking for detailed information regarding the size of basic C++ types.
I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler.
But are there any standards for...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.