interview

¡Supera tus tareas y exámenes ahora con Quizwiz!

how to reverse linked list

-Break the linked list into two parts - first node and rest of the linked list. -Call reverse function for rest of the linked list. -Link rest and first. -Change the head pointer.

how does c++ allocate memory

Memory in c++ is dived into 2 parts: the stack and heap stack: All variables declared inside the function will take up memory from the stack. heap: This is unused memory of the program and can be used to allocate the memory dynamically when program runs.

difference between mongodb and sql

MongoDB is used to save unstructured data in a JSON format and has flexible schemas unlike SQL

difference between stack and queue

Stack and Queue both are the non-primitive data structures. The main differences between stack and queue are that stack uses LIFO (last in first out) method to access and add data elements whereas Queue uses FIFO (First in first out) method to access and add data elements.

what are stack and heap allocation

The stack − All variables declared inside the function will take up memory from the stack. The heap − This is unused memory of the program and can be used to allocate the memory dynamically when program runs. stack is a linear data structure whereas heap is a hierarchal data structure. stack memory will never be fragmented. Heap is fragmented as blocks of memory are first allocated and then freed. stack can only access local variables while heap allows you to access global variables

what multiple inheritance?

a feature of c++ where a child class can inherit properties and features from more than one parent classes

what is blackbox testing

aka behavioral testing, its software testing without having knowledge of any internal code structure or internal paths. Its entirely based on specifications and requirements and focuses on input and output

difference between string buffer and string builder

buffer is thread safe and synchronized and slower and builder is not thread safe and not synchronized and faster

Construct a temperature class that includes where the temp was taken, units of measurement (Kelvin, Celsius, Fahrenheit) what the resting temp is, and how much the individual's temp normally fluctuates. Given those, you have to determine if the person has a fever.

code

Design a system that administers medication at a specific time given specific requirements.

code

difference between extend and implemented keywords

implements means you are using the elements of a Java Interface in your class. extends means that you are creating a subclass of the base class you are extending

what is dynamic allocation?

memory allocated on the fly or during run time. the exact amount of data space does not need to be known in advanced

difference between malloc and new

new calls the constructor of a class whereas malloc does not because of this malloc is typically faster. new is an operator and can be overloaded while malloc is a function and and cannot overloaded

difference between static and dynamic binding

static happens at compile time and dynamic happens at run time. static binding can be achieved using normal function calls, while dynamic can be achieved using virtual calls

why is c++ still relevant

C++ is the fastest and most predictable language today, its closer to hardware so its easier to use in embedded systems, easy to learn

what is multilevel inheritance?

when a class is derived from another class or a class has more than one parent class


Conjuntos de estudio relacionados

Accounting Chapter 8 before final

View Set

GI, Chapter 47: Management of Patients With Intestinal and Rectal Disorders, Prep U--Ch. 47: Mgmt of Patients With Intestinal and Rectal Disorders

View Set

Ch. 48 Skin integrity and Wound Care

View Set

#2 Checkpoint Exam: Network Access

View Set