@avneet12284

You just need to know the answer not consider new careers

@mojit3217

This Interview: Structs in C++
- You asked the candidate if a function can be defined in a struct.
- The candidate said that structs are only used for pure data.
- You corrected him by saying that functions can be defined in a struct, but they are typically used for pure data.
- This means you acknowledged both what is possible and what is common practice.


Another Interview: Stack Data Structure in C++
- You asked the candidate, where is a Stack data structure stored?
- The candidate said that a Stack data structure can be stored in either Stack memory or Heap memory.
- You responded by saying that a Stack data structure is stored only in Stack memory.
- The candidate's answer is correct. A Stack data structure is possible to be stored in Stack memory or Heap memory. However, you asserted that a Stack data structure is only stored in Stack memory.


Your responses are inconsistent, in the first case, you allowed for both possibilities (what is possible vs. what is typical), but in the second case, you dismissed one possibility entirely.

@Bonnbon8

Struct members are public by default, while class members are private by default other than that they are functionally the same.

@Teodor-n1d

Memory allocations: Structs are allocated on the stack, whereas classes are allocated on the heap.

OOP characteristics: Structs cannot perform inheritance based operations whereas classes can do that

Performance: Structs are faster in terms of memory allocation/deallocation speeds and execution, but limited in memory scope, due to the stack size limitations.

@johanmilterjakobsen1627

Depends on the language. Would like to see you define a function in a C struct, and obviously it cannot be a pointer to a function, since that isnt what is meant by the question asked in the video

@MajesticQT

saying you should consider a new career if you don't know this is just bad ragebait, do better man

@rogerioalves1581

In C++ struct members are public by default while in a class the members are private by default. In pure C (not C++) structs are only an aggregated data type, a collection of data items and doesn't support function declarations, however you can declare function pointers inside structs to kinda simulate this. So saying that "you still define functions inside a struct" in C++ Yes, in pure C No.

@chankayau

indeed quite weird that c++ hv struct and class to confuse people

@timalk2097

struct is a value type while class is a reference type (C#)

@shazzya6698

I used to like this fool then for some reason after he got his new job his arrogance and ego has gone through the roof. Unsubscribing.

@zepredos7743

iirc struct is an aggregate but class is not

@RafaelMoreno-k2w

bros cooked

@carlosduque5174

Structs default to public, classes default to private

@Shashwat-f5n

Access modifiers and inheritance

@TheExtrudeDude

Sayid from Lost lookin ahhh., Other dude Anthony Davis lookin ahhhh