I have some simple C++ questions, they're for review for an interview I have tomorrow as Sr. Engineer at some company...

I have some simple C++ questions, they're for review for an interview I have tomorrow as Sr. Engineer at some company, I was wondering how good of programmers are actually on Sup Forums and if you could actually answer them.

What is a Singleton?


What is a forward declaration in C++?


What is multiple inheritence and when would you use it?


What is Composition?


What is an Abstract class?


Why would you use an Interface instead of Inheritence?


What is the difference between Public, Protected, and Private?


What does the Inline keyword mean?


What is an Array. What is a Vector (in C++)?


What is a Vector (in game development)?


what is a Array in Unreal?


What is a Map in C++?


For vectors: What is a Dot Product? When would you use it?


What is a Cross Product? When would you use it?


Given one node in a linked list, determine if the list is circular.

Other urls found in this thread:

en.wikipedia.org/wiki/Singleton_pattern
en.wikipedia.org/wiki/Composite_pattern
en.cppreference.com/w/cpp/language/inline
twitter.com/SFWRedditImages

>what is a horrible language

Google it you stupid fuck, this is all shit you’d learn in the first 2 semesters of programming courses or your first 20K lines of code.

Give me the HR contact and your name so I can tell them just how dumb and under qualified you are.

>taking your career barely seriously enough to ask Sup Forums to spoonfeed you basic knowledge

Most of these questions aren't even related to C++. You don't stand a chance OP. Some of these are basic high school math questions.

I know this is bait but for anyone else,
When a company wants to ask you these shitty
niche questions rather than just ask to see your github, it should be a hard pass on that company.
They're not worth the hassle and they don't know what they're doing.

>What is a Singleton?
Something that's worthless
en.wikipedia.org/wiki/Singleton_pattern

>What is a forward declaration in C++?
Something that shouldn't really should be need in 2018 if the compiler would just fucking scan for all the definitions and implicitly forward declare them before processing them.

>What is multiple inheritence
When you inherit from multiple classes, duh.

>and when would you use it?
When you want polygamous behavior but beware of incest.

>What is Composition?
en.wikipedia.org/wiki/Composite_pattern

>What is an Abstract class?
Class with virtual methods undefined.

>Why would you use an Interface instead of Inheritence?
Less bullshit.

>What is the difference between Public, Protected, and Private?
Pants, Panties, and Penis.

>What does the Inline keyword mean?
File local scope. May be inline by the compiler, may not.

>What is an Array. What is a Vector (in C++)?
A wrapper in of C-style array that don't decay into pointers.
A dynamically allocated array.

>What is a Vector (in game development)?
What the fuck? Why would you say "in game development"?
In math, it's an element in a vector space.
In physics, it's a quantity with direction.
In other places, it's a direction to approach some thing or problem or some direction where some thing/problem/attack can come from.

>what is a Array in Unreal?
How the fuck do I know.

>What is a Map in C++?
A gay name for dictionary/hash table.

>For vectors: What is a Dot Product? When would you use it?
An inner product. When needed.

>What is a Cross Product? When would you use it?
A gay thing physicists invented for vectors in R^3. When dealing with physics mostly.

>Given one node in a linked list, determine if the list is circular.

std::map< decltype(node), size_t > node_map;//need to break the loop for lists with sub-cycles
for(auto n=node; !n; n=n->next){
if(++node_map[n]>1) break;
}
if(node_map[node]==2)

>knows about compilers
>doesn't know what a C++ vector or even a fucking array is
i'm so confused

>Something that shouldn't really should be need in 2018

*Something that really shouldn't be needed in 2018

good post

why did you do his homework? Now he'll never learn and just come back and ask for you to do his homework every fucking time.

Then this braindead cunt is going to get an interview for a job he doesn't deserve and potentially take it away from someone because the project manager likes him better than a programmer that knows his head from his ass.

Fuck.

>believing OPs story
>believing anything written on Sup Forums
Everything here is a work of fiction.

the last question is the only acceptable one though.
What kind of shit company is this?

Good post, but singleton has its use, even though very limited.

>What is a Singleton?
>What is multiple inheritence and when would you use it?
>What is Composition?
>What is an Abstract class?
>Why would you use an Interface instead of Inheritence?
>What is the difference between Public, Protected, and Private?
>What does the Inline keyword mean?
>What is a Vector (in game development)?
>what is a Array in Unreal?
>For vectors: What is a Dot Product? When would you use it?
>What is a Cross Product? When would you use it?
>Given one node in a linked list, determine if the list is circular.
Not C++ questions.

>as a Sr. Engineer
Show me your engineer degree.

are you serious

are these really senior questions?

lmao what

All this shit is easy, OP is a faggot

I doubt if anyone in this thread can answer what inline means for real.

Inline means a lot of things.
en.cppreference.com/w/cpp/language/inline

Inline always always means the same thing: vague linkage.

The only exception to this I can think of immediately is inline namespaces.

>What is a Singleton?
STOP

nobody does OOP anymore

>nobody
sure

>singletons can only be OOP

Templates and SFINAE is what the kool kidz use today.

in procedural programming they're called "global variables"

singleton is just "we don't have global variables, but this object is used everywhere so we only have one of it"

it's a crutch so you can use globals without it being global lexically

Those are all easy questions
If you took some time, you could answer all of them.

>what is static initialisation order