Saturday, March 21, 2009

Fundamental questions of C++

The following are the initial questions asked by a technical recruiter for a good project in C++. Have a look and hope this helps.

What is the difference between an ARRAY and a LIST?

-->Array is collection of homogeneous elements.
-->List is collection of heterogeneous elements.

-->For Array memory allocated is static and continuous.
-->For List memory allocated is dynamic and Random.

-->Array: User need not have to keep in track of next memory allocation.
-->List: User has to keep in Track of next location where memory is allocated.

-->Array uses direct access of stored members
-->List uses sequencial access for members.

//With Array you have direct access to memory position 5
Object x = a[5]; // x takes directly a reference to 5th element of array

//With the list you have to cross all previous nodes in order to get the 5th node:
list mylist;
list::iterator it;

for( it = list.begin() ; it != list.end() ; it++ )
{
if( i==5)
{
x = *it;
break;
}
i++;
}

What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

-->Virtual

What are 2 ways of exporting a function from a DLL?
1.Taking a reference to the function from the DLL instance.
2. Using the DLL ’s Type Library

What is the difference between Mutex and Binary semaphore?

semaphore is used to synchronize processes. where as mutex is used to provide synchronization between threads running in the same process.


STL Containers - What are the types of STL containers?
There are 3 types of STL containers:

1. Adaptive containers like queue, stack
2. Associative containers like set, map
3. Sequence containers like vector, deque



Describe two ways where you can prevent a class from being instantiated.

--> Declare all static methods/functions.
--> Declare a private constructor.

Difference between DELETE, TRUNCATE and DROP statements in SQL

--> DELETE
- DML statement
- used to remove rows from a table
- WHERE clause can be sued to remove only some rows.
- After performing DELETE operation you can commit or rollback the transaction to make the change permenant or undo it.
- This operation will cause all TRIGGERS on table to fire.

--> TRUNCATE
- DDL statement
- removes all rows from a table
- operation cannot be rolled back and no triggers will be fired.
- TRUNCATE is faster and doesn't use as much undo space as DELETE.

--> DROP
- DDL statement
- removes a table from a database
- all the tables' rows, indexes and privileges will also be removed.
- No DML triggers will be fired.
- Operation cannot be rolled back.

From Oracle 10g a table can be undropped.
FLASHBACK TABLE emp TO BEFORE DROP
Flashback Complete

12 comments:

Unknown said...

Good
python training in bangalore
python online training

Saro said...

Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.

rpa Training in Chennai

rpa Training in bangalore

rpa Training in pune

blueprism Training in Chennai

blueprism Training in bangalore

blueprism Training in pune

rpa online training

shalinipriya said...

This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Data Science training in marathahalli
Data Science training in btm
Data Science training in rajaji nagar
Data Science training in chennai
Data Science training in kalyan nagar
Data Science training in electronic city
Data Science training in USA
Data science training in pune

simbu said...

Impressive. Your story always bring hope and new energy. Keep up the good work.

java training in tambaram | java training in velachery

java training in omr | oracle training in chennai

java training in annanagar | java training in chennai

Mounika said...

Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
python training in pune
python online training
python training in OMR

ummayasri said...

It is better to engaged ourselves in activities we like. I liked the post. Thanks for sharing.
Blueprism online training

Blue Prism Training in Pune

sathya shri said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.

angularjs Training in chennai
angularjs-Training in pune

angularjs-Training in chennai

angularjs Training in chennai

angularjs-Training in tambaram

raybon said...

Useful information.I am actual blessed to read this article.thanks for giving us this advantageous information.I acknowledge this post.and I would like bookmark this post.Thanks

devops online training

aws online training

data science with python online training

data science online training

rpa online training

subha said...

Woah this blog is wonderful i like studying your posts. Keep up the great work! You understand, lots of persons are hunting around for this info, you could help them greatly. keep it up
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai

Joyal said...

I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
Oracle Training | Online Course | Certification in chennai | Oracle Training | Online Course | Certification in bangalore | Oracle Training | Online Course | Certification in hyderabad | Oracle Training | Online Course | Certification in pune | Oracle Training | Online Course | Certification in coimbatore

lavanya said...

I have read your blog and I gathered some new information through your blog. Thanks for sharing the information
Java training in Chennai

Java Online training in Chennai

Java Course in Chennai

Best JAVA Training Institutes in Chennai

Java training in Bangalore

Java training in Hyderabad

Java Training in Coimbatore

Java Training

Java Online Training

Devi said...

Excellent information with unique content and it is very useful to know about the information based on blog. oracle training in chennai