<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1741088712173917145</id><updated>2012-02-16T12:25:14.877-08:00</updated><category term='splice'/><category term='size_t'/><category term='Performance'/><category term='POWERVOCAB'/><category term='calloc'/><category term='free'/><category term='Shallow copy'/><category term='use case'/><category term='second largest Array'/><category term='SIP'/><category term='String'/><category term='fgets'/><category term='static variables'/><category term='new'/><category term='QC'/><category term='DEFECT DENSITY'/><category term='printf()'/><category term='weird C'/><category term='pointer to member'/><category term='VOCABULARY'/><category term='fopen()'/><category term='virtual'/><category term='METRICS'/><category term='virtual function'/><category term='extern in C++'/><category term='insert()'/><category term='priority'/><category term='C++ iterators'/><category term='c++'/><category term='basics'/><category term='new[]'/><category term='INHERITANCE'/><category term='STL DEQUE'/><category term='fseek()'/><category term='XOR'/><category term='rand'/><category term='MAKEFILES'/><category term='Defect Management'/><category term='STL C++'/><category term='rownum'/><category term='Deep copy'/><category term='shared memory'/><category term='Array'/><category term='ADVANCE'/><category term='TYPE CASTING'/><category term='fseek'/><category term='call by reference'/><category term='sort()'/><category term='STL QUEUE'/><category term='inspection'/><category term='Load'/><category term='MAKE'/><category term='Boundary Value Analysis'/><category term='poverty'/><category term='puts'/><category term='Pipe'/><category term='this'/><category term='Sorting'/><category term='test frameworks'/><category term='test strategy'/><category term='Const'/><category term='IPHONE'/><category term='gets()'/><category term='this pointer'/><category term='call by value'/><category term='Stress'/><category term='sizeof operator C'/><category term='what is brew'/><category term='Oracle'/><category term='Router'/><category term='static variable'/><category term='realloc()'/><category term='database concepts'/><category term='delete[]'/><category term='iphones'/><category term='puts()'/><category term='Palindrome'/><category term='atoi'/><category term='shell'/><category term='charity'/><category term='Traceability Matrix'/><category term='concept'/><category term='assign()'/><category term='Telecom'/><category term='semaphore'/><category term='driver'/><category term='malloc()'/><category term='static in C'/><category term='POP3'/><category term='stub'/><category term='fputs()'/><category term='Static C++'/><category term='MACROS'/><category term='static class member'/><category term='REVIEW EFFECTIVENESS'/><category term='program'/><category term='brew'/><category term='fclose'/><category term='ITERATORS'/><category term='Algorithms'/><category term='Simulator'/><category term='Reset root password'/><category term='malloc'/><category term='Root Password'/><category term='Bug cycle'/><category term='sql'/><category term='unix'/><category term='erase()'/><category term='Joins'/><category term='srand'/><category term='exception'/><category term='Bubble Sort'/><category term='SWAP'/><category term='KEYS'/><category term='CMMI'/><category term='fputs'/><category term='$*'/><category term='Requirements Stability Index'/><category term='memory management'/><category term='random number generator'/><category term='sizeof C'/><category term='QTP'/><category term='C'/><category term='Test Coverage'/><category term='Rework Effort Ratio'/><category term='Switch'/><category term='functions'/><category term='Data Types C'/><category term='Schedule Slippage'/><category term='validation'/><category term='POP'/><category term='static in C++'/><category term='Quality'/><category term='DISTANCE'/><category term='pointers'/><category term='how to read arguments'/><category term='overloaded assignment operator'/><category term='static variable in C'/><category term='Creational Pattern'/><category term='LIST'/><category term='stdin'/><category term='Copy constructor'/><category term='software engineering'/><category term='VOCAB BUILDING'/><category term='itoa'/><category term='INLINE'/><category term='Databse'/><category term='Requirements Creep'/><category term='free()'/><category term='review'/><category term='reverse'/><category term='software quality'/><category term='Reverse String'/><category term='verification'/><category term='shell scripting'/><category term='Test plan'/><category term='how to get character positions from text file'/><category term='Data Types C++'/><category term='FAQDEN'/><category term='printf'/><category term='Schedule Variance'/><category term='random number'/><category term='unique()'/><category term='STL SWAP'/><category term='rowid'/><category term='Frameworks'/><category term='fclose()'/><category term='STL'/><category term='concepts'/><category term='extern in C'/><category term='severity'/><category term='Equivalence Partitioning'/><category term='sprintf()'/><category term='%3d'/><category term='SIP Flow'/><category term='funny C'/><category term='extern usage'/><category term='testing'/><category term='STL LIST'/><category term='clear()'/><category term='strlen'/><category term='STL MAP'/><category term='adhoc'/><category term='virtual table'/><category term='Effort Variance'/><category term='STL SET'/><category term='social'/><category term='Logical operation'/><category term='STLC'/><category term='extern'/><category term='delete'/><category term='SMTP'/><category term='commands'/><category term='LINUX'/><category term='exception handling'/><category term='static member functions'/><category term='mutex'/><category term='Fifo'/><category term='STATIC FUNCTION'/><category term='sizeof'/><category term='exploratory'/><category term='null value'/><category term='SIP communication'/><category term='Android'/><category term='Emulator'/><category term='Design Patterns'/><category term='printf C++'/><category term='database'/><category term='IPHONE APPS'/><category term='Testing Strategies'/><category term='sizeof operator'/><category term='QA EFFECTIVENESS'/><category term='Class Patterns'/><category term='process'/><category term='relloc'/><category term='static'/><category term='size_t in C'/><category term='fopen'/><category term='Data Types'/><category term='swap()'/><category term='gets'/><category term='SCRUM'/><category term='VECTOR'/><category term='size_t in C++'/><category term='root password Linux'/><category term='fgets()'/><category term='realloc'/><category term='bottom up'/><category term='%03d'/><category term='Singleton'/><category term='DEFECT REMOVAL EFFICIENCY'/><category term='STL STACK'/><category term='DRE'/><category term='FILE'/><category term='Quality Center'/><category term='command line arguments'/><category term='software testing'/><category term='db'/><title type='text'>VIIKIPEDIA</title><subtitle type='html'>Hey, my name is Viki and welcome to the "VIIKIPEDIA"</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default?start-index=101&amp;max-results=100'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>140</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-573777695679428290</id><published>2011-09-10T11:25:00.000-07:00</published><updated>2011-09-10T11:25:25.230-07:00</updated><title type='text'>THE MEGA NERD: AGILE - WHAT, WHERE, WHY (BASICS)</title><content type='html'>&lt;a href="http://themeganerd.blogspot.com/2011/09/agile-what-where-why-basics.html?spref=bl"&gt;THE MEGA NERD: AGILE - WHAT, WHERE, WHY (BASICS)&lt;/a&gt;: What Is Agile?  Agile methodology is an approach to project management used in software development. It helps teams respond to the  unpred...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-573777695679428290?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/573777695679428290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/09/mega-nerd-agile-what-where-why-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/573777695679428290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/573777695679428290'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/09/mega-nerd-agile-what-where-why-basics.html' title='THE MEGA NERD: AGILE - WHAT, WHERE, WHY (BASICS)'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6645454283576575293</id><published>2011-05-18T07:47:00.000-07:00</published><updated>2011-05-18T07:47:15.727-07:00</updated><title type='text'>WORDS-N-EXPRESSIONS: IPHONE APPS BUSINESS: AN INSIGHT FOR DUMMIES</title><content type='html'>&lt;a href="http://paragonist.blogspot.com/2011/05/iphone-apps-business-insight-for.html?spref=bl"&gt;WORDS-N-EXPRESSIONS: IPHONE APPS BUSINESS: AN INSIGHT FOR DUMMIES&lt;/a&gt;: "With the popularity of iPhone (for that matter Apple’s all other products such as iPad and iPod Touch) in the global market, the iPhone ..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6645454283576575293?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://paragonist.blogspot.com/2011/05/iphone-apps-business-insight-for.html?spref=bl' title='WORDS-N-EXPRESSIONS: IPHONE APPS BUSINESS: AN INSIGHT FOR DUMMIES'/><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6645454283576575293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/05/words-n-expressions-iphone-apps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6645454283576575293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6645454283576575293'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/05/words-n-expressions-iphone-apps.html' title='WORDS-N-EXPRESSIONS: IPHONE APPS BUSINESS: AN INSIGHT FOR DUMMIES'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-452756383337955103</id><published>2011-04-14T07:40:00.000-07:00</published><updated>2011-04-14T07:40:12.112-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMTP'/><category scheme='http://www.blogger.com/atom/ns#' term='POP'/><category scheme='http://www.blogger.com/atom/ns#' term='POP3'/><title type='text'>Difference Between SMTP and POP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There are two standards currently used for most e-mail sent today. SMTP stands for simple mail transfer protocol. POP is an acronym Post Office Protocol. Though it may sound confusing, the difference is not hard to understand. POP is a protocol for storage of email. SMTP is a protocol for sending and receiving.&lt;br /&gt;&lt;br /&gt;To give a real-world illustration, SMTP would be like a letter carrier or mailman. He or she can deliver or pick up mail for transfer to another location. POP is like a mailbox or Post Office Box. It is the location the mail is delivered to and where it stays until the recipient is ready to read it. Outgoing mail can also be put in the mailbox.&lt;br /&gt;&lt;br /&gt;&lt;span class="mContent"&gt;POP was first designed in 1984 with the idea of allowing users to access an e-mail server, retrieve messages to a local folder located on the computer, and then go offline for reading and writing replies. In part, the offline capabilities were developed at a time when logging on to the Internet was relatively expensive and users were charged per minute. Currently, most of those using the POP standard are using the third version, developed in 1988. This is often referred to as &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span class="FadeWordContainer" style="position: relative;"&gt;POP3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-452756383337955103?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/452756383337955103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/04/difference-between-smtp-and-pop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/452756383337955103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/452756383337955103'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/04/difference-between-smtp-and-pop.html' title='Difference Between SMTP and POP'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-2752589375784191086</id><published>2011-01-26T05:01:00.000-08:00</published><updated>2011-01-26T05:01:10.924-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='POWERVOCAB'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE'/><category scheme='http://www.blogger.com/atom/ns#' term='FAQDEN'/><category scheme='http://www.blogger.com/atom/ns#' term='VOCAB BUILDING'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE APPS'/><category scheme='http://www.blogger.com/atom/ns#' term='VOCABULARY'/><title type='text'>POWERVOCAB- 8 REASONS TO USE THIS VOCABULARY BUILDING IPHONE APP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today when I’m writing this post I’m really captivated for the developers (Faqden Labs) of this sensational vocabulary building Iphone app- “PowerVocab”. Yes, I did the pre-launch review for this wonderful vocabulary building Iphone app, and I’m glad that it has got no less response from the people across the globe than what was my enthusiasm at the time of writing the pre-launch review for the PowerVocab. If you are still thinking what I’m talking about you need to check this and this. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ok, if you are thinking why I’m scripting so boastfully about this just another vocabulary building Iphone application then here are my 8 reasons for using the PowerVocab-&lt;br /&gt;&lt;br /&gt;1. It’s a free downloadable vocabulary building Iphone app on the Apple Itunes store.&lt;br /&gt;&lt;br /&gt;2. PowerVocab for Iphone was downloaded 233 times in 4 days of its launch.&lt;br /&gt;&lt;br /&gt;3. It is 5/5-star rated Iphone app on Apple itunes.&lt;br /&gt;&lt;br /&gt;4. It is among the top rated Iphone app in Education category on Apple Iphone apps store.&lt;br /&gt;&lt;br /&gt;5. It’s a brain child of the highly proficient thinking minds of engineers from MIT and Cornell.&lt;br /&gt;&lt;br /&gt;6. The analytics to track the learning curves of its users has been described phenomenal.&lt;br /&gt;&lt;br /&gt;7. PowerVocab has been highly appreciated by the students preparing for GRE/SAT/CAT/GMAT vocabulary.&lt;br /&gt;&lt;br /&gt;8. The developers of PowerVocab- Faqden Labs are soon launching PowerVocab Pro for Iphone with enhanced features and PowerVocab for Android.&lt;br /&gt;&lt;br /&gt;I reckon PowerVocab to be the smartest app for learning vocab. So, go and download PowerVocab Lite for free on Apple itunes now.&lt;br /&gt;&lt;br /&gt;FAQDEN LABS- &lt;a href="http://www.faqden.com/index.html"&gt;http://www.faqden.com/index.html&lt;/a&gt; &lt;br /&gt;Read more about it- &lt;a href="http://paragonist.blogspot.com/2011/01/powervocab-8-reasons-to-use-this.html"&gt;http://paragonist.blogspot.com/2011/01/powervocab-8-reasons-to-use-this.html&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-2752589375784191086?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/2752589375784191086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/01/powervocab-8-reasons-to-use-this.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2752589375784191086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2752589375784191086'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/01/powervocab-8-reasons-to-use-this.html' title='POWERVOCAB- 8 REASONS TO USE THIS VOCABULARY BUILDING IPHONE APP'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-100725112594405792</id><published>2011-01-22T21:34:00.000-08:00</published><updated>2011-01-22T21:34:10.988-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='charity'/><category scheme='http://www.blogger.com/atom/ns#' term='poverty'/><title type='text'>OFFERING TECHNICAL SERVICES TO HELP THE UNDER PRIVILEGE CHILDREN</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;For long I’m trying to do my best to help the under privilege children here in India, but there are so many things that can be done and yet we shy away from them. So, I’ve decided to come out of the shell and to help the poor children in whatever possible way I can. I did a bit of thinking and finally I’ve come up with an idea.&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;a href="http://paragonist.blogspot.com/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://2.bp.blogspot.com/_lfigJiq8UqY/TTiJ_TDG3cI/AAAAAAAAHY8/HbUywo5CWZ4/s400/poverty.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;MY IDEA:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Since, I’m a Software Engineer I’ve decided to use my skills in that area to help the poor. I will be offering following services to the customers on a nominal price-&lt;br /&gt;&lt;ul left;?="" ms?,sans-serif;="" text-align:="" trebuchet=""&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Testing the web-applications.&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Writing testing articles.&lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Writing other technical articles like product reviews, research articles etc.&lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Testing mobile applications.&lt;/li&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Doing website reviews.&lt;/li&gt;&lt;li&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Website/application usability review and feedbacks.&lt;/li&gt;&lt;li&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;Feedback/reviews about the blog templates.&lt;/li&gt;&lt;li&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt; &lt;/span&gt;Advertising and promoting firms/products on my blog. &lt;/li&gt;&lt;li&gt;&lt;span style="font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; Providing technical resources like e-books, webcasts, links etc related to Software Testing, SQL, RDBMS, C++, Unix.&lt;/li&gt;&lt;/ul&gt;All the money made by providing above services to various customers will be used to help the poor and the under privileged children in India. Once I get the money, I’ll be posting pictures and videos on my blogs showcasing the money has been spent in the correct way for the needy.&lt;br /&gt;&lt;a href="http://paragonist.blogspot.com/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="257" src="http://3.bp.blogspot.com/_lfigJiq8UqY/TTiKNO1LWvI/AAAAAAAAHZA/U-v4ai2JOGg/s400/poverty1.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" ms?,sans-serif;?="" trebuchet=""&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;HOW YOU CAN HELP:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" ms?,sans-serif;?="" trebuchet=""&gt;I know every one of you want to see a beautiful world out there, and everyone wants to do its bit to make the world better. So, it’s quite simple to be part of this phenomenon either you avail my services or you help me spread the word. See if you want any of the above services or just see how you can get me clients. &lt;/div&gt;&lt;br /&gt;It’s just the beginning and I’m sure there will be several others who will be soon joining me. I truly believe there will be several others who will figure out their own ways to help the under privilege children. &lt;br /&gt;&lt;div class="MsoNormal" ms?,sans-serif;?="" trebuchet=""&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;LET’S NOT JUST HOPE IT TO WORK, RATHER LET’S MAKE IT WORK!!&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: blue;"&gt;Check out my other blog- &lt;a href="http://paragonist.blogspot.com/"&gt;http://paragonist.blogspot.com/&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-100725112594405792?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/100725112594405792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/01/offering-technical-services-to-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/100725112594405792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/100725112594405792'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/01/offering-technical-services-to-help.html' title='OFFERING TECHNICAL SERVICES TO HELP THE UNDER PRIVILEGE CHILDREN'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_lfigJiq8UqY/TTiJ_TDG3cI/AAAAAAAAHY8/HbUywo5CWZ4/s72-c/poverty.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-2135794999507703259</id><published>2011-01-19T11:02:00.001-08:00</published><updated>2011-01-19T11:02:51.036-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='POWERVOCAB'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE'/><category scheme='http://www.blogger.com/atom/ns#' term='FAQDEN'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE APPS'/><title type='text'>VOCABULARY BUILDING APP LIVE ON APPLE STORE</title><content type='html'>CHECK OUT THIS LINK TO KNOW MORE:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://paragonist.blogspot.com/2011/01/powervocab-is-live-on-apple-store.html"&gt;http://paragonist.blogspot.com/2011/01/powervocab-is-live-on-apple-store.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-2135794999507703259?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/2135794999507703259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/01/vocabulary-building-app-live-on-apple.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2135794999507703259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2135794999507703259'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/01/vocabulary-building-app-live-on-apple.html' title='VOCABULARY BUILDING APP LIVE ON APPLE STORE'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-8402262616302852387</id><published>2011-01-06T09:21:00.000-08:00</published><updated>2011-01-08T10:29:51.135-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='FAQDEN'/><category scheme='http://www.blogger.com/atom/ns#' term='iphones'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE APPS'/><title type='text'>COOL APP FOR VOCABULARY BUILDING</title><content type='html'>I'm always on the lookout for the great mobile apps. I found this simple and useful vocabulary building app- PowerVocab for iPhones/Androids/iPad/BlackBerry by Faqden. This app could be really useful not only to all the GMAT/GRE/SAT takers but also to all others who are striving hard to improve their vocabulary especially from a non-English speaking countries. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To know more about the PowerVocab click the photo-&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.faqden.com/product.html" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" n4="true" src="http://1.bp.blogspot.com/_lfigJiq8UqY/TSX5thiv5SI/AAAAAAAAHYA/CSTgtJZvoI4/s400/load.png" width="205" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Which are some of your favorites?&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;P.S. I got the advance copy of the app from the developers for review and it will be soon launched. So, watch out for its release in few days :) &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-8402262616302852387?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/8402262616302852387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2011/01/cool-app-for-vocabulary-building.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8402262616302852387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8402262616302852387'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2011/01/cool-app-for-vocabulary-building.html' title='COOL APP FOR VOCABULARY BUILDING'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lfigJiq8UqY/TSX5thiv5SI/AAAAAAAAHYA/CSTgtJZvoI4/s72-c/load.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-3293537536539832619</id><published>2010-12-04T11:47:00.000-08:00</published><updated>2010-12-04T11:47:47.773-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rework Effort Ratio'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>Rework Effort Ratio</title><content type='html'>&lt;strong&gt;Rework Effort Ratio&lt;/strong&gt;&lt;br /&gt;(Actual rework effort spent in that particular phase / Total actual efforts spent in that phase) * 100&lt;strong&gt; &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-3293537536539832619?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/3293537536539832619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/rework-effort-ratio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3293537536539832619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3293537536539832619'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/rework-effort-ratio.html' title='Rework Effort Ratio'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5305407719232896320</id><published>2010-12-04T11:43:00.000-08:00</published><updated>2010-12-04T11:44:41.792-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements Stability Index'/><category scheme='http://www.blogger.com/atom/ns#' term='Requirements Creep'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>Requirements Stability Index and Requirements Creep</title><content type='html'>&lt;b&gt;Requirements Stability Index:&lt;/b&gt;&lt;br /&gt;{1 - (Total number of changes /number of initial requirements)}&lt;br /&gt;&lt;br /&gt;the GOAL should be to have the Index value as 1 ideally.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Requirements Creep:&lt;/b&gt;&lt;br /&gt;(Total Number of requirements added/Number of initial requirements) * 100&lt;br /&gt;&lt;br /&gt;Ideally, the Requirements Creep should be Zero.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5305407719232896320?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5305407719232896320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/requirements-stability-index-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5305407719232896320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5305407719232896320'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/requirements-stability-index-and.html' title='Requirements Stability Index and Requirements Creep'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-718970841872750603</id><published>2010-12-04T11:30:00.001-08:00</published><updated>2010-12-04T11:31:41.203-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Schedule Variance'/><category scheme='http://www.blogger.com/atom/ns#' term='Schedule Slippage'/><category scheme='http://www.blogger.com/atom/ns#' term='Effort Variance'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>Effort Variance, Schedule Variance, Schedule Slippage</title><content type='html'>&lt;b&gt;Effort Variance:&lt;/b&gt;&lt;br /&gt;Effort Variance can be calculated as {(Actual Efforts-Estimated Efforts) / Estimated Efforts} *100.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Schedule Variance:&lt;/b&gt;&lt;br /&gt;Just like above formula it is similarly calculated as.&lt;br /&gt;{(Actual Duration - Estimated Duration)/Estimated Duration} *100&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Schedule Slippage:&lt;/b&gt;&lt;br /&gt;When a task has been delayed from its original baseline schedule then the amount of time that it has taken is defined as schedule slippage. Its calculation is as simple as.&lt;br /&gt;(Actual End date - Estimated End date) / (Planned End Date – Planned Start Date) * 100&lt;br /&gt;&lt;br /&gt;The GOAL should be to have all of them as ZERO.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-718970841872750603?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/718970841872750603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/effort-variance-schedule-variance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/718970841872750603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/718970841872750603'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/effort-variance-schedule-variance.html' title='Effort Variance, Schedule Variance, Schedule Slippage'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-2486327402475946539</id><published>2010-12-04T11:28:00.000-08:00</published><updated>2010-12-04T11:28:34.137-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DEFECT DENSITY'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>DEFECT DENSITY</title><content type='html'>Defect Density is the number of confirmed defects detected in software/component during a defined period of development/operation divided by the size of the software/component.&lt;br /&gt;&lt;br /&gt;The 'defects' are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;confirmed and agreed upon (not just reported).&lt;/li&gt;&lt;li&gt;Dropped defects are not counted.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The ‘period’ might be for one of the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;for a duration (say, the first month, the quarter, or the year).&lt;/li&gt;&lt;li&gt;for each phase of the software life cycle.&lt;/li&gt;&lt;li&gt;for the whole of the software life cycle.&lt;/li&gt;&lt;/ul&gt;The ‘size’ is measured in one of the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Function Points (FP)&lt;/li&gt;&lt;li&gt;Source Lines of Code&lt;/li&gt;&lt;/ul&gt;DEFECT DENSITY = NUMBER of DEFECTS&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------------------------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIZE&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Defect Density Uses&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;For comparing the relative number of defects in various software components so that high-risk components can be identified and resources focused towards them&lt;/li&gt;&lt;li&gt;For comparing software/products so that ‘quality’ of each software/product can be quantified and resources focused towards those with low quality.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-2486327402475946539?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/2486327402475946539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/defect-density.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2486327402475946539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2486327402475946539'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/defect-density.html' title='DEFECT DENSITY'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-3737146425271655994</id><published>2010-12-04T11:13:00.000-08:00</published><updated>2010-12-04T11:13:18.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><category scheme='http://www.blogger.com/atom/ns#' term='QA EFFECTIVENESS'/><title type='text'>QA EFFECTIVENESS OR TEST EFFECTIVENESS</title><content type='html'>QA EFFECTIVENESS OR TEST EFFECTIVENESS =&lt;br /&gt;&lt;br /&gt;Total number of internal defects X 100&lt;br /&gt;-----------------------------------------------&lt;br /&gt;Total number of defects( i.e. Internal + External)&lt;br /&gt;&lt;br /&gt;4 = Internal Defects raised by QA&lt;br /&gt;6= External defects used by User or customer&lt;br /&gt;&lt;br /&gt;QA effectiveness = 4/(4+6) x 100 = 40%&lt;br /&gt;&lt;br /&gt;Goal should be to have QA effectiveness as 100%.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-3737146425271655994?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/3737146425271655994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/qa-effectiveness-or-test-effectiveness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3737146425271655994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3737146425271655994'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/qa-effectiveness-or-test-effectiveness.html' title='QA EFFECTIVENESS OR TEST EFFECTIVENESS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4032190208263010294</id><published>2010-12-04T10:52:00.000-08:00</published><updated>2010-12-04T10:52:41.300-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DRE'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><category scheme='http://www.blogger.com/atom/ns#' term='DEFECT REMOVAL EFFICIENCY'/><title type='text'>DEFECT REMOVAL EFFICIENCY(DRE)</title><content type='html'>DRE is a measure to detect defects before delivery. It is calculated as a percentage of the defects identified and corrected internally with respect to the total defects found in the complete project life cycle. Thus, DRE is the percentage of bugs eliminated by reviews, inspections, tests etc.&lt;br /&gt;&lt;br /&gt;Our prime &lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;&lt;b&gt;Goal:&lt;/b&gt;              D.R.E. = 1.0 (100%)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;For e.g.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;(E1)Errors Found Before Delivery / Within Activity = 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;(E2) Errors Found After Delivery / After Activity* = 4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;DRE = 5/(4+5) x100= 55%&lt;/span&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4032190208263010294?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4032190208263010294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/defect-removal-efficiencydre.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4032190208263010294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4032190208263010294'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/defect-removal-efficiencydre.html' title='DEFECT REMOVAL EFFICIENCY(DRE)'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-3061476792742629348</id><published>2010-12-04T10:31:00.000-08:00</published><updated>2010-12-04T10:31:35.696-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Test Coverage'/><title type='text'>IS 100% TEST CASE COVERAGE ENOUGH??</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;The term Test Case Coverage means a measure of how many of the product requirements are being tested by the defined test cases. It is the testers’ job to define their test cases based on the requirements and the goal should be 100% coverage or close to that. Please bear in mind that 100% coverage is not the same as exhaustive testing. Exhaustive testing means testing every path through the software using all possible values. So, its very clear that even though the coverage is 100% i.e. all the requirements are covered yet there will be several other test cases that needed to be tested. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-3061476792742629348?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/3061476792742629348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/is-100-test-case-coverage-enough.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3061476792742629348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3061476792742629348'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/is-100-test-case-coverage-enough.html' title='IS 100% TEST CASE COVERAGE ENOUGH??'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-177110416356653697</id><published>2010-12-04T10:26:00.000-08:00</published><updated>2010-12-04T10:26:47.946-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='REVIEW EFFECTIVENESS'/><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>REVIEW EFFECTIVENESS</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Review Effectiveness is a bit harder to define it. But let me try and explain what I discovered from reading various articles over the internet.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;When you hold a review, say for the SRS, then you would have a total number of defects discovered and you also know the number of pages in the document. So, to first order, you could divide the total number of defects by the number of pages and derive a defect density measure for the document. But that number by itself doesn’t tell you a whole lot. You need to have a good understanding of the expected number of defects per page coming out of a review. That number would come from your historical data. But this number still doesn’t yield an effectiveness measure. You could be finding lots of minor defects in a review and the major ones are slipping through. So you have to look for defects that were missed by the review in downstream activities such as testing and other reviews.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;So, basically its really important to know two things- 1. Review Defects and 2. Testing defects.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Hence, Review Effectiveness will be =&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Total Number of Review Defects&amp;nbsp;&amp;nbsp; X 100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;-----------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Total Defects (which includes Review defects + Testing Defects)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;For e.g. there are 4 Review Defects and 5 Testing Defects.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Hence Review Effectiveness = 4/(4+5) x 100= 44%&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-177110416356653697?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/177110416356653697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/review-effectiveness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/177110416356653697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/177110416356653697'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/review-effectiveness.html' title='REVIEW EFFECTIVENESS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-250126575961406772</id><published>2010-12-04T04:18:00.001-08:00</published><updated>2010-12-04T04:18:53.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='METRICS'/><title type='text'>METRICS</title><content type='html'>&lt;div&gt;&lt;h3 style="margin: 3px; padding: 0px;"&gt;&lt;a href="http://www.authorstream.com/Presentation/santhoshpv.05-365452-metrics-spv-product-training-manuals-ppt-powerpoint/" target="_blank"&gt;Metrics_spv&lt;/a&gt;&lt;/h3&gt;&lt;object height="354" id="player" width="425"&gt;&lt;param name="movie" value="http://www.authorstream.com/player.swf?&amp;amp;pt=2&amp;amp;p=365452_634062157134023750" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://www.authorstream.com/player.swf?&amp;amp;pt=2&amp;amp;p=365452_634062157134023750" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="354"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-family: arial; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;See more &lt;a href="http://www.authorstream.com/" target="_blank"&gt;presentations&lt;/a&gt; by &lt;a href="http://www.authorstream.com/User-Presentations/santhoshpv.05/" target="_blank"&gt;santhoshpv.05&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://upload.authorstream.com/multipleupload/" target="_blank"&gt;Upload your own PowerPoint presentations&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-250126575961406772?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/250126575961406772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/12/metrics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/250126575961406772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/250126575961406772'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/12/metrics.html' title='METRICS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1424132705157411302</id><published>2010-08-28T21:26:00.000-07:00</published><updated>2010-08-28T21:26:13.215-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE'/><category scheme='http://www.blogger.com/atom/ns#' term='IPHONE APPS'/><title type='text'>ARTICLE ON IPHONE APPLICATIONS</title><content type='html'>An interesting article about the IPHONE APPLICATIONS(APPS.). Do read it here-&lt;br /&gt;&lt;a href="http://paragonist.blogspot.com/2010/08/no-halts-pleaseiphone-apps.html"&gt;http://paragonist.blogspot.com/2010/08/no-halts-pleaseiphone-apps.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1424132705157411302?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1424132705157411302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/08/article-on-iphone-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1424132705157411302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1424132705157411302'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/08/article-on-iphone-applications.html' title='ARTICLE ON IPHONE APPLICATIONS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5549363663942053415</id><published>2010-07-07T14:39:00.000-07:00</published><updated>2010-07-07T14:39:15.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software quality'/><category scheme='http://www.blogger.com/atom/ns#' term='CMMI'/><category scheme='http://www.blogger.com/atom/ns#' term='Quality'/><title type='text'>CMMI</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lfigJiq8UqY/TDTz0F3xflI/AAAAAAAAGkw/AS3Cd45LrX8/s1600/cmmi.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/_lfigJiq8UqY/TDTz0F3xflI/AAAAAAAAGkw/AS3Cd45LrX8/s640/cmmi.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;reference:wiki&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5549363663942053415?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5549363663942053415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/07/cmmi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5549363663942053415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5549363663942053415'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/07/cmmi.html' title='CMMI'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_lfigJiq8UqY/TDTz0F3xflI/AAAAAAAAGkw/AS3Cd45LrX8/s72-c/cmmi.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5902335380217060695</id><published>2010-06-17T10:45:00.000-07:00</published><updated>2010-06-17T10:45:18.759-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>CRONJOB-CRONTAB</title><content type='html'>&lt;div style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;Setting up cron jobs in Unix and Solaris&lt;/strong&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.&amp;nbsp; Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.&lt;/div&gt;&lt;div style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;span class="Apple-style-span" style="line-height: normal;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;1. Crontab Restrictions&lt;/strong&gt;&lt;br /&gt;You can execute crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, you can use&lt;br /&gt;crontab if your name does not appear in the file /usr/lib/cron/cron.deny.&lt;br /&gt;If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;2. Crontab Commands&lt;/strong&gt;&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;export EDITOR=vi ;to specify a editor to open crontab file.&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;crontab -e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Edit your crontab file, or create one if it doesn’t already exist.&lt;br /&gt;crontab -l &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Display your crontab file.&lt;br /&gt;crontab -r &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove your crontab file.&lt;br /&gt;crontab -v &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Display the last time you edited your crontab file. (This option is only available on a few systems.)&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;3. Crontab file&lt;/strong&gt;&lt;br /&gt;Crontab syntax :&lt;br /&gt;A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.&lt;/div&gt;&lt;table bgcolor="#dbdbdb" border="0" bordercolor="#dbdbdb" cellpadding="0" cellspacing="7" id="AutoNumber1" style="border-collapse: collapse; height: 160px; width: 433px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;&lt;pre&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;   *&amp;nbsp;  * &amp;nbsp;  *&amp;nbsp;       command to be executed&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;  -&amp;nbsp;&amp;nbsp; -&amp;nbsp;   -&lt;br /&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&amp;nbsp; +----- day of week (0 - 6) (Sunday=0)&lt;br /&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;+------- month (1 - 12)&lt;br /&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--------- day of        month (1 - 31)&lt;br /&gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +----------- hour (0 - 23)&lt;br /&gt;+------------- min (0 - 59)&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;* in the value field above means all legal values as in braces for that column.&lt;br /&gt;The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).&lt;br /&gt;&lt;strong&gt;Notes&lt;/strong&gt;&lt;br /&gt;A. ) Repeat pattern like /2 for every 2 minutes or /10 for every 10 minutes is not supported by all operating systems. If you try to use it and crontab complains it is probably not supported.&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;B.) The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;4. Crontab Example&lt;/strong&gt;&lt;br /&gt;A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: small;"&gt;30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm /home/someuser/tmp/*&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;span style="font-weight: 400;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;5. Crontab Environment&lt;/strong&gt;&lt;br /&gt;cron invokes the command from the user’s HOME directory with the shell, (/usr/bin/sh).&lt;br /&gt;cron supplies a default environment for every shell, defining:&lt;br /&gt;HOME=user’s-home-directory&lt;br /&gt;LOGNAME=user’s-login-id&lt;br /&gt;PATH=/usr/bin:/usr/sbin:.&lt;br /&gt;SHELL=/usr/bin/sh&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;6. Disable Email&lt;/strong&gt;&lt;br /&gt;By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;strong&gt;7. Generate log file&lt;/strong&gt;&lt;br /&gt;To collect the cron execution execution log in a file :&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;30 18 * * * rm /home/someuser/tmp/* &amp;gt; /home/someuser/cronlogs/clean_tmp_dir.log&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #333333; font-size: 12px; line-height: 1.5em; margin-bottom: 20px; margin-top: 15px;"&gt;reference:&amp;nbsp;adminschoice.com&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5902335380217060695?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5902335380217060695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/cronjob-crontab.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5902335380217060695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5902335380217060695'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/cronjob-crontab.html' title='CRONJOB-CRONTAB'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5724042819171516993</id><published>2010-06-17T10:01:00.001-07:00</published><updated>2010-06-17T10:01:30.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>fork()</title><content type='html'>&lt;h1 style="font-style: normal; text-indent: 0in;"&gt;&lt;a href="" name="SECTION002230000000000000000"&gt;fork()&lt;/a&gt;&lt;/h1&gt;&lt;div style="font-variant: normal; text-indent: 0in;"&gt;&lt;tt&gt;int fork()&lt;/tt&gt;&amp;nbsp;turns a single process into 2 identical processes, known as the&amp;nbsp;&lt;em style="font-weight: bold;"&gt;parent&lt;/em&gt;&amp;nbsp;and the&amp;nbsp;&lt;em style="font-weight: bold;"&gt;child&lt;/em&gt;. On success, fork() returns 0 to the child process and returns the process ID of the child process to the parent process. On failure, fork() returns -1 to the parent process, sets errno to indicate the error, and no child process is created.&amp;nbsp;&lt;/div&gt;&lt;div style="font-variant: normal; text-indent: 0in;"&gt;&lt;b&gt;NOTE:&lt;/b&gt;&amp;nbsp;The child process will have its own unique PID.&amp;nbsp;&lt;/div&gt;&lt;div style="font-variant: normal; text-indent: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-variant: normal; text-indent: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: monospace; font-variant: normal; text-indent: 0in;"&gt;&lt;b&gt;NOTE:&lt;/b&gt;&amp;nbsp;The processes have unique ID's which will be different at each run.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: monospace; font-variant: normal; text-indent: 0in;"&gt;It also impossible to tell in advance which process will get to CPU's time -- so one run may differ from the next.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: monospace; font-variant: normal; text-indent: 0in;"&gt;When we spawn 2 processes we can easily detect (in each process) whether it is the child or parent since fork returns&amp;nbsp;&lt;u&gt;0&lt;/u&gt;&amp;nbsp;to the&amp;nbsp;&lt;u&gt;child&lt;/u&gt;. We can trap any errors if fork returns a -1.&amp;nbsp;&lt;em style="font-weight: bold;"&gt;i.e.&lt;/em&gt;:&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: monospace; font-variant: normal; text-indent: 0in;"&gt;&lt;tt&gt;&lt;/tt&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;tt&gt;&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;int pid; /* process identifier */&lt;br /&gt;&amp;nbsp;&lt;br /&gt;pid = fork();&lt;br /&gt;if ( pid &amp;lt; 0 )&lt;br /&gt;   {&amp;nbsp;printf(``Cannot fork!!&lt;img align="MIDDLE" alt="$\backslash$" border="0" height="32" src="http://www.cs.cf.ac.uk/Dave/C/img3.gif" width="12" /&gt;n'');&lt;br /&gt;     exit(1);&lt;br /&gt;   }&lt;br /&gt;if ( pid == 0 )&lt;br /&gt;   { /* Child process */ ...... } &lt;br /&gt;else&lt;br /&gt;   { /* Parent process pid is child's pid */&lt;br /&gt;   .... }&lt;/tt&gt;&lt;/pre&gt;&lt;/tt&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5724042819171516993?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5724042819171516993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/fork.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5724042819171516993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5724042819171516993'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/fork.html' title='fork()'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4452111525545692051</id><published>2010-06-17T09:48:00.000-07:00</published><updated>2010-06-17T09:48:56.644-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='shared memory'/><title type='text'>SHARED MEMORY IN UNIX</title><content type='html'>&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;In &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;fork()&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;system call, we mentioned that a parent and its children have separate address spaces. While this would provide a more secured way of executing parent and children processes (because they will not interfere each other), they shared nothing and have no way to communicate with each other. A&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&lt;b&gt;&lt;i&gt;shared memory&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;is an extra piece of memory that is&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&lt;i&gt;attached&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;to some address spaces for their owners to use. As a result, all of these processes share the same memory segment and have access to it.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;Shared memory is a feature supported by UNIX System V, including Linux, SunOS and Solaris. One process must explicitly ask for an area, using a&amp;nbsp;&lt;b&gt;&lt;i&gt;key&lt;/i&gt;&lt;/b&gt;, to be shared by other processes. This process will be called the&amp;nbsp;&lt;i&gt;server&lt;/i&gt;. All other processes, the&amp;nbsp;&lt;i&gt;clients&lt;/i&gt;, that know the shared area can access it. However, there is no protection to a shared memory and any process that knows it can access it freely. To protect a shared memory from being accessed at the same time by several processes, a synchronization protocol must be setup.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #0a0aff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;For a server, it should be started before any client. The server should perform the following tasks:&lt;ol&gt;&lt;li&gt;Ask for a shared memory with a memory key and memorize the returned shared memory ID. This is performed by system call&amp;nbsp;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;shmget()&lt;/span&gt;&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Attach this shared memory to the server's address space with system call&amp;nbsp;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;shmat()&lt;/span&gt;&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Initialize the shared memory, if necessary.&lt;/li&gt;&lt;li&gt;Do something and wait for all clients' completion.&lt;/li&gt;&lt;li&gt;Detach the shared memory with system call&amp;nbsp;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;shmdt()&lt;/span&gt;&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Controlling the shared memory using&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;shmctl(), read below for complete description.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;For the client part, the procedure is almost the same:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Ask for a shared memory with the same memory key and memorize the returned shared memory ID.&lt;/li&gt;&lt;li&gt;Attach this shared memory to the client's address space.&lt;/li&gt;&lt;li&gt;Use the memory.&lt;/li&gt;&lt;li&gt;Detach all shared memory segments, if necessary.&lt;/li&gt;&lt;li&gt;Exit.&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;div&gt;&lt;div style="color: black; font-variant: normal; text-indent: 0in;"&gt;&lt;tt&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;shmctl()&lt;/span&gt;&lt;/b&gt;&lt;/tt&gt;&amp;nbsp;is used to alter the permissions and other characteristics of a shared memory segment. It is prototyped as follows:&lt;/div&gt;&lt;div style="color: black; font-variant: normal; text-indent: 0in;"&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;pre&gt;int shmctl(int shmid, int cmd, struct shmid_ds *buf);&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="color: black; font-variant: normal; text-indent: 0in;"&gt;The process must have an effective&amp;nbsp;&lt;tt&gt;shmid&lt;/tt&gt;&amp;nbsp;of owner, creator or superuser to perform this command. The&amp;nbsp;&lt;tt&gt;cmd&lt;/tt&gt;&amp;nbsp;argument is one of following control commands:&lt;/div&gt;&lt;div style="color: black; font-variant: normal; text-indent: 0in;"&gt;&lt;/div&gt;&lt;dl style="color: black;"&gt;&lt;dt style="font-weight: bold;"&gt;&lt;strong style="font-weight: bold;"&gt;&lt;tt&gt;SHM_LOCK&lt;/tt&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;dd style="font-weight: normal;"&gt;-- Lock the specified shared memory segment in memory. The process must have the effective ID of superuser to perform this command.&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;strong style="font-weight: bold;"&gt;&lt;tt&gt;SHM_UNLOCK&lt;/tt&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;dd style="font-weight: normal;"&gt;-- Unlock the shared memory segment. The process must have the effective ID of superuser to perform this command.&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;strong style="font-weight: bold;"&gt;&lt;tt&gt;IPC_STAT&lt;/tt&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;dd style="font-weight: normal;"&gt;-- Return the status information contained in the control structure and place it in the buffer pointed to by buf. The process must have read permission on the segment to perform this command.&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;strong style="font-weight: bold;"&gt;&lt;tt&gt;IPC_SET&lt;/tt&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;dd style="font-weight: normal;"&gt;-- Set the effective user and group identification and access permissions. The process must have an effective ID of owner, creator or superuser to perform this command.&lt;/dd&gt;&lt;dt style="font-weight: bold;"&gt;&lt;strong style="font-weight: bold;"&gt;&lt;tt&gt;IPC_RMID&lt;/tt&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;dd style="font-weight: normal;"&gt;-- Remove the shared memory segment.&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4452111525545692051?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4452111525545692051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/shared-memory-in-unix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4452111525545692051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4452111525545692051'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/shared-memory-in-unix.html' title='SHARED MEMORY IN UNIX'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4425872298364348250</id><published>2010-06-11T12:32:00.001-07:00</published><updated>2010-06-11T12:32:40.256-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Script make backup of all file names</title><content type='html'>&lt;span class="Apple-style-span" style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="bash" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"&gt;&lt;span style="color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #007800; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;FILES=&lt;/span&gt;&lt;span style="color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;"$@"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;for&lt;/span&gt; f &lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;in&lt;/span&gt; &lt;span style="color: #007800; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$FILES&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;do&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;# &lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;if&lt;/span&gt; .bak backup &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;file&lt;/span&gt; exists, &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;read&lt;/span&gt; next file&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;if&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;[&lt;/span&gt; -f &lt;span style="color: #007800; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$&lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;{&lt;/span&gt;f&lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;}&lt;/span&gt;&lt;/span&gt;.bak &lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;]&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;then&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;echo&lt;/span&gt; &lt;span style="color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;"Skiping $f file..."&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;continue&lt;/span&gt;  &lt;span style="color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;# &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;read&lt;/span&gt; next &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;file&lt;/span&gt; and skip &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;cp&lt;/span&gt; command&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;fi&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: grey; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;# we are hear means no backup &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;file&lt;/span&gt; exists, just use &lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;cp&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;command&lt;/span&gt; to copy file&lt;/span&gt;&lt;br /&gt; /bin/&lt;span style="color: #c20cb9; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;cp&lt;/span&gt; &lt;span style="color: #007800; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$f&lt;/span&gt; &lt;span style="color: #007800; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$f&lt;/span&gt;.bak&lt;br /&gt;&lt;span style="color: black; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;done&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4425872298364348250?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4425872298364348250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/script-make-backup-of-all-file-names.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4425872298364348250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4425872298364348250'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/script-make-backup-of-all-file-names.html' title='Script make backup of all file names'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-8995041238322162789</id><published>2010-06-11T10:48:00.000-07:00</published><updated>2010-06-17T09:56:46.923-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>How to add two floating point numbers ?</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;You can make you og 'bc' command to do the arithmatic operations in shell script.&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;Following script illustrates a sample implimentation&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;a 1.2&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;b 3.1&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;x=(echo&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: Tahoma, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;b&gt;&lt;u&gt;$a +$b&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;|bc)&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;echo $x&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-8995041238322162789?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/8995041238322162789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-compare-two-floating-point.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8995041238322162789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8995041238322162789'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-compare-two-floating-point.html' title='How to add two floating point numbers ?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4812295348381550475</id><published>2010-06-11T10:32:00.000-07:00</published><updated>2010-06-11T10:34:08.967-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>How would you get the character positions 10-20 from a text file?</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;cat filename.txt | cut -c 10-20&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;:)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;If you have a string&amp;nbsp;"one two three", Which shell command would you extract&amp;nbsp;the strings?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;Input="one two three"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;for var in $Input&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; i=0;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; var.$i=$var&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; i=$i+1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;done&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;echo $i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;for ( i=0; i&amp;lt; $i; i++)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;echo `var.$i`&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;done&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;Its a little big solution but thats just a way of playing with script ;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4812295348381550475?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4812295348381550475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-would-you-get-character-positions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4812295348381550475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4812295348381550475'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-would-you-get-character-positions.html' title='How would you get the character positions 10-20 from a text file?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-177588379115113603</id><published>2010-06-11T10:17:00.000-07:00</published><updated>2010-06-11T10:22:26.778-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='LINUX'/><title type='text'>How to: UNIX List just directories or directory names</title><content type='html'>&lt;h2 style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 1.286em; font-weight: bold; line-height: 1.222em; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Display or list all directories&lt;/h2&gt;&lt;div style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Type the following command:&lt;br /&gt;&lt;code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"&gt;$ ls -l | grep `^d'&lt;/code&gt;&lt;/div&gt;&lt;h2 style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 1.286em; font-weight: bold; line-height: 1.222em; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px; font-weight: normal; line-height: normal;"&gt;You have current dir&amp;nbsp;containing set of directories which contain files.&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;One file can reside in many directories.&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;Write script which returns number of unique file names in&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;all the subdirectories of a current dir.&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px; font-weight: normal; line-height: normal;"&gt;ls -R | grep -v "^d" | sort -u&lt;/span&gt;&lt;/div&gt;&lt;h2 style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 1.286em; font-weight: bold; line-height: 1.222em; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Display or list only files&lt;/h2&gt;&lt;div style="color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Type the following command:&lt;br /&gt;&lt;code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"&gt;$ ls -l | grep -v `^d'&lt;/code&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-177588379115113603?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/177588379115113603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-unix-list-just-directories-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/177588379115113603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/177588379115113603'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-unix-list-just-directories-or.html' title='How to: UNIX List just directories or directory names'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4491442949725378313</id><published>2010-06-08T13:01:00.000-07:00</published><updated>2010-06-08T13:13:51.582-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>IF IN SHELL SCRIPT</title><content type='html'>&lt;table bgcolor="#CCCCCC" border="0" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td height="161"&gt;&lt;code&gt;$ cat &amp;gt; elf&lt;br /&gt;#&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Script to test if..elif...else&lt;br /&gt;#&lt;br /&gt;if [ $1 -gt 0 ]; then&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo "$1 is positive"&lt;br /&gt;elif [ $1 -lt 0 ]&lt;br /&gt;then&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo "$1 is negative"&lt;br /&gt;elif [ $1 -eq 0 ]&lt;br /&gt;then&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo "$1 is zero"&lt;br /&gt;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo "Opps! $1 is not number, give number"&lt;br /&gt;fi&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Try above script as follows:&lt;br /&gt;&lt;b&gt;$ chmod 755 elf&lt;br /&gt;$ ./elf 1&lt;br /&gt;$ ./elf -2&lt;br /&gt;$ ./elf 0&lt;br /&gt;$ ./elf a&lt;/b&gt;Here o/p for last sample run:&lt;br /&gt;./elf: [: -gt: unary operator expected&lt;br /&gt;./elf: [: -lt: unary operator expected&lt;br /&gt;./elf: [: -eq: unary operator expected&lt;br /&gt;Opps! a is not number, give number&lt;br /&gt;Above program gives error for last run, here integer comparison is expected therefore error like "&lt;i&gt;./elf: [: -gt: unary operator expected&lt;/i&gt;" occurs, but still our program notify this error to user by providing message "&lt;i&gt;Opps! a is not number, give number&lt;/i&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4491442949725378313?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4491442949725378313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/if-loop-shell-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4491442949725378313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4491442949725378313'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/if-loop-shell-script.html' title='IF IN SHELL SCRIPT'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5353564492103280464</id><published>2010-06-08T12:49:00.000-07:00</published><updated>2010-06-08T12:49:08.364-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>SHELL COMPARISONS, CONDITIONS, CHECKS</title><content type='html'>&lt;div align="center"&gt;&lt;b&gt;For Mathematics, use following operator in Shell Script&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;table border="1" cellpadding="1" cellspacing="1" height="100"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#808080"&gt;&lt;b&gt;Mathematical Operator in&amp;nbsp; Shell Script&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#808080"&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#808080"&gt;&lt;b&gt;Normal Arithmetical/ Mathematical Statements&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#808080" colspan="2"&gt;&lt;b&gt;But in Shell&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0"&gt;&lt;b&gt;For test statement with if command&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0"&gt;&lt;b&gt;For [ expr ] statement with if command&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-eq&lt;/td&gt;&lt;td&gt;is equal to&lt;/td&gt;&lt;td&gt;5 == 6&lt;/td&gt;&lt;td&gt;if test 5 -eq 6&lt;/td&gt;&lt;td&gt;if [ 5 -eq 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-ne&lt;/td&gt;&lt;td&gt;is not equal to&lt;/td&gt;&lt;td&gt;5 != 6&lt;/td&gt;&lt;td&gt;if test 5 -ne 6&lt;/td&gt;&lt;td&gt;if [ 5 -ne 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-lt&lt;/td&gt;&lt;td&gt;is less than&lt;/td&gt;&lt;td&gt;5 &amp;lt; 6&lt;/td&gt;&lt;td&gt;if test 5 -lt 6&lt;/td&gt;&lt;td&gt;if [ 5 -lt 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-le&lt;/td&gt;&lt;td&gt;is less than or equal to&lt;/td&gt;&lt;td&gt;5 &amp;lt;= 6&lt;/td&gt;&lt;td&gt;if test 5 -le 6&lt;/td&gt;&lt;td&gt;if [ 5 -le 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-gt&lt;/td&gt;&lt;td&gt;is greater than&lt;/td&gt;&lt;td&gt;5 &amp;gt; 6&lt;/td&gt;&lt;td&gt;if test 5 -gt 6&lt;/td&gt;&lt;td&gt;if [ 5 -gt 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-ge&lt;/td&gt;&lt;td&gt;is greater than or equal to&lt;/td&gt;&lt;td&gt;5 &amp;gt;= 6&lt;/td&gt;&lt;td&gt;if test 5 -ge 6&lt;/td&gt;&lt;td&gt;if [ 5 -ge 6 ]&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt;&amp;nbsp;== is equal, != is not equal.&lt;br /&gt;&lt;div align="center"&gt;&lt;b&gt;For string Comparisons use&lt;/b&gt;&lt;/div&gt;&lt;table align="center" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#C0C0C0" width="24%"&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" width="76%"&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="24%"&gt;string1 = string2&lt;/td&gt;&lt;td width="76%"&gt;string1 is equal to string2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="24%"&gt;string1 != string2&lt;/td&gt;&lt;td width="76%"&gt;string1 is NOT equal to string2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="24%"&gt;string1&lt;/td&gt;&lt;td width="76%"&gt;string1 is NOT NULL or not defined&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="24%"&gt;-n string1&lt;/td&gt;&lt;td width="76%"&gt;string1 is NOT NULL and does exist&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="24%"&gt;-z string1&lt;/td&gt;&lt;td width="76%"&gt;string1 is NULL and does exist&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div align="center"&gt;&lt;b&gt;Shell also test for file and directory types&lt;/b&gt;&lt;/div&gt;&lt;table align="center" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#C0C0C0" width="19%"&gt;&lt;b&gt;Test&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" width="81%"&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-s file&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Non empty file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-f file&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Is File exist or normal file and not a directory&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-d dir&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Is Directory exist and not a file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-w file&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Is writeable file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-r file&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Is read-only file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="19%"&gt;-x file&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td width="81%"&gt;Is file is executable&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div align="center"&gt;&lt;b&gt;Logical Operators&lt;/b&gt;&lt;/div&gt;Logical operators are used to combine two or more condition at a time&lt;br /&gt;&lt;table align="center" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#C0C0C0" width="50%"&gt;&lt;b&gt;Operator&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" width="50%"&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;! expression&lt;/td&gt;&lt;td width="50%"&gt;Logical NOT&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;expression1&amp;nbsp; -a&amp;nbsp; expression2&lt;/td&gt;&lt;td width="50%"&gt;Logical AND&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;expression1&amp;nbsp; -o&amp;nbsp; expression2&lt;/td&gt;&lt;td width="50%"&gt;Logical OR&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5353564492103280464?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5353564492103280464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/shell-comparisons-conditions-checks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5353564492103280464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5353564492103280464'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/shell-comparisons-conditions-checks.html' title='SHELL COMPARISONS, CONDITIONS, CHECKS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4495487321505811125</id><published>2010-06-08T12:34:00.001-07:00</published><updated>2010-06-08T12:34:35.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='LINUX'/><title type='text'>FEW LINUX COMMANDS RELATED TO PROCESS</title><content type='html'>&lt;table border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#C0C0C0" width="32%"&gt;&lt;b&gt;For this purpose&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" width="30%"&gt;&lt;b&gt;Use this Command&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" width="25%"&gt;&lt;b&gt;Examples*&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To see currently running process&amp;nbsp;&lt;/td&gt;&lt;td width="30%"&gt;ps&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ ps&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To stop any process by PID i.e. to kill process&lt;/td&gt;&lt;td width="30%"&gt;kill&amp;nbsp;&amp;nbsp;&amp;nbsp; {PID}&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ kill&amp;nbsp; 1012&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To stop processes by name i.e. to kill process&lt;/td&gt;&lt;td width="30%"&gt;killall&amp;nbsp;&amp;nbsp; {Process-name}&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ killall httpd&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To get information about all running process&lt;/td&gt;&lt;td width="30%"&gt;ps -ag&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ ps -ag&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To stop all process except your shell&lt;/td&gt;&lt;td width="30%"&gt;kill 0&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ kill 0&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;For background processing (With &amp;amp;, use to put particular command and program in background)&lt;/td&gt;&lt;td width="30%"&gt;linux-command&amp;nbsp; &amp;amp;&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ ls / -R | wc -l &amp;amp;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To display the owner of the processes along with the processes&amp;nbsp;&lt;tt class="COMMAND"&gt;&amp;nbsp;&lt;/tt&gt;&lt;/td&gt;&lt;td width="30%"&gt;ps aux&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ ps aux&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To see if a particular process is running or not. For this purpose you have to use ps command in combination with the grep command&lt;/td&gt;&lt;td width="30%"&gt;&amp;nbsp;ps ax | grep&amp;nbsp; process-U-want-to see&lt;br /&gt;&lt;/td&gt;&lt;td width="25%"&gt;For e.g. you want to see whether Apache web server process is running or not then give command&lt;b&gt;$ ps ax | grep httpd&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To see currently running processes and other information like memory and CPU usage with real time updates.&lt;/td&gt;&lt;td width="30%"&gt;top&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://www.freeos.com/guides/lsst/images/toppid.jpg" target="_blank"&gt;See the output&lt;/a&gt;&amp;nbsp;of top command.&lt;/span&gt;&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;&lt;br /&gt;$ top&lt;/b&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Note&amp;nbsp;&lt;/b&gt;that to exit from top command press q.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="32%"&gt;To display a tree of processes&lt;/td&gt;&lt;td width="30%"&gt;pstree&lt;/td&gt;&lt;td width="25%"&gt;&lt;b&gt;$ pstree&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;*&lt;/b&gt;&amp;nbsp;To run some of this command you need to be root or equivalnt user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4495487321505811125?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4495487321505811125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/few-linux-commands-related-to-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4495487321505811125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4495487321505811125'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/few-linux-commands-related-to-process.html' title='FEW LINUX COMMANDS RELATED TO PROCESS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-7306360750342221803</id><published>2010-06-08T11:13:00.000-07:00</published><updated>2010-06-08T11:17:35.924-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>HOW TO READ LINES OF DATA IN A SHELL SCRIPT?</title><content type='html'>&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;There's a very easy way to solve this:&lt;/div&gt;&lt;div class="code" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; color: #006600; font-family: verdana, arial, sans-serif; font-size: 14px; line-height: 18px; margin-left: 15px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;while read myline&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; echo $myline&lt;br /&gt;done &amp;lt;&amp;nbsp;&lt;i&gt;inputfile&lt;/i&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;If the fields in a given line are separated by a known delimiter, either a tab or a comma, for example, then I suggest that you could use the&amp;nbsp;&lt;b&gt;cut&lt;/b&gt;&amp;nbsp;command to extract specific values.&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;To demonstrate, let's pull some useful data out of the /etc/passwd file, a file that has lines of data in known fields, separated with a ":" as the deilmiter. Here's a typical line of data-&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #006600; font-size: 14px;"&gt;unknown:*:99:99:Unknown User:/var/empty:/usr/bin/false&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #006600; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: verdana, arial, sans-serif; font-size: small; line-height: 18px;"&gt;&lt;/div&gt;The first field (remember, they're separated by colons) is the account name, the second the encrypted password (not shown because it's in a separate 'shadow' file for security), then the remaining fields are account ID, group ID, full user name, home directory and login shell.&lt;br /&gt;Let's just pull out login and full name to see what that looks like:&lt;br /&gt;&lt;div class="code" style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600; font-size: 14px; margin-left: 15px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;while read inputline&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; login=`(echo $inputline | cut -d: -f1)`&lt;br /&gt;&amp;nbsp; fulln=`(echo $inputline | cut -d: -f5)`&lt;br /&gt;&amp;nbsp; echo login = $login and fullname = $fulln&lt;br /&gt;done &amp;lt; /etc/passwd&lt;br /&gt;&lt;br /&gt;exit 0&lt;/div&gt;You can see how the cut program makes this a straightforward task, albeit one that can be done more quickly in other scripting languages like Perl. But if you want to work with shell scripts, the combination of a&amp;nbsp;&lt;b&gt;while read&lt;/b&gt;&amp;nbsp;loop with the input redirected and the great&amp;nbsp;&lt;b&gt;cut&lt;/b&gt;command should give you all the data parsing capabilities you need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-7306360750342221803?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/7306360750342221803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-read-lines-of-data-in-shell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7306360750342221803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7306360750342221803'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/how-to-read-lines-of-data-in-shell.html' title='HOW TO READ LINES OF DATA IN A SHELL SCRIPT?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5551077175181882174</id><published>2010-06-08T11:03:00.000-07:00</published><updated>2010-06-08T11:03:08.598-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Shell Built in Variables</title><content type='html'>&lt;table align="center" border="1" cellpadding="1" cellspacing="1" height="216"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#C0C0C0" height="18" width="26%"&gt;&lt;b&gt;Shell Built in Variables&lt;/b&gt;&lt;/td&gt;&lt;td align="center" bgcolor="#C0C0C0" height="18" width="74%"&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="54" width="26%"&gt;&lt;b&gt;$#&lt;/b&gt;&lt;/td&gt;&lt;td height="54" width="74%"&gt;Number of command line arguments. Useful to test no. of command line args in shell script.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="18" width="26%"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/td&gt;&lt;td height="18" width="74%"&gt;All arguments to shell&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="18" width="26%"&gt;&lt;b&gt;$@&lt;/b&gt;&lt;/td&gt;&lt;td height="18" width="74%"&gt;Same as above&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="12" width="26%"&gt;&lt;b&gt;$-&lt;/b&gt;&lt;/td&gt;&lt;td height="12" width="74%"&gt;Option supplied to shell&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="18" width="26%"&gt;&lt;b&gt;$$&lt;/b&gt;&lt;/td&gt;&lt;td height="18" width="74%"&gt;PID of shell&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="36" width="26%"&gt;&lt;b&gt;$!&lt;/b&gt;&lt;/td&gt;&lt;td height="36" width="74%"&gt;PID of last started background process (started with &amp;amp;)&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;$? -&amp;nbsp;&lt;/b&gt;(1) If return&amp;nbsp;&lt;i&gt;value is zero&lt;/i&gt;&amp;nbsp;(0), command is successful.&lt;br /&gt;(2) If return&amp;nbsp;&lt;i&gt;value is nonzero&lt;/i&gt;, command is not successful or some sort of error executing command/shell script.&lt;br /&gt;This value is know as&amp;nbsp;&lt;b&gt;&lt;i&gt;Exit Status&lt;/i&gt;&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5551077175181882174?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5551077175181882174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/shell-built-in-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5551077175181882174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5551077175181882174'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/shell-built-in-variables.html' title='Shell Built in Variables'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1436491170327012457</id><published>2010-06-07T10:36:00.000-07:00</published><updated>2010-06-07T10:36:59.602-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Joins'/><title type='text'>SQL JOINS</title><content type='html'>&lt;span class="Apple-style-span" style="color: #404040; font-family: verdana, helvetica, arial, sans-serif; font-size: 13px;"&gt;SQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #404040; font-family: verdana, helvetica, arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #404040; font-family: verdana, helvetica, arial, sans-serif; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="color: black; font-size: 11px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;"&gt;Different SQL JOINs&lt;/h2&gt;&lt;div&gt;&lt;ul style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;JOIN(inner)&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: Return rows when there is at least one match in both tables&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;LEFT JOIN&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: Return all rows from the left table, even if there are no matches in the right table&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RIGHT JOIN&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: Return all rows from the right table, even if there are no matches in the left table&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FULL JOIN&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: Return rows when there is a match in one of the tables&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;h3 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 13px; font-weight: normal;"&gt;SQL INNER JOIN Syntax&lt;/h3&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="code" style="border-bottom-color: rgb(229, 238, 204); border-bottom-style: solid; border-bottom-width: 5px; border-left-color: rgb(229, 238, 204); border-left-style: solid; border-left-width: 5px; border-right-color: rgb(229, 238, 204); border-right-style: solid; border-right-width: 5px; border-top-color: rgb(229, 238, 204); border-top-style: solid; border-top-width: 5px; font-family: verdana, helvetica, arial, sans-serif; font-size: 11px; outline-color: rgb(212, 212, 212); outline-style: solid; outline-width: 1px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: white; border-bottom-color: rgb(212, 212, 212); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(212, 212, 212); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(212, 212, 212); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(212, 212, 212); border-top-style: solid; border-top-width: 1px; font-family: 'courier new'; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SELECT column_name(s)&lt;br /&gt;FROM table_name1&lt;br /&gt;INNER JOIN table_name2&lt;br /&gt;ON table_name1.column_name=table_name2.column_name&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;PS:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;INNER JOIN is the same as JOIN.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The INNER JOIN keyword return rows when there is at least one match in both tables. If there are rows in "Persons" that do not have matches in "Orders", those rows will NOT be listed.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;"&gt;SQL LEFT JOIN Keyword&lt;/h2&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The LEFT JOIN keyword returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2).&lt;/span&gt;&lt;/div&gt;&lt;h3 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SQL LEFT JOIN Syntax&lt;/span&gt;&lt;/h3&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="code" style="border-bottom-color: rgb(229, 238, 204); border-bottom-style: solid; border-bottom-width: 5px; border-left-color: rgb(229, 238, 204); border-left-style: solid; border-left-width: 5px; border-right-color: rgb(229, 238, 204); border-right-style: solid; border-right-width: 5px; border-top-color: rgb(229, 238, 204); border-top-style: solid; border-top-width: 5px; font-family: verdana, helvetica, arial, sans-serif; outline-color: rgb(212, 212, 212); outline-style: solid; outline-width: 1px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: white; border-bottom-color: rgb(212, 212, 212); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(212, 212, 212); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(212, 212, 212); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(212, 212, 212); border-top-style: solid; border-top-width: 1px; font-family: 'courier new'; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SELECT column_name(s)&lt;br /&gt;FROM table_name1&lt;br /&gt;LEFT JOIN table_name2&lt;br /&gt;ON table_name1.column_name=table_name2.column_name&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;PS:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;In some databases LEFT JOIN is called LEFT OUTER JOIN.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;"&gt;SQL RIGHT JOIN Keyword&lt;/h2&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The RIGHT JOIN keyword Return all rows from the right table (table_name2), even if there are no matches in the left table (table_name1).&lt;/span&gt;&lt;/div&gt;&lt;h3 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SQL RIGHT JOIN Syntax&lt;/span&gt;&lt;/h3&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="code" style="border-bottom-color: rgb(229, 238, 204); border-bottom-style: solid; border-bottom-width: 5px; border-left-color: rgb(229, 238, 204); border-left-style: solid; border-left-width: 5px; border-right-color: rgb(229, 238, 204); border-right-style: solid; border-right-width: 5px; border-top-color: rgb(229, 238, 204); border-top-style: solid; border-top-width: 5px; font-family: verdana, helvetica, arial, sans-serif; outline-color: rgb(212, 212, 212); outline-style: solid; outline-width: 1px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: white; border-bottom-color: rgb(212, 212, 212); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(212, 212, 212); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(212, 212, 212); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(212, 212, 212); border-top-style: solid; border-top-width: 1px; font-family: 'courier new'; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SELECT column_name(s)&lt;br /&gt;FROM table_name1&lt;br /&gt;RIGHT JOIN table_name2&lt;br /&gt;ON table_name1.column_name=table_name2.column_name&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;PS:&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;In some databases RIGHT JOIN is called RIGHT OUTER JOIN.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;"&gt;SQL FULL JOIN Keyword&lt;/h2&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The FULL JOIN keyword return rows when there is a match in one of the tables.&lt;/span&gt;&lt;/div&gt;&lt;h3 style="background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SQL FULL JOIN Syntax&lt;/span&gt;&lt;/h3&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="code" style="border-bottom-color: rgb(229, 238, 204); border-bottom-style: solid; border-bottom-width: 5px; border-left-color: rgb(229, 238, 204); border-left-style: solid; border-left-width: 5px; border-right-color: rgb(229, 238, 204); border-right-style: solid; border-right-width: 5px; border-top-color: rgb(229, 238, 204); border-top-style: solid; border-top-width: 5px; font-family: verdana, helvetica, arial, sans-serif; font-size: 11px; outline-color: rgb(212, 212, 212); outline-style: solid; outline-width: 1px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: white; border-bottom-color: rgb(212, 212, 212); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(212, 212, 212); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(212, 212, 212); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(212, 212, 212); border-top-style: solid; border-top-width: 1px; font-family: 'courier new'; font-size: 12px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SELECT column_name(s)&lt;br /&gt;FROM table_name1&lt;br /&gt;FULL JOIN table_name2&lt;br /&gt;ON table_name1.column_name=table_name2.column_name&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;The FULL JOIN keyword returns all the rows from the left table (Persons), and all the rows from the right table (Orders). If there are rows in "Persons" that do not have matches in "Orders", or if there are rows in "Orders" that do not have matches in "Persons", those rows will be listed as well.&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: verdana, helvetica, arial, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1436491170327012457?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1436491170327012457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/sql-joins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1436491170327012457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1436491170327012457'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/sql-joins.html' title='SQL JOINS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-586295629128587197</id><published>2010-06-04T13:58:00.000-07:00</published><updated>2010-06-04T13:59:25.687-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database concepts'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>DDL, DML &amp; DCL</title><content type='html'>&lt;h1 style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;What are the difference between DDL, &amp;nbsp;DML&amp;nbsp;and DCL commands?&lt;/h1&gt;&lt;div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=586295629128587197" name="125cbfc5abb649b5_11f3571b3481c170_DDL" style="color: #114170;"&gt;DDL&lt;/a&gt;&lt;/h3&gt;&lt;span style="font-weight: bold;"&gt;Data Definition Language&lt;/span&gt;&amp;nbsp;(DDL) statements are used to define the database structure or schema. Some examples:&lt;br /&gt;&lt;ul style="list-style-type: circle;"&gt;&lt;li style="margin-left: 15px;"&gt;CREATE - to create objects in the database&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;ALTER - alters the structure of the database&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;DROP - delete objects from the database&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;COMMENT - add comments to the data dictionary&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;RENAME - rename an object&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;DML&lt;/h3&gt;&lt;span style="font-weight: bold;"&gt;Data Manipulation Language&lt;/span&gt;&amp;nbsp;(DML) statements are used for managing data within schema objects. Some examples:&lt;br /&gt;&lt;ul style="list-style-type: circle;"&gt;&lt;li style="margin-left: 15px;"&gt;SELECT - retrieve data from the a database&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;INSERT - insert data into a table&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;UPDATE - updates existing data within a table&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;DELETE - deletes all records from a table, the space for the records remain&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;MERGE - UPSERT operation (insert or update)&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;CALL - call a PL/SQL or Java subprogram&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;EXPLAIN PLAN - explain access path to data&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;LOCK TABLE - control concurrency&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=586295629128587197" name="125cbfc5abb649b5_11f3571b3481c170_DCL" style="color: #114170;"&gt;DCL&lt;/a&gt;&lt;/h3&gt;&lt;span style="font-weight: bold;"&gt;Data Control Language&lt;/span&gt;&amp;nbsp;(DCL) statements. Some examples:&lt;br /&gt;&lt;ul style="list-style-type: circle;"&gt;&lt;li style="margin-left: 15px;"&gt;GRANT - gives user's access privileges to database&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;REVOKE - withdraw access privileges given with the GRANT command&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=586295629128587197" name="125cbfc5abb649b5_11f3571b3481c170_TCL" style="color: #114170;"&gt;TCL&lt;/a&gt;&lt;/h3&gt;&lt;span style="font-weight: bold;"&gt;Transaction Control&lt;/span&gt;&amp;nbsp;(TCL) statements are used to manage the changes made by DML&amp;nbsp;statements. It allows statements to be grouped together into logical transactions.&lt;br /&gt;&lt;ul style="list-style-type: circle;"&gt;&lt;li style="margin-left: 15px;"&gt;COMMIT - save work done&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;SAVEPOINT - identify a point in a transaction to which you can later roll back&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;ROLLBACK - restore database to original since the last COMMIT&lt;/li&gt;&lt;li style="margin-left: 15px;"&gt;SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-586295629128587197?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/586295629128587197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/ddl-dml-dcl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/586295629128587197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/586295629128587197'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/ddl-dml-dcl.html' title='DDL, DML &amp; DCL'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-2486932865696253070</id><published>2010-06-04T13:50:00.000-07:00</published><updated>2010-06-04T13:50:50.763-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software quality'/><category scheme='http://www.blogger.com/atom/ns#' term='software testing'/><title type='text'>ENTRY &amp; EXIT CRITERIA FOR TESTING</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;As the name implies&amp;nbsp;Entry&amp;nbsp;criteria&amp;nbsp;denotes the conditions or process that must be present before a process can begin. For example Test Plan, Test Strategy, Test tools are some of the&amp;nbsp;Entry&amp;nbsp;criteria&amp;nbsp;for carrying out the testing process. Exit&amp;nbsp;criteria&amp;nbsp;as the name implies denotes the conditions or process that must be present before a cycle completes. Test results or Test Summary Report, Test Logs are some of the Exit&amp;nbsp;criteria&amp;nbsp;out of the testing process.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;The&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;b&gt;Entrance&amp;nbsp;Criteria&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;specified by the system test controller, should be fulfilled before System Test can commence. In the event, that any criterion has not been achieved, the System Test may commence if Business Team and Test Controller are in full agreement that the risk is manageable.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* All developed code must be unit tested. Unit and Link Testing must be completed and signed off by development team.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* System Test plans must be signed off by Business Analyst and Test Controller.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* All human resources must be assigned and in place.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* All test hardware and environments must be in place, and free for System test use.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* The Acceptance Tests must be completed, with a pass rate of not less than 80%.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;The&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;b&gt;Exit&amp;nbsp;Criteria&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;detailed below must be achieved before the Phase 1&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;software&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;can be recommended for promotion to Operations Acceptance status. Furthermore, I recommend that there be a minimum 2 days effort Final Integration testing AFTER the final fix/change has been retested.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* All High Priority errors from System Test must be fixed and tested&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* If any medium&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;or low-priority errors are outstanding - the implementation risk must be signed off as acceptable by Business Analyst&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* Project Integration Test must be signed off by Test Controller and Business Analyst.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;* Business Acceptance Test must be signed off by&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Business Expert.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-2486932865696253070?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/2486932865696253070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/entry-exit-criteria-for-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2486932865696253070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/2486932865696253070'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/entry-exit-criteria-for-testing.html' title='ENTRY &amp; EXIT CRITERIA FOR TESTING'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-8933780083982474741</id><published>2010-06-04T13:19:00.000-07:00</published><updated>2010-06-04T13:19:55.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database concepts'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>FOREIGN KEY</title><content type='html'>&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&amp;nbsp;A&amp;nbsp;foreign key is a field (or fields) that points to the primary key of another table. The purpose of the foreign key is to ensure referential integrity of the data. In other words, only values that are supposed to appear in the database are permitted.&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;For example, say we have two tables, a CUSTOMER table that includes all customer data, and an ORDERS table that includes all customer orders. The constraint here is that all orders must be associated with a customer that is already in the CUSTOMER table. In this case, we will place a foreign key on the ORDERS table and have it relate to the primary key of the CUSTOMER table. This way, we can ensure that all orders in the ORDERS table are related to a customer in the CUSTOMER table. In other words, the ORDERS table cannot contain information on a customer that is not in the CUSTOMER table.&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;The structure of these two tables will be as follows:&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;Table&amp;nbsp;&lt;i&gt;&lt;b&gt;CUSTOMER&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;table border="1" class="content" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;column name&lt;/td&gt;&lt;td&gt;characteristic&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SID&lt;/td&gt;&lt;td&gt;Primary Key&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Last_Name&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;First_Name&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;Table&amp;nbsp;&lt;i&gt;&lt;b&gt;ORDERS&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;table border="1" class="content" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;column name&lt;/td&gt;&lt;td&gt;characteristic&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Order_ID&lt;/td&gt;&lt;td&gt;Primary Key&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Order_Date&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customer_SID&lt;/td&gt;&lt;td&gt;Foreign Key&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Amount&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;In the above example, the Customer_SID column in the ORDERS table is a foreign key pointing to the SID column in the CUSTOMER table.&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;Below we show examples of how to specify the foreign key when creating the ORDERS table:&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;MySQL&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;CREATE TABLE ORDERS&lt;br /&gt;(Order_ID integer,&lt;br /&gt;Order_Date date,&lt;br /&gt;Customer_SID integer,&lt;br /&gt;Amount double,&lt;br /&gt;Primary Key (Order_ID),&lt;br /&gt;Foreign Key (Customer_SID) references CUSTOMER(SID));&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;Oracle&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;CREATE TABLE ORDERS&lt;br /&gt;(Order_ID integer primary key,&lt;br /&gt;Order_Date date,&lt;br /&gt;Customer_SID integer references CUSTOMER(SID),&lt;br /&gt;Amount double);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;SQL Server&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;CREATE TABLE ORDERS&lt;br /&gt;(Order_ID integer primary key,&lt;br /&gt;Order_Date datetime,&lt;br /&gt;Customer_SID integer references CUSTOMER(SID),&lt;br /&gt;Amount double);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;Below are examples for specifying a foreign key by altering a table. This assumes that the ORDERS table has been created, and the foreign key has not yet been put in:&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;MySQL&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;ALTER TABLE ORDERS&lt;br /&gt;ADD FOREIGN KEY (customer_sid) REFERENCES CUSTOMER(SID);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;Oracle&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;ALTER TABLE ORDERS&lt;br /&gt;ADD (CONSTRAINT fk_orders1) FOREIGN KEY (customer_sid) REFERENCES CUSTOMER(SID);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: Arial; font-size: 13px;"&gt;&lt;b&gt;SQL Server&lt;/b&gt;:&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;ALTER TABLE ORDERS&lt;br /&gt;ADD FOREIGN KEY (customer_sid) REFERENCES CUSTOMER(SID);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-8933780083982474741?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/8933780083982474741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/foreign-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8933780083982474741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/8933780083982474741'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/foreign-key.html' title='FOREIGN KEY'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-533790702882426988</id><published>2010-06-04T12:51:00.000-07:00</published><updated>2010-06-04T12:51:41.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quality Center'/><category scheme='http://www.blogger.com/atom/ns#' term='QC'/><title type='text'>Quality Center</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;b&gt;HP Quality Center (QC)&lt;/b&gt;&amp;nbsp;(formerly&amp;nbsp;&lt;b&gt;HP TestDirector for Quality Center&lt;/b&gt;) is a web-based&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Test_management" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Test management"&gt;test management&lt;/a&gt;&amp;nbsp;tool by&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Mercury_Interactive" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Mercury Interactive"&gt;Mercury Interactive&lt;/a&gt;&amp;nbsp;(now HP). It is based on&amp;nbsp;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Client_server" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Client server"&gt;client server&lt;/a&gt;&amp;nbsp;technology and has five main modules/tabs: Releases, Requirements, Test Plan, Test Lab and Defects for management of testing processes. There can be additional modules as well, depending on the various add-ins installed, e.g., BPT (Business Process Testing).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: black; font-size: 19px; font-weight: normal; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Modules"&gt;Modules&lt;/span&gt;&lt;/h2&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Releases"&gt;&lt;br /&gt;Releases&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;This module helps to manage releases and cycles (iterations). User can plan and track application release progress using this module&lt;/div&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Requirements"&gt;&lt;br /&gt;Requirements&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;This module is used for Requirement Management and&amp;nbsp;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Requirements_Traceability" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="Requirements Traceability"&gt;Requirements Traceability&lt;/a&gt;&amp;nbsp;of various Test cases stored in the QC Repository&lt;/div&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Test_Plan"&gt;&lt;br /&gt;Test Plan&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;This plan is used for creating or updating different Test Cases. The Test Cases are contained in different folders, which are displayed in a tree-like structure. It can store both Manual and Automated test cases. Manual Test Cases can be written locally or imported from Microsoft Excel spreadsheets, with each 'Test Step' having Expected Result and ActualResult sections. QC supports automated scripts developed for different Automation Tools such as&amp;nbsp;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/QTP" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="QTP"&gt;QTP&lt;/a&gt;,&amp;nbsp;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/LoadRunner" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="LoadRunner"&gt;LoadRunner&lt;/a&gt;, and&amp;nbsp;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/WinRunner" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="WinRunner"&gt;WinRunner&lt;/a&gt;. These scripts can be saved directly from the Tool into the Test Plan tab of QC. However, prior to this, the appropriate QC add-in needs to be installed to support an Automation Tool.&lt;/div&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Test_Lab"&gt;&lt;br /&gt;Test Lab&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;This tab is for execution of the test cases stored in the Test Plan module, which can be imported locally to the Test Lab screen and run. When a Manual Test case is executed, it opens up a pop-up window listing all of the Test Steps, and the user can update the status of each step with Passed, Failed or Not Complete. When an automated test case is run, QC invokes the Automation Tool which in turn executes the script, stores the result in the QC repository, and displays it on the UI.&lt;/div&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Defects"&gt;&lt;br /&gt;Defects&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;All defects are logged in this tab. These defects can be mapped to the corresponding test cases that failed and hence to the Requirements tab. Defects can be filtered on the status of the defect or by the user.&lt;/div&gt;&lt;h3 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;&lt;span class="mw-headline" id="Reports"&gt;&lt;br /&gt;Reports&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;The add-on package,&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/QCReporting" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="QCReporting"&gt;QCReporting&lt;/a&gt;&amp;nbsp;has been created which is dedicated to QC and produces media, where possible, in the following formats:&lt;/div&gt;&lt;ul style="line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Pdf" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Pdf"&gt;PDF&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Microsoft_Excel" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Microsoft Excel"&gt;Microsoft Excel&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;Screen table&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;soure-wiki&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-533790702882426988?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/533790702882426988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/quality-center.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/533790702882426988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/533790702882426988'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/quality-center.html' title='Quality Center'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4690431369119794545</id><published>2010-06-04T12:38:00.000-07:00</published><updated>2010-06-04T12:38:28.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='test frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='Frameworks'/><title type='text'>QTP TEST FRAMEWORKS</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #686362; font-family: Geneva, 'Trebuchet MS', Lucida, Arial, sans-serif; font-size: 12px; line-height: 15px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Now&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;what is a TEST Automation Framework ?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;A set of guidelines like coding standards , test-data handling , object repository treatment&amp;nbsp; etc... which when followed during automation scripting produce beneficial outcomes like increase code re-usage ,&amp;nbsp; higher portability &amp;nbsp;, reduced script maintenance cost&amp;nbsp; etc. Mind you these are just guidelines and not rules; they are not mandatory and you can still script without following the guidelines. But you will miss out on the advantages of having a Framework.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;What are the various Automation Frameworks available?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;1) Linear Scripting&lt;br /&gt;2)The Test Library Architecture Framework.&lt;br /&gt;3)The Data-Driven Testing Framework.&lt;br /&gt;4)The Keyword-Driven or Table-Driven Testing Framework.&lt;br /&gt;5)The Hybrid Test Automation Framework.&lt;/span&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Lets&amp;nbsp; look at them in detail -&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;1) Linear Scripting - Record &amp;amp; Playback&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;It is the simplest of all Frameworks and also know as&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;"Record &amp;amp; Playback"&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;.In this Framework , Tester manually records each step ( Navigation and User Inputs), Inserts Checkpoints ( Validation Steps) in the first round . He then , Plays back the recorded script in the subsequent rounds.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Ex : &amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Consider logging into Flight Reservation Application and checking wether the application has loaded on successful log-on. Here , the tester will simply record the steps and add validation steps.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SystemUtil.Run "flight4a.exe","","","open"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Agent Name:").Set "Guru99"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Password:").Set "Mercury"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinButton("OK").Click&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;em&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Check Flight Reservation Window has loaded after successful log-on&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Window("Flight Reservation").Check CheckPoint("Flight&amp;nbsp;Reservation")&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Advantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ol start="1" style="list-style-position: inside; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ol&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Fastest way to generate script&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Automation expertise not required&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Easiest way to learn the features of the Testing Tool&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start="1" style="list-style-position: inside; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Disadvantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ol start="1" style="list-style-position: inside; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ol&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Little reuse of scripts&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Test data is hard coded into the script&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Maintenance Nightmare&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start="1" style="list-style-position: inside; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ol&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;2)The Test Library Architecture Framework.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;It is also know as&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;"Structured Scripting"&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;"Functional Decomposition".&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;In this Framework , test scripts are initially recorded by “Record &amp;amp; Playback” method. Later, common tasks inside the scripts are identified and grouped into Functions. These Functions are called by main test script called&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Driver&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;in different ways to create test cases.&lt;/span&gt;&lt;/div&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Ex:&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;Using the same example as above, the function for logging in to Flight Reservation will look like .&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;Function Login()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SystemUtil.Run "flight4a.exe","","","open"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Agent Name:").Set "Guru99"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Password:").Set "Mercury"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinButton("OK").Click&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Now, you will call this function in the main script as follows&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Driver Script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Call Login()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;---------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Other Function calls / Test Steps.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;---------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Advantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Higher level of code reuse is achieved in Structured Scripting as compared to “Record &amp;amp; Playback”&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;The automation scripts are less costly to develop due to higher code re-use&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Easier Script Maintenance&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Disadvantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Technical expertise is necessary to write&amp;nbsp; Scripts using Test Library Framework.&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;More time is needed to plan and prepare test scripts.&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Test Data is hard coded within the scripts&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;3)The Data-Driven Testing Framework.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;In this Framework , while Test case logic resides in Test Scripts, the Test Data is separated and kept outside the Test Scripts.Test Data is read from the external files (Excel Files, Text Files, CSV Files, ODBC Sources, DAO Objects, ADO Objects) and are loaded into the variables inside the Test Script. Variables are used both for Input values and for Verification values. Test Scripts themselves are prepared either using Linear Scripting&amp;nbsp; or Test Library Framework.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Ex:&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;Developing the Flight Reservation Login script using this method will involve two steps.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Step 1)&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;Create a Test - Data file which could be Excel , CSV , or any other database source.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr align="center"&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;AgentName&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Password&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Jimmy&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Mercury&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 118px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Tina&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;MERCURY&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Bill&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="118"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;MerCURY&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Step 2)&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Develop Test Script and make references to your Test- Data source.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SystemUtil.Run "flight4a.exe","","","open"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Agent Name:").Set DataTable("AgentName", dtGlobalSheet)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinEdit("Password:").Set DataTable("Password", dtGlobalSheet)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dialog("Login").WinButton("OK").Click&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Check Flight Reservation Window has loaded&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Window("Flight Reservation").Check CheckPoint("Flight Reservation")&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;**Note “dtGlobalSheet” is the default excel sheet provided by QTP.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Advantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Changes to the Test Scripts do not affect the Test Data&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Test Cases can be executed with multiple Sets of Data&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;A Variety of Test Scenarios can be executed by just varying the Test Data in the External Data File&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;DisAdvantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;More time is needed to plan and prepare both Test Scripts and Test Data&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p:colorscheme colors="#ffffff,#000000,#919191,#000000,#618ffd,#00ae00,#fc0128,#cecece"&gt;&lt;div v:shape="_x0000_s1026"&gt;&lt;div class="O" style="text-align: center;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p:colorscheme&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;4)The Keyword-Driven or Table-Driven Testing Framework.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords,&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;independent of the test automation tool&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;used to execute them . Tests can be designed with or without the Application. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;There are 3 basis components of a Keyword Driven Framework viz. Keyword , Application Map , Component Function.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;What is a Keyword ?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ol start="1" style="list-style-position: inside; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Keyword is an Action that can be performed on a GUI Component. Ex . For GUI Component Textbox some Keywords ( Action) would be InputText, VerifyValue, VerifyProperty and so on.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;What is Application Map?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;An Application Map Provides Named References for GUI Components. Application Maps are nothing but “&lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Object Repositry&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;’&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;What is Component Function?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Component Functions are those functions that actively manipulate or interrogate GUI component. An example of a function would be click on web button with all error handling , enter data in a Web Edit with all error handling. Component functions could be application dependent or independent.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Ex&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;: To understand Keyword View lets take the same example. It invovles 2 steps&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Step 1&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;: Creating Data Table (Different from Test-Data Table created in Data Driven Framework). This Data Table contains Action to be performed on GUI Objects and correspoding arguments if any. Each row respresents one Test Step.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;table border="1" cellpadding="0" cellspacing="0" style="height: 220px; width: 502px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Object&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;(Application MAP)&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="middle"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Action&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;(KEYWORDS)&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="middle"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Argument&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WinEdit(Agent Name)&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Guru99&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WinEdit(Password)&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Mercury&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WinButton(OK)&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Click&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Window(Flight Reservation)&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;" valign="top"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Verify&lt;/div&gt;&lt;/td&gt;&lt;td align="center" style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px; width: 97px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Exists&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Step 2&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;: Writing Code in the form of Component Functions.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Once you've created your data table(s), you simply write a program or a set of scripts that reads in each step, executes the step based on the keyword contained the Action field, performs error checking, and logs any relevant information. This program or set of scripts would look similar to the pseudo code below:&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Function main()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call ConnectTable(Name of the Table) { &amp;nbsp; //Calling Function for connecting to the table.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (Call TableParser() != -1)&amp;nbsp; //Calling function for Parsing and extracting values from the table.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pass values to appropriate&amp;nbsp; COMPONENT functions. Like Set(Object Name , Argument) ex. Set( Agent Name , Guru99).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call CloseConnection()&amp;nbsp;&amp;nbsp; //Function for Closing connection after all the operation has been performed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-size: 8pt;"&gt;&lt;span style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; //End of main&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Thats all to Keyword Driven Framework.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;The advantage of Keyword Driven Framework is that the Keywords are re-usable. To understand this consider&amp;nbsp; you want to verify login operation for a Website say YAHOO MAIL.&amp;nbsp; The table will look like this -&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="199"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Object&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;(APPLICATION MAP)&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="97"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; Action&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;(KEYWORD)&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="148"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Argument&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="199"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WebEdit(UserName)&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="97"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="148"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="mailto:abc@yahoo.com" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;abc@yahoo.com&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="199"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WebEdit(Password)&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="97"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="148"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;xxxxx&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="199"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WebButton(OK)&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="97"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Click&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="148"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="199"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Window(Yahoo Mail)&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="97"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Verify&lt;/div&gt;&lt;/td&gt;&lt;td style="padding-bottom: 0px; padding-left: 4px; padding-right: 4px; padding-top: 0px;" valign="top" width="148"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Loads&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;If you observe in this case the Keywords Set , Click , Verify remain the same for which corresponding component functions are already developed. All you need to do is change the Application Mapping (Object Repository) from earlier Flight Reservation to Yahoo Mail , with change in argument values and the same script will work!&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Advantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Provides high code re-usability&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Test Tool Independent&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Independent of Application Under Test, same script works for AUT (with some limitations)&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Tests can be designed with or without AUT&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Disadvantages&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ul style="list-style-image: initial; list-style-position: inside; list-style-type: none; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;Initial investment being pretty high, the benefits of this can only be realized if the application is considerably big and the test scripts are to be maintained for quite a few years.&lt;/span&gt;&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.guru99.com/templates/js_jamba/images/style2/bullet.gif); background-origin: initial; background-position: 0px 5px; background-repeat: no-repeat no-repeat; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 9px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;High Automation expertise is required to create the Keyword Driven Framework.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;NOTE :&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&amp;nbsp;Even though QTP advertises itself as KeyWord Driven Framework, you can not achieve complete test tool and application idependence using QTP.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;5)The Hybrid Test Automation Framework.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;As the name suggests this framework is the combination of one or more frameworks discussed above pulling from their strengths and trying to mitigate their weaknesses. This hybrid test automation framework is what most frameworks evolve into over time and multiple projects. Maximum industry uses Keyword Framework in combination of Function decomposition method.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;source- guru99&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4690431369119794545?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4690431369119794545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/06/qtp-test-frameworks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4690431369119794545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4690431369119794545'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/06/qtp-test-frameworks.html' title='QTP TEST FRAMEWORKS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1923711740944477713</id><published>2010-05-29T15:50:00.001-07:00</published><updated>2010-06-07T23:14:52.145-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Referential CONSTRAINT</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 id="t0004980" style="font-size: 1em; font-style: normal; font-weight: bold; margin-bottom: 0.2em; padding-bottom: 0.1em;"&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; font-weight: normal; line-height: 19px;"&gt;Constraints on the database that require relations to satisfy certain properties. Relations that satisfy all such constraints are&amp;nbsp;&lt;b&gt;legal&lt;/b&gt;&amp;nbsp;relations.&lt;/span&gt;&lt;/h3&gt;&lt;h3 id="t0004980" style="font-size: 1em; font-style: normal; font-weight: bold; margin-bottom: 0.2em; padding-bottom: 0.1em;"&gt;Defining referential constraints&lt;/h3&gt;&lt;div&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx558" name="idx558"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx559" name="idx559"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx560" name="idx560"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx561" name="idx561"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx562" name="idx562"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx563" name="idx563"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1741088712173917145&amp;amp;postID=1923711740944477713" id="idx564" name="idx564"&gt;&lt;/a&gt;&lt;/div&gt;Referential integrity is imposed by adding referential constraints to table and column definitions. Once referential constraints are defined to the database manager, changes to the data within the tables and columns is checked against the defined constraint. Completion of the requested action depends on the result of the constraint checking.&lt;br /&gt;&lt;div&gt;Referential constraints are established with the FOREIGN KEY clause, and the REFERENCES clause in the CREATE TABLE or ALTER TABLE statements. There are effects from a referential constraint on a typed table or to a parent table that is a typed table that you should consider before creating a referential constraint.&lt;br /&gt;The identification of foreign keys enforces constraints on the values within the rows of a table or between the rows of two tables. The database manager checks the constraints specified in a table definition and maintains the relationships accordingly. The goal is to maintain integrity whenever one database object references another.&lt;br /&gt;For example, primary and foreign keys each have a department number column. For the EMPLOYEE table, the column name is WORKDEPT, and for the DEPARTMENT table, the name is DEPTNO. The relationship between these two tables is defined by the following constraints:&lt;br /&gt;&lt;ul style="margin-top: 0.1em; padding-top: 0.1em;"&gt;&lt;li style="margin-bottom: 0em; margin-left: 0em; margin-top: 0em;"&gt;There is only one department number for each employee in the EMPLOYEE table, and that number exists in the DEPARTMENT table.&lt;/li&gt;&lt;li style="margin-bottom: 0em; margin-left: 0em; margin-top: 0em;"&gt;Each row in the EMPLOYEE table is related to no more than one row in the DEPARTMENT table. There is a unique relationship between the tables.&lt;/li&gt;&lt;li style="margin-bottom: 0em; margin-left: 0em; margin-top: 0em;"&gt;Each row in the EMPLOYEE table that has a non-null value for WORKDEPT is related to a row in the DEPTNO column of the DEPARTMENT table.&lt;/li&gt;&lt;li style="margin-bottom: 0em; margin-left: 0em; margin-top: 0em;"&gt;The DEPARTMENT table is the parent table, and the EMPLOYEE table is the dependent table.&lt;/li&gt;&lt;/ul&gt;The SQL statement defining the parent table, DEPARTMENT, is:&lt;br /&gt;&lt;pre class="xmp" style="background-color: #dadada; font-family: monospace; font-size: 12px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;CREATE TABLE DEPARTMENT&lt;br /&gt;      (DEPTNO    CHAR(3)     NOT NULL,&lt;br /&gt;       DEPTNAME  VARCHAR(29) NOT NULL,&lt;br /&gt;       MGRNO     CHAR(6),&lt;br /&gt;       ADMRDEPT  CHAR(3)     NOT NULL,&lt;br /&gt;       LOCATION  CHAR(16),&lt;br /&gt;          PRIMARY KEY (DEPTNO))&lt;br /&gt;   IN RESOURCE &lt;/pre&gt;The SQL statement defining the dependent table, EMPLOYEE, is:&lt;br /&gt;&lt;pre class="xmp" style="background-color: #dadada; font-family: monospace; font-size: 12px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;CREATE TABLE EMPLOYEE&lt;br /&gt;      (EMPNO     CHAR(6)     NOT NULL PRIMARY KEY,&lt;br /&gt;       FIRSTNME  VARCHAR(12) NOT NULL,&lt;br /&gt;       LASTNAME  VARCHAR(15) NOT NULL,&lt;br /&gt;       WORKDEPT  CHAR(3),&lt;br /&gt;       PHONENO   CHAR(4),&lt;br /&gt;       PHOTO     BLOB(10m)   NOT NULL,&lt;br /&gt;          FOREIGN KEY DEPT (WORKDEPT)&lt;br /&gt;          REFERENCES DEPARTMENT ON DELETE NO ACTION)&lt;br /&gt;   IN RESOURCE &lt;/pre&gt;By specifying the DEPTNO column as the primary key of the DEPARTMENT table and WORKDEPT as the foreign key of the EMPLOYEE table, you are defining a referential constraint on the WORKDEPT values. This constraint enforces referential integrity between the values of the two tables. In this case, any employees that are added to the EMPLOYEE table must have a department number that can be found in the DEPARTMENT table.&lt;br /&gt;The delete rule for the referential constraint in the employee table is NO ACTION, which means that a department cannot be deleted from the DEPARTMENT table if there are any employees in that department.&lt;br /&gt;Although the previous examples use the CREATE TABLE statement to add a referential constraint, the ALTER TABLE statement can also be used.&lt;br /&gt;Another example: The same table definitions are used as those in the previous example. Also, the DEPARTMENT table is created before the EMPLOYEE table. Each department has a manager, and that manager is listed in the EMPLOYEE table. MGRNO of the DEPARTMENT table is actually a foreign key of the EMPLOYEE table. Because of this referential cycle, this constraint poses a slight problem. You could add a foreign key later. You could also use the CREATE SCHEMA statement to create both the EMPLOYEE and DEPARTMENT tables at the same time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1923711740944477713?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1923711740944477713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/referential-constraint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1923711740944477713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1923711740944477713'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/referential-constraint.html' title='Referential CONSTRAINT'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-7320047605002583533</id><published>2010-05-29T15:43:00.000-07:00</published><updated>2010-05-29T15:46:49.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>DATABASE- Hierarchical Model &amp; Relational Model</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #330066;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;center&gt;&lt;div style="text-align: auto;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="color: #330066;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Hierarchical Model&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/center&gt;The hierarchical data model organizes data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments. Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type. These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows. To create links between these record types, the hierarchical model uses Parent Child Relationships. These are a 1:N mapping between record types. This is done by using trees, like set theory used in the relational model, "borrowed" from maths. For example, an organization might store information about an employee, such as name, employee number, department, salary. The organization might also store information about an employee's children, such as name and date of birth. The employee and children data forms a hierarchy, where the employee data represents the parent segment and the children data represents the child segment. If an employee has three children, then there would be three child segments associated with one employee segment. In a hierarchical database the parent-child relationship is one to many. This restricts a child segment to having only one parent segment. Hierarchical DBMSs were popular from the late 1960s, with the introduction of IBM's Information Management System (IMS) DBMS, through the 1970s.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"&gt;A parent-child hierarchy is a hierarchy in a standard dimension that contains a parent attribute. A parent attribute describes a&amp;nbsp;&lt;em&gt;self-referencing relationship&lt;/em&gt;, or&amp;nbsp;&lt;em&gt;self-join&lt;/em&gt;, within a dimension main table. Parent-child hierarchies are constructed from a single parent attribute. Only one level is assigned to a parent-child hierarchy, because the levels present in the hierarchy are drawn from the parent-child relationships between members associated with the parent attribute.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;center&gt;&lt;h2&gt;&lt;span style="color: #330066;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Relational Model&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/center&gt;(RDBMS - relational database management system) A database based on the relational model developed by E.F. Codd. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organised in tables. A table is a collection of records and each record in a table contains the same fields.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;Properties of Relational Tables:&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Values Are Atomic&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Each Row is Unique&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Column Values Are of the Same Kind&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The Sequence of Columns is Insignificant&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The Sequence of Rows is Insignificant&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Each Column Has a Unique Name&lt;br /&gt;&lt;br /&gt;Certain fields may be designated as keys, which means that searches for specific values of that field will use indexing to speed them up. Where fields in two different tables take values from the same set, a join operation can be performed to select related records in the two tables by matching values in those fields. Often, but not always, the fields will have the same name in both tables. For example, an "orders" table might contain (customer-ID, product-code) pairs and a "products" table might contain (product-code, price) pairs so to calculate a given customer's bill you would sum the prices of all products ordered by that customer by joining on the product-code fields of the two tables. This can be extended to joining multiple tables on multiple fields. Because these relationships are only specified at retreival time, relational databases are classed as dynamic database management system. The RELATIONAL database model is based on the Relational Algebra.&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ref.&amp;nbsp;unixspace.com&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-7320047605002583533?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/7320047605002583533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/database-hierarchical-model-relational.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7320047605002583533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7320047605002583533'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/database-hierarchical-model-relational.html' title='DATABASE- Hierarchical Model &amp; Relational Model'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6876859705751285778</id><published>2010-05-29T15:33:00.000-07:00</published><updated>2010-05-29T15:33:09.551-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='INHERITANCE'/><title type='text'>INHERITANCE REVISITED</title><content type='html'>&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;Types of Inheritance:--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;1. Single&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;2. Multi-level ( class 1 derived to class 2 and class 2 derived to class 3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;3. Multiple ( class 3 derived from class 1 and class 2 ) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;4. Hierarchy type ( class 1 derives to class 2,3,4 )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;5. Hybrid&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;( deadly diamond )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;eg,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;class Derived-Class : &lt;b&gt;access-specifier &lt;/b&gt;Base-class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;Case 1 = &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;When the &lt;b&gt;access specifier &lt;/b&gt;for a base class is &lt;b&gt;public&lt;/b&gt;, all public members of the base become public members of the derived class, and all protected members of the base become protected members of the derived class. In all cases, the base's private elements remain private to the base and are not accessible by members of the derived class&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span style="font-family: Arial; font-size: 10.0pt;"&gt;Case 2 =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;When the base class is inherited by using the &lt;b&gt;private access specifier&lt;/b&gt;, all public and protected members of the base class become private members of the derived class&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;When a base class' &lt;b&gt;access specifier is private&lt;/b&gt;, public and protected members of the base become private members of the derived class. This means that they are still accessible by members of the derived class but cannot be accessed by parts of your program that are not members of either the base or derived class.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;Case 3 =&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;Inheritance of &lt;b&gt;Protected members of a class, &lt;/b&gt;they behave same as private members of the class i.e. they cant be accessed by the member functions of the class only and cannot be accessed by the non-member functions outside of the class.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;But the difference between the PRIVATE and PROTECTED members is this -- private members of the class when derived they cannot be accessed by derived class but protected members are accessed through derived class.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;Case 4 =&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;When we inherit a base class as &lt;b&gt;protected(access specifier). &lt;/b&gt;When this is done, all public and protected members of the base class become protected members of the derived class.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;u&gt;Multiple inheritance &lt;/u&gt;&lt;/b&gt;( multiple base class - single derived class )&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;// Inherit multiple base classes. &lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;syntex == &lt;b&gt;class derived: public base1, public base2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;u&gt;Constructor and Destructor calls in inheritance&lt;/u&gt;&lt;/b&gt;:-&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;Constructors are executed in their order of derivation. Destructors are executed in reverse order of derivation. &lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;u&gt;Passing Parameters to Base-Class Constructors&lt;/u&gt;&lt;/b&gt;:-&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;#include &lt;iostream&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;using namespace std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;protected:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;b&gt;base(int x) &lt;/b&gt;{ i=x; cout &amp;lt;&amp;lt; "Constructing base\n"; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;~base() { cout &amp;lt;&amp;lt; "Destructing base\n"; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class derived: public base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;// derived uses x; y is passed along to base.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;b&gt;derived(int x, int y): base(y)&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;===================&amp;gt; base class's paramter has to be passed in derived class's constructor even though it might not use it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{ j=x; cout &amp;lt;&amp;lt; "Constructing derived\n"; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;~derived() { cout &amp;lt;&amp;lt; "Destructing derived\n"; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;void show() { cout &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; j &amp;lt;&amp;lt; "\n"; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;int main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;derived ob(3, 4);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;ob.show(); // displays 4 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;return 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;u&gt;Special Case of accessing the public member of base class derived as privately making that member private for that derived class:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int j; // public in base&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;// Inherit base as private.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class derived: private base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;// here is access declaration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;base::j; // make j public again&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//using this syntax base::member;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Virtual base class &lt;/u&gt;&lt;/i&gt;&lt;/b&gt;( deadly diamond -- hybrid inheritance )&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;// This program uses virtual base classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;#include &lt;iostream&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;using namespace std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;// derived1 inherits base as virtual.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class derived1 : virtual public base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;// derived2 inherits base as virtual.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class derived2 : virtual public base {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int k;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;/* derived3 inherits both derived1 and derived2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;This time, there is only one copy of base class. */&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;class derived3 : public derived1, public derived2 {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;int sum;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;int main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;derived3 ob;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;ob.i = 10; // now unambiguous&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;ob.j = 20;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;ob.k = 30;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;// unambiguous&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;ob.sum = ob.i + ob.j + ob.k;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;// unambiguous&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; ob.i &amp;lt;&amp;lt; " ";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; ob.j &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; ob.k &amp;lt;&amp;lt; " ";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; ob.sum;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;return 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; tab-stops: 0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 5.0pt; margin-left: 0in; margin-right: 0in; margin-top: 5.0pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6876859705751285778?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6876859705751285778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/inheritance-revisited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6876859705751285778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6876859705751285778'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/inheritance-revisited.html' title='INHERITANCE REVISITED'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-201037084405463563</id><published>2010-05-29T15:24:00.001-07:00</published><updated>2010-05-29T15:24:50.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='TYPE CASTING'/><title type='text'>TYPE CASTING C/C++</title><content type='html'>&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="padding: .75pt .75pt .75pt .75pt;"&gt;   &lt;h1&gt;&lt;span style="color: black; font-family: Verdana;"&gt;Type Casting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/td&gt;   &lt;td style="padding: .75pt .75pt .75pt .75pt;"&gt;   &lt;div align="right" style="text-align: right;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;   &lt;/div&gt;&lt;div align="right" class="MsoNormal" style="text-align: right;"&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Converting an expression of a given type into another type is known as &lt;i&gt;type-casting&lt;/i&gt;.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;Implicit conversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Implicit conversions do not require any operator. They are automatically performed when a value is copied to a compatible type. For example: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;short&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; a=2000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;b=a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Here, the value of &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;a&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; has been promoted from &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;short&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;int&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and we have not had to specify any type-casting operator. This is known as a standard conversion. Standard conversions affect fundamental data types, and allow conversions such as the conversions between numerical types (&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;short&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;int&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;int&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;float&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;double&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;int&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;...), to or from &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;bool&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, and some pointer conversions. Some of these conversions may imply a loss of precision, which the compiler can signal with a warning. This can be avoided with an explicit conversion. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Implicit conversions also include constructor or operator conversions, which affect classes that include specific constructors or operator functions to perform conversions. For example: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; A {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; B { &lt;span class="kw"&gt;public&lt;/span&gt;: B (A a) {} };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;A a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;B b=a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Here, a implicit conversion happened between objects of &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;class A&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;class B&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, because &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;B&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; has a constructor that takes an object of class &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;A&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; as parameter. Therefore implicit conversions from &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;A&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;B&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; are allowed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;Explicit conversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;C++ is a strong-typed language. Many conversions, specially those that imply a different interpretation of the value, require an explicit conversion. We have already seen two notations for explicit type conversion: functional and c-like casting: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;short&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; a=2000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;b = (&lt;span class="kw"&gt;int&lt;/span&gt;) a;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="comm1"&gt;// c-like cast notation&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;b = &lt;span class="kw"&gt;int&lt;/span&gt; (a);&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="comm1"&gt;// functional notation &lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The functionality of these explicit conversion operators is enough for most needs with fundamental data types. However, these operators can be applied indiscriminately on classes and pointers to classes, which can lead to code that while being syntactically correct can cause runtime errors. For example, the following code is syntactically correct: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: 0in 0in 0in 0in;" valign="top"&gt;&lt;pre&gt;&lt;span class="comm1"&gt;// class type-casting&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="kw"&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CDummy {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;float&lt;/span&gt; i,j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CAddition {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;int&lt;/span&gt; x,y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;public&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CAddition (&lt;span class="kw"&gt;int&lt;/span&gt; a, &lt;span class="kw"&gt;int&lt;/span&gt; b) { x=a; y=b; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;int&lt;/span&gt; result() { &lt;span class="kw"&gt;return&lt;/span&gt; x+y;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; main () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;CDummy d;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;CAddition * padd;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;padd = (CAddition*) &amp;amp;d;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; padd-&amp;gt;result();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td style="background: #E7E7E7; border: solid silver 1.0pt; padding: 0in 0in 0in 0in; width: 50.0%;" valign="top" width="50%"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The program declares a pointer to &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CAddition&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, but then it assigns to it a reference to an object of another incompatible type using explicit type-casting: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;padd = (CAddition*) &amp;amp;d;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Traditional explicit type-casting allows to convert any pointer into any other pointer type, independently of the types they point to. The subsequent call to member &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;result&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; will produce either a run-time error or a unexpected result. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;In order to control these types of conversions between classes, we have four specific casting operators: &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;reinterpret_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;static_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;const_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;. Their format is to follow the new type enclosed between angle-brackets (&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;) and immediately after, the expression to be converted between parentheses. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast &lt;new_type&gt; (expression)&lt;/new_type&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;br /&gt;&lt;tt&gt;reinterpret_cast &lt;new_type&gt; (expression)&lt;/new_type&gt;&lt;/tt&gt;&lt;br /&gt;&lt;tt&gt;static_cast &lt;new_type&gt; (expression)&lt;/new_type&gt;&lt;/tt&gt;&lt;br /&gt;&lt;tt&gt;const_cast &lt;new_type&gt; (expression)&lt;/new_type&gt;&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The traditional type-casting equivalents to these expressions would be:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;(new_type) expression&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;br /&gt;&lt;tt&gt;new_type (expression)&lt;/tt&gt;&lt;/span&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;but each one with its own special characteristics: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;dynamic_cast&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; can be used only with pointers and references to objects. Its purpose is to ensure that the result of the type conversion is a valid complete object of the requested class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Therefore, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is always successful when we cast a class to one of its base classes: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CBase { };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CDerived: &lt;span class="kw"&gt;public&lt;/span&gt; CBase { };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CBase b; CBase* pb;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CDerived d; CDerived* pd;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;pb = &lt;span class="kw"&gt;dynamic_cast&lt;/span&gt;&lt;cbase*&gt;(&amp;amp;d);&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/cbase*&gt;&lt;/span&gt;&lt;span class="comm1"&gt;// ok: derived-to-base&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;pd = &lt;span class="kw"&gt;dynamic_cast&lt;/span&gt;&lt;cderived*&gt;(&amp;amp;b);&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/cderived*&gt;&lt;/span&gt;&lt;span class="comm1"&gt;// wrong: base-to-derived &lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The second conversion in this piece of code would produce a compilation error since base-to-derived conversions are not allowed with &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; unless the base class is polymorphic. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;When a class is polymorphic, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; performs a special checking during runtime to ensure that the expression yields a valid complete object of the requested class: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: 0in 0in 0in 0in;" valign="top"&gt;&lt;pre&gt;&lt;span class="comm1"&gt;// dynamic_cast&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;exception&gt;&lt;/exception&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="kw"&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CBase { &lt;span class="kw"&gt;virtual&lt;/span&gt; &lt;span class="kw"&gt;void&lt;/span&gt; dummy() {} };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CDerived: &lt;span class="kw"&gt;public&lt;/span&gt; CBase { &lt;span class="kw"&gt;int&lt;/span&gt; a; };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; main () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;try&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CBase * pba = &lt;span class="kw"&gt;new&lt;/span&gt; CDerived;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CBase * pbb = &lt;span class="kw"&gt;new&lt;/span&gt; CBase;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CDerived * pd;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;pd = &lt;span class="kw"&gt;dynamic_cast&lt;/span&gt;&lt;cderived*&gt;(pba);&lt;o:p&gt;&lt;/o:p&gt;&lt;/cderived*&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;if&lt;/span&gt; (pd==0) cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"Null pointer on first type-cast"&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;pd = &lt;span class="kw"&gt;dynamic_cast&lt;/span&gt;&lt;cderived*&gt;(pbb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/cderived*&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;if&lt;/span&gt; (pd==0) cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"Null pointer on second type-cast"&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;} &lt;span class="kw"&gt;catch&lt;/span&gt; (exception&amp;amp; e) {cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"Exception: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; e.what();}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td style="background: #E7E7E7; border: solid silver 1.0pt; padding: 0in 0in 0in 0in; width: 50.0%;" valign="top" width="50%"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;Null pointer on second type-cast&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid black 1.0pt; padding: .75pt .75pt .75pt .75pt;"&gt;   &lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Compatibility note:&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; requires the Run-Time Type Information   (RTTI) to keep track of dynamic types. Some compilers support this feature as   an option which is disabled by default. This must be enabled for runtime type   checking using &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; to work properly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The code tries to perform two dynamic casts from pointer objects of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CBase*&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; (&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pba&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pbb&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;) to a pointer object of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CDerived*&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, but only the first one is successful. Notice their respective initializations: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CBase * pba = &lt;span class="kw"&gt;new&lt;/span&gt; CDerived;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CBase * pbb = &lt;span class="kw"&gt;new&lt;/span&gt; CBase;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Even though both are pointers of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CBase*&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pba&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; points to an object of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CDerived&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, while &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pbb&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; points to an object of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CBase&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;. Thus, when their respective type-castings are performed using &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pba&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is pointing to a full object of class &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CDerived&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, whereas &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;pbb&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is pointing to an object of class &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CBase&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;, which is an incomplete object of class &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;CDerived&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;.&lt;br /&gt;&lt;br /&gt;When &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; cannot cast a pointer because it is not a complete object of the required class -as in the second conversion in the previous example- it returns a null pointer to indicate the failure. If &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is used to convert to a reference type and the conversion is not possible, an exception of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;bad_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is thrown instead. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; can also cast null pointers even between pointers to unrelated classes, and can also cast pointers of any type to void pointers (&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;void*&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;static_cast&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;static_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; can perform conversions between pointers to related classes, not only from the derived class to its base, but also from a base class to its derived. This ensures that at least the classes are compatible if the proper object is converted, but no safety check is performed during runtime to check if the object being converted is in fact a full object of the destination type. Therefore, it is up to the programmer to ensure that the conversion is safe. On the other side, the overhead of the type-safety checks of &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;dynamic_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is avoided. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CBase {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CDerived: &lt;span class="kw"&gt;public&lt;/span&gt; CBase {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CBase * a = &lt;span class="kw"&gt;new&lt;/span&gt; CBase;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;CDerived * b = &lt;span class="kw"&gt;static_cast&lt;/span&gt;&lt;cderived*&gt;(a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/cderived*&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;This would be valid, although &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;b&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; would point to an incomplete object of the class and could lead to runtime errors if dereferenced. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;static_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; can also be used to perform any other non-pointer conversion that could also be performed implicitly, like for example standard conversion between fundamental types: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; d=3.14159265;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; i = &lt;span class="kw"&gt;static_cast&lt;/span&gt;&amp;lt;&lt;span class="kw"&gt;int&lt;/span&gt;&amp;gt;(d); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Or any conversion between classes with explicit constructors or operator functions as described in "implicit conversions" above. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;reinterpret_cast&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;reinterpret_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; converts any pointer type to any other pointer type, even of unrelated classes. The operation result is a simple binary copy of the value from one pointer to the other. All pointer conversions are allowed: neither the content pointed nor the pointer type itself is checked. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;It can also cast pointers to or from integer types. The format in which this integer value represents a pointer is platform-specific. The only guarantee is that a pointer cast to an integer type large enough to fully contain it, is granted to be able to be cast back to a valid pointer. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;The conversions that can be performed by &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;reinterpret_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; but not by &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;static_cast&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; have no specific uses in C++ are low-level operations, whose interpretation results in code which is generally system-specific, and thus non-portable. For example: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="margin-left: 18.7pt; mso-cellspacing: 1.5pt;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: .75pt .75pt .75pt .75pt;" valign="top"&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; A {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; B {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;A * a = &lt;span class="kw"&gt;new&lt;/span&gt; A;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;B * b = &lt;span class="kw"&gt;reinterpret_cast&lt;/span&gt;&lt;b*&gt;(a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/b*&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;This is valid C++ code, although it does not make much sense, since now we have a pointer that points to an object of an incompatible class, and thus dereferencing it is unsafe. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;const_cast&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;This type of casting manipulates the constness of an object, either to be set or to be removed. For example, in order to pass a const argument to a function that expects a non-constant parameter: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: 0in 0in 0in 0in;" valign="top"&gt;&lt;pre&gt;&lt;span class="comm1"&gt;// const_cast&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="kw"&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; print (&lt;span class="kw"&gt;char&lt;/span&gt; * str)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; str &amp;lt;&amp;lt; endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; main () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;const&lt;/span&gt; &lt;span class="kw"&gt;char&lt;/span&gt; * c = &lt;/span&gt;&lt;span class="str1"&gt;"sample text"&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;print ( &lt;span class="kw"&gt;const_cast&lt;/span&gt;&amp;lt;&lt;span class="kw"&gt;char&lt;/span&gt; *&amp;gt; (c) );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td style="background: #E7E7E7; border: solid silver 1.0pt; padding: 0in 0in 0in 0in; width: 50.0%;" valign="top" width="50%"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;sample text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;&lt;span style="color: black; font-family: Verdana;"&gt;typeid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class="MsoNormal"&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; allows to check the type of an expression: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid (expression)&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;This operator returns a reference to a constant object of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;type_info&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; that is defined in the standard header file &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;&lt;typeinfo&gt;&lt;/typeinfo&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;. This returned value can be compared with another one using operators &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;!=&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; or can serve to obtain a null-terminated character sequence representing the data type or class name by using its &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;name()&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; member. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: 0in 0in 0in 0in;" valign="top"&gt;&lt;pre&gt;&lt;span class="comm1"&gt;// typeid&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;typeinfo&gt;&lt;/typeinfo&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="kw"&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; main () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;int&lt;/span&gt; * a,b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;a=0; b=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;if&lt;/span&gt; (&lt;span class="kw"&gt;typeid&lt;/span&gt;(a) != &lt;span class="kw"&gt;typeid&lt;/span&gt;(b))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"a and b are of different types:\n"&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"a is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(a).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"b is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(b).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td style="background: #E7E7E7; border: solid silver 1.0pt; padding: 0in 0in 0in 0in; width: 50.0%;" valign="top" width="50%"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;a and b are of different types:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;a is: int *&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;b is: int&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;When &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is applied to classes &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; uses the RTTI to keep track of the type of dynamic objects. When typeid is applied to an expression whose type is a polymorphic class, the result is the type of the most derived complete object: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" class="MsoNormalTable" style="mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in; width: 100.0%;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background: #EFEFFF; border: solid #C0C0D0 1.0pt; padding: 0in 0in 0in 0in;" valign="top"&gt;&lt;pre&gt;&lt;span class="comm1"&gt;// typeid, polymorphic class&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;typeinfo&gt;&lt;/typeinfo&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="prep1"&gt;#include &lt;exception&gt;&lt;/exception&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="kw"&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CBase { &lt;span class="kw"&gt;virtual&lt;/span&gt; &lt;span class="kw"&gt;void&lt;/span&gt; f(){} };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; CDerived : &lt;span class="kw"&gt;public&lt;/span&gt; CBase {};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kw"&gt;&lt;span style="color: black;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; main () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;try&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CBase* a = &lt;span class="kw"&gt;new&lt;/span&gt; CBase;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CBase* b = &lt;span class="kw"&gt;new&lt;/span&gt; CDerived;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"a is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(a).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"b is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(b).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"*a is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(*a).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"*b is: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; &lt;span class="kw"&gt;typeid&lt;/span&gt;(*b).name() &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;'\n'&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;} &lt;span class="kw"&gt;catch&lt;/span&gt; (exception&amp;amp; e) { cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span class="str1"&gt;"Exception: "&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;lt;&amp;lt; e.what() &amp;lt;&amp;lt; endl; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kw"&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td style="background: #E7E7E7; border: solid silver 1.0pt; padding: 0in 0in 0in 0in; width: 50.0%;" valign="top" width="50%"&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;a is: class CBase *&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;b is: class CBase *&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;*a is: class CBase&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: black;"&gt;*b is: class CDerived&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;Notice how the type that &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; considers for pointers is the pointer type itself (both &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;a&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;b&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; are of type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;class CBase *&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;). However, when &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; is applied to objects (like &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;*a&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; and &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;*b&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;) &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; yields their dynamic type (i.e. the type of their most derived complete object). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;If the type &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; evaluates is a pointer preceded by the dereference operator (&lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;*&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt;), and this pointer has a null value, &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; throws a &lt;/span&gt;&lt;tt&gt;&lt;span style="color: black; font-size: 10.0pt;"&gt;bad_typeid&lt;/span&gt;&lt;/tt&gt;&lt;span style="color: black; font-family: Verdana; font-size: 11.0pt;"&gt; exception.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-201037084405463563?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/201037084405463563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/type-casting-cc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/201037084405463563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/201037084405463563'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/type-casting-cc.html' title='TYPE CASTING C/C++'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1215855393607123549</id><published>2010-05-29T15:21:00.000-07:00</published><updated>2010-05-29T15:21:58.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='Bubble Sort'/><category scheme='http://www.blogger.com/atom/ns#' term='Sorting'/><category scheme='http://www.blogger.com/atom/ns#' term='Algorithms'/><title type='text'>BUBBLE SORT</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;center&gt;&lt;table border="0" id="table5" style="width: 557px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="413"&gt;&lt;div align="center"&gt;In the&amp;nbsp;&lt;span style="color: #cc3300;"&gt;&lt;b&gt;bubble sort,&amp;nbsp;&lt;/b&gt;&lt;/span&gt;as elements are sorted they gradually "bubble" (or rise) to their proper location in the array, like bubbles rising in a glass of soda.&amp;nbsp; The bubble sort repeatedly compares&amp;nbsp;&lt;span style="color: #cc3300;"&gt;&lt;b&gt;adjacent elements&lt;/b&gt;&lt;/span&gt;&amp;nbsp;of an array.&amp;nbsp; The first and second elements are compared and swapped if out of order.&amp;nbsp; Then the second and third elements are compared and swapped if out of order.&amp;nbsp; This sorting process continues until the last two elements of the array are compared and swapped if out of order.&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div align="center"&gt;&lt;table bgcolor="#FFFFFF" border="1" bordercolor="#000000" id="table8" style="border-collapse: collapse; width: 348px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;img border="0" height="69" src="http://mathbits.com/mathbits/compsci/arrays/BubbleChart.gif" width="336" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="543"&gt;&lt;div align="center"&gt;When this first pass through the array is complete, the bubble sort returns to elements one and two and starts the process all over again.&amp;nbsp; So, when does it stop?&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;The bubble sort knows that it is finished when it examines the entire array and no "swaps" are needed (thus the list is in proper order).&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;The bubble sort keeps track of occurring swaps by the use of a flag.&lt;br /&gt;&lt;br /&gt;The table below follows an array of numbers before, during, and after a bubble sort for&lt;i&gt;descending&lt;/i&gt;&amp;nbsp;order.&amp;nbsp; A "pass" is defined as one full trip through the array comparing and if necessary, swapping,&amp;nbsp;&lt;b&gt;adjacent&amp;nbsp;&lt;/b&gt;elements.&amp;nbsp; Several passes have to be made through the array before it is finally sorted.&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;center&gt;&lt;table bgcolor="#FFFFCC" border="1" bordercolor="#111111" cellpadding="3" cellspacing="0" id="table6" style="border-collapse: collapse; width: 503px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;Array at beginning:&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;84&lt;/td&gt;&lt;td align="center" width="48"&gt;69&lt;/td&gt;&lt;td align="center" width="46"&gt;76&lt;/td&gt;&lt;td align="center" width="46"&gt;86&lt;/td&gt;&lt;td align="center" width="46"&gt;94&lt;/td&gt;&lt;td align="center" width="55"&gt;91&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;After Pass #1:&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;84&lt;/td&gt;&lt;td align="center" width="48"&gt;76&lt;/td&gt;&lt;td align="center" width="46"&gt;86&lt;/td&gt;&lt;td align="center" width="46"&gt;94&lt;/td&gt;&lt;td align="center" width="46"&gt;91&lt;/td&gt;&lt;td align="center" width="55"&gt;69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;After Pass #2:&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;84&lt;/td&gt;&lt;td align="center" width="48"&gt;86&lt;/td&gt;&lt;td align="center" width="46"&gt;94&lt;/td&gt;&lt;td align="center" width="46"&gt;91&lt;/td&gt;&lt;td align="center" width="46"&gt;76&lt;/td&gt;&lt;td align="center" width="55"&gt;69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;After Pass #3:&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;86&lt;/td&gt;&lt;td align="center" width="48"&gt;94&lt;/td&gt;&lt;td align="center" width="46"&gt;91&lt;/td&gt;&lt;td align="center" width="46"&gt;84&lt;/td&gt;&lt;td align="center" width="46"&gt;76&lt;/td&gt;&lt;td align="center" width="55"&gt;69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;After Pass #4:&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;94&lt;/td&gt;&lt;td align="center" width="48"&gt;91&lt;/td&gt;&lt;td align="center" width="46"&gt;86&lt;/td&gt;&lt;td align="center" width="46"&gt;84&lt;/td&gt;&lt;td align="center" width="46"&gt;76&lt;/td&gt;&lt;td align="center" width="55"&gt;69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" bgcolor="#FFFFCC" width="165"&gt;&lt;b&gt;After Pass #5 (done):&amp;nbsp;&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="51"&gt;94&lt;/td&gt;&lt;td align="center" width="48"&gt;91&lt;/td&gt;&lt;td align="center" width="46"&gt;86&lt;/td&gt;&lt;td align="center" width="46"&gt;84&lt;/td&gt;&lt;td align="center" width="46"&gt;76&lt;/td&gt;&lt;td align="center" width="55"&gt;69&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The bubble sort is an easy algorithm to program, but it is slower than many other sorts.&amp;nbsp; With a bubble sort, it is always necessary to make one final "pass" through the array to check to see that no swaps are made to ensure that the process is finished.&amp;nbsp; In actuality, the process is finished before this last pass is made.&lt;br /&gt;&lt;br /&gt;&lt;/center&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="color: green; font-size: medium;"&gt;&lt;b&gt;// Bubble Sort Function for Descending Order&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;void BubbleSort(apvector &lt;int&gt; &amp;amp;num)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i, j, flag = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;// set flag to 1 to start first pass&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int temp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// holding variable&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int numLength = num.length( );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i = 1; (i &amp;lt;= numLength) &amp;amp;&amp;amp; flag; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (j=0; j &amp;lt; (numLength -1); j++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (num[j+1] &amp;gt; num[j])&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// ascending order simply changes to &amp;lt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = num[j];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// swap elements&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num[j] = num[j+1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num[j+1] = temp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// indicates that a swap occurred.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style="color: #cc3300;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green; font-size: x-small;"&gt;//arrays are passed to functions by address; nothing is returned&lt;/span&gt;&lt;/b&gt;}&lt;/int&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Ref:&amp;nbsp;mathbits.com&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1215855393607123549?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1215855393607123549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/bubble-sort.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1215855393607123549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1215855393607123549'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/bubble-sort.html' title='BUBBLE SORT'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1185060735260434683</id><published>2010-05-29T15:17:00.000-07:00</published><updated>2010-05-29T15:17:00.953-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fifo'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='Pipe'/><title type='text'>Pipes and FIFOs</title><content type='html'>&lt;h2 class="chapter"&gt;Pipes and FIFOs&lt;/h2&gt;&lt;a href="" name="index-pipe-1613"&gt;&lt;/a&gt;A&amp;nbsp;&lt;dfn&gt;pipe&lt;/dfn&gt;&amp;nbsp;is a mechanism for interprocess communication; data written to the pipe by one process can be read by another process. The data is handled in a first-in, first-out (FIFO) order. The pipe has no name; it is created for one use and both ends must be inherited from the single process which created the pipe.&lt;br /&gt;&lt;a href="" name="index-FIFO-special-file-1614"&gt;&lt;/a&gt;A&amp;nbsp;&lt;dfn&gt;FIFO special file&lt;/dfn&gt;&amp;nbsp;is similar to a pipe, but instead of being an anonymous, temporary connection, a FIFO has a name or names like any other file. Processes open the FIFO by name in order to communicate through it.&lt;br /&gt;A pipe or FIFO has to be open at both ends simultaneously. If you read from a pipe or FIFO file that doesn't have any processes writing to it (perhaps because they have all closed the file, or exited), the read returns end-of-file. Writing to a pipe or FIFO that doesn't have a reading process is treated as an error condition; it generates a&amp;nbsp;&lt;code&gt;SIGPIPE&lt;/code&gt;&amp;nbsp;signal, and fails with error code&amp;nbsp;&lt;code&gt;EPIPE&lt;/code&gt;&amp;nbsp;if the signal is handled or blocked.&lt;br /&gt;Neither pipes nor FIFO special files allow file positioning. Both reading and writing operations happen sequentially; reading from the beginning of the file and writing at the end.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1185060735260434683?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1185060735260434683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/pipes-and-fifos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1185060735260434683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1185060735260434683'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/pipes-and-fifos.html' title='Pipes and FIFOs'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-5571733913862283</id><published>2010-05-29T15:14:00.000-07:00</published><updated>2010-05-29T15:14:18.938-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='semaphore'/><category scheme='http://www.blogger.com/atom/ns#' term='mutex'/><title type='text'>Mutex vs. Semaphore, what is the difference?</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h1 style="font-size: 1.8em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-top: 5px;"&gt;Mutex vs. Semaphore, what is the difference?&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;The Toilet Example&amp;nbsp; (c) Copyright&amp;nbsp;2005, Niclas Winquist ;)&lt;br /&gt;&lt;/span&gt;Mutex:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When finished, the person gives (frees) the key to the next person in the queue.&lt;br /&gt;&lt;br /&gt;Officially: "Mutexes are typically used to serialise access to a section of &amp;nbsp;re-entrant code that cannot be executed concurrently by more than one thread. A mutex object only allows one thread into a controlled section, forcing other threads which attempt to gain access to that section to wait until the first thread has exited from that section."&lt;br /&gt;Ref: Symbian Developer Library&lt;br /&gt;&lt;br /&gt;(A mutex is really a semaphore with value 1.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Semaphore:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Is the number of free identical toilet keys. Example, say we have four toilets with identical locks and keys. The semaphore count - the count of keys - is set to 4 at beginning (all four toilets are free), then the count value is decremented as people are coming in. If all toilets are full, ie. there are no free keys left,&amp;nbsp;the semaphore count is 0. Now, when eq. one person leaves the toilet, semaphore is increased&amp;nbsp;to 1 (one free key), and given to the next person in the queue.&lt;br /&gt;&lt;br /&gt;Officially: "A semaphore restricts the number of simultaneous users of a shared resource up to a maximum number. Threads can request access to the resource (decrementing the semaphore), and can signal that they have finished using the resource (incrementing the semaphore)."&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ref: Symbian Developer Library&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-5571733913862283?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/5571733913862283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/mutex-vs-semaphore-what-is-difference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5571733913862283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/5571733913862283'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/mutex-vs-semaphore-what-is-difference.html' title='Mutex vs. Semaphore, what is the difference?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-3803069482266697511</id><published>2010-05-29T13:17:00.000-07:00</published><updated>2010-05-29T13:17:02.949-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='call by reference'/><category scheme='http://www.blogger.com/atom/ns#' term='call by value'/><title type='text'>GOOD EXAMPLE OF CALL BY REFERENCE VS CALL BY VALUE</title><content type='html'>How many times you get in a situation and think what to use in your function arguments- Call By Reference Or Call By Value?&lt;br /&gt;&lt;br /&gt;This ain't tricky et al if you remember all basic simple thing i.e. In call by value, a function call passes arguments by value. The called function creates a new set of variables and copies the values of arguments into them. The function does not have access to the actual variables in the calling program and can only work on the copies of values. This mechanism is fine if the function does not need to alter the values of the original variables in the calling program. But, there may arise situation where we would like to change the values of variables in the calling program. One good example is Bubble Sort, we compare the two adjacent elements in the list and interchange their values if the first element is greater than the second. Now if the function is used for bubble sort, then it should be able to alter the values of variables in the calling function as well, which is not possible if the call by value method is used.&lt;br /&gt;I'm sure this will help you remember the difference for your life now :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-3803069482266697511?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/3803069482266697511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/good-example-of-call-by-reference-vs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3803069482266697511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3803069482266697511'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/good-example-of-call-by-reference-vs.html' title='GOOD EXAMPLE OF CALL BY REFERENCE VS CALL BY VALUE'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1047791767781630557</id><published>2010-05-26T10:59:00.000-07:00</published><updated>2010-05-26T11:00:54.154-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software quality'/><category scheme='http://www.blogger.com/atom/ns#' term='software testing'/><category scheme='http://www.blogger.com/atom/ns#' term='software engineering'/><title type='text'>FURPS</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;&lt;b&gt;FURPS&lt;/b&gt;&amp;nbsp;is an acronym representing a model for classifying software quality attributes (Functional&amp;nbsp;&amp;amp;&amp;nbsp;Non-functional):&lt;/div&gt;&lt;ul style="line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;b&gt;Functionality&lt;/b&gt;&amp;nbsp;- Feature set, Capabilities, Generality, Security&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;b&gt;Usability&lt;/b&gt;- Human factors, Aesthetics, Consistency, Documentation&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;b&gt;Reliability&lt;/b&gt;&amp;nbsp;- Frequency/severity of failure, Recoverability, Predictability, Accuracy, Mean time to failure&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;b&gt;Performance&lt;/b&gt;&amp;nbsp;- Speed, Efficiency, Resource consumption, Throughput, Response time&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;b&gt;Supportability&lt;/b&gt;&amp;nbsp;- Testability, Extensibility, Adaptability, Maintainability, Compatibility, Configurability, Serviceability, Installability, Localizability, Portability&lt;/li&gt;&lt;/ul&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;The model, developed at HP, was first publicly elaborated by Grady and Caswell. The&amp;nbsp;&lt;i&gt;+&lt;/i&gt;&amp;nbsp;was later added to the model after various campaigns at HP to extend the acronym to emphasize various attributes.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;&lt;i&gt;FURPS+&lt;/i&gt;&amp;nbsp;is now widely used in the software industry.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1047791767781630557?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1047791767781630557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/furps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1047791767781630557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1047791767781630557'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/furps.html' title='FURPS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-3284084792573273414</id><published>2010-05-26T10:22:00.000-07:00</published><updated>2010-05-26T10:22:51.235-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Router'/><category scheme='http://www.blogger.com/atom/ns#' term='Telecom'/><category scheme='http://www.blogger.com/atom/ns#' term='Switch'/><title type='text'>Difference between Router and Switch</title><content type='html'>&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Router understand IP head, and switch deal with MAC address&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Router has its own IP address(es), and switch don’t&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Router has an operating system running inside, and allow administrator to login into the system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;You (network administrator) must configure routing table to make it works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Switch is usually ready to use.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Router has routing software running inside, including route discovery protocol.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Routing software know how to deal with different IP packet, such as ICMP and other IP option functionality. Switches don’t.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;Multiple routers can be connected together as a network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 14.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 14.0pt;"&gt;You can’t connect directly multiple switches together to form a large network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-size: 14.0pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;"&gt;&lt;span style="font-size: 14.0pt;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; font-size: 14px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;   &lt;span class="Apple-style-span" style="font-size: x-large;"&gt;1.Switch are said to be l2 device only but Router are said to be L3 device.&lt;br /&gt;2.Switch is said to be H/W Device.Router are said to be S/W device.&lt;br /&gt;3.Switch perform faster than the router because it is a H/W Device.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;"&gt;Routers and switches are both pieces of networking equipment that help data move across the network to their final location, but they work differently, and actually function at different levels of the networking stack. What is the difference between a router and a switch?&lt;br /&gt;The least intelligent kind of networking device is a hub, which takes data in one port, and then retransmits it out every other port. So any information sent or received by any single computer on a hub is retransmitted to every other computer. This is bad for security, obviously, but it also uses up a lot of bandwidth on the network, as computers have to receive data that they don’t need.&lt;br /&gt;&lt;a href="http://www.wereyouwondering.com/wp-content/uploads/2008/06/switch.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; text-decoration: none;"&gt;&lt;img alt="" class="alignleft size-thumbnail wp-image-56" height="150" src="http://www.wereyouwondering.com/wp-content/uploads/2008/06/switch-150x150.jpg" style="float: left; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px;" title="A switch and nest of Cat-5 cables" width="150" /&gt;&lt;/a&gt;&lt;br /&gt;A switch uses a little more intelligence. It learns the IP address of each computer attached to it, by matching up IP addresses with hardware MAC addresses. When data comes into the switch, it only sends data back out the port assigned to that computer’s MAC address. Switches are said to work at a hardware level, and help relieve bandwidth across the network.&lt;br /&gt;&lt;a href="http://www.wereyouwondering.com/wp-content/uploads/2008/06/cisco1800seriesrouter.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; text-decoration: none;"&gt;&lt;img alt="" class="alignright size-thumbnail wp-image-55" height="150" src="http://www.wereyouwondering.com/wp-content/uploads/2008/06/cisco1800seriesrouter-150x150.jpg" style="float: right; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px;" title="Cisco 1800 router" width="150" /&gt;&lt;/a&gt;&lt;br /&gt;A router is the most intelligent networking device. But routers aren’t like really intelligent switches, they actually work in a completely different way. Routers are designed to connect networks together. So, your internal network might have IP addresses, like 192.0.0.100, while your Internet service provider might give your computer an IP address that starts with 64.x.x.x. A router can take internal traffic bound for destinations out on the Internet in general, and route it from your internal network to the external network. Whenever you change networks, you need a router. And vice versa when information comes from the external network to your home network.&lt;br /&gt;So, just to restate, switches connect computers together within the same network, while routers connect entire networks together.&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-3284084792573273414?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/3284084792573273414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/difference-between-router-and-switch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3284084792573273414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/3284084792573273414'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/difference-between-router-and-switch.html' title='Difference between Router and Switch'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6041762958523854859</id><published>2010-05-25T15:21:00.000-07:00</published><updated>2010-05-25T15:21:15.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database concepts'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Codd's Rules for Relational Database Design</title><content type='html'>&lt;div id="abw" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-top-color: rgb(255, 51, 0); border-top-style: solid; border-top-width: 3px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; margin-top: 0px; max-width: 930px; min-width: 741px; padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px; position: relative; text-align: left; text-decoration: inherit;"&gt;&lt;div class="clear" id="abm" style="border-top-color: rgb(213, 208, 191); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; zoom: 1;"&gt;&lt;div id="abc" style="font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: -336px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; width: 930px;"&gt;&lt;div id="articlebody" style="font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 351px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static; text-decoration: inherit;"&gt;&lt;div class="entry" style="font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit; zoom: 1;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;In 1985, database pioneer Dr. E.F. Codd laid out twelve rules of relational database design. These rules provide the theoretical (although sometimes not practical) underpinnings for modern database design. The rules may be summarized as follows:&lt;/span&gt;&lt;ul style="font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; z-index: 0;"&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;All database management must take place using the relational database's innate functionality&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;All information in the database must be stored as values in a table&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;All database information must be accessible through the combination of a table name, primary key and column name.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The database must use&amp;nbsp;NULL Values&amp;nbsp;to indicate missing or unknown information&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The database schema must be described using the relational database syntax&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The database may support multiple languages, but it must support at least one language that provides full database functionality (e.g. SQL)&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The system must be able to update all updatable views&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The database must provide single-operation insert, update and delete functionality&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Changes to the physical structure of the database must be transparent to applications and users.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Changes to the logical structure of the database must be transparent to applications and users.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The database must natively support integrity constraints.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Changes to the distribution of the database (centralized vs. distributed) must be transparent to applications and users.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Any languages supported by the database must not be able to subvert integrity controls.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;source: about.com&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6041762958523854859?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6041762958523854859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/codds-rules-for-relational-database.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6041762958523854859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6041762958523854859'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/codds-rules-for-relational-database.html' title='Codd&apos;s Rules for Relational Database Design'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6255243796966897616</id><published>2010-05-25T14:01:00.000-07:00</published><updated>2010-05-25T14:01:51.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database concepts'/><category scheme='http://www.blogger.com/atom/ns#' term='KEYS'/><category scheme='http://www.blogger.com/atom/ns#' term='Databse'/><title type='text'>CANDIDATE KEY, PRIMARY KEY, UNIQUE KEY, ALTERNATE KEY, COMPOSITE KEY</title><content type='html'>CANDIDATE KEY, PRIMARY KEY, UNIQUE KEY, ALTERNATE KEY, COMPOSITE KEY&lt;br /&gt;&lt;br /&gt;How many times do we feel confused about these simple database concepts?&lt;br /&gt;The answer is many a times, but I'm sure after reading this post you will never forget any of them.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;PRIMARY KEY:-A primary key is a field that uniquely identifies each record in a table. As it uniquely identify each entity, it cannot contain null value and duplicate value.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;CANDIDATE KEY:-A nominee's for primary key field are know as candidate key.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;ALTERNATE KEY:-A candidate key that is not the primary key is called an Alternate key.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;SUPER KEY :- If we add additional attributes to a primary key, the resulting combination would still uniquely identify an instance of the entity set. Such augmented keys are called superkey.&amp;nbsp;A primary key is therefore a minimum superkey.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;span class="Apple-style-span" style="color: brown; font-family: 'Trebuchet MS';"&gt;A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.&lt;br /&gt;&lt;br /&gt;A key formed by combining at least two or more columns is called composite key.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;Difference..&lt;br /&gt;Primary Key..&lt;br /&gt;1.It will not accept null values.&lt;br /&gt;2.There will be only one primary key in a table.&lt;br /&gt;3.Clustered index is created in Primary key.&lt;br /&gt;4.Primary key allows each row in a table to be uniquely identified and ensures that no duplicate rows exist.&lt;br /&gt;&lt;br /&gt;Unique Key..&lt;br /&gt;1.Null values are accepted.&lt;br /&gt;2.More than one unique key will be there in a table.&lt;br /&gt;3.Non-Clustered index is created in unique key.&lt;br /&gt;4.Unique key constraint is used to prevent the duplication of key values within the rows of a table and allow null values.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: Arial; font-size: 12px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6255243796966897616?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6255243796966897616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/candidate-key-primary-key-unique-key.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6255243796966897616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6255243796966897616'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/candidate-key-primary-key-unique-key.html' title='CANDIDATE KEY, PRIMARY KEY, UNIQUE KEY, ALTERNATE KEY, COMPOSITE KEY'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-484293581183216912</id><published>2010-05-25T12:40:00.000-07:00</published><updated>2010-05-25T12:40:06.712-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XOR'/><category scheme='http://www.blogger.com/atom/ns#' term='Logical operation'/><title type='text'>THE XOR OPERATION</title><content type='html'>The outcome of XOR operation is true only when one of the operand is true(but not both).&lt;br /&gt;&lt;br /&gt;P &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Q &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; P^Q&lt;br /&gt;---------------------------------------------&lt;br /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;br /&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;br /&gt;&lt;br /&gt;int xor(int a, int b)&lt;br /&gt;{&lt;br /&gt;return (a||b) &amp;amp;&amp;amp; !(a &amp;amp;&amp;amp; b);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-484293581183216912?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/484293581183216912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/xor-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/484293581183216912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/484293581183216912'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/xor-operation.html' title='THE XOR OPERATION'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-9003282322555818018</id><published>2010-05-25T12:15:00.000-07:00</published><updated>2010-05-25T12:16:40.183-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='static'/><category scheme='http://www.blogger.com/atom/ns#' term='STATIC FUNCTION'/><title type='text'>C++ Static Functions</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana, Arial, Tahoma; font-size: 13px;"&gt;Static member functions&amp;nbsp;have a class scope and they do not have access to the 'this' pointer of the class. When a member is declared as&amp;nbsp;static, a&amp;nbsp;static&amp;nbsp;member of class, it has only one data for the entire class even though there are many objects created for the class. The main usage of&amp;nbsp;static&amp;nbsp;function is when the programmer&amp;nbsp;wants to have a function which is accessible even when the class is not instantiated.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, Arial, Tahoma; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, Arial, Tahoma; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;static&amp;nbsp;return_data_type fucntionname()&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Static&amp;nbsp;function defined with keyword&amp;nbsp;static&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;{&lt;br /&gt;statement1;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Statements for execution inside&amp;nbsp;static&amp;nbsp;function&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;statement2;&lt;br /&gt;..........&lt;br /&gt;..........&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;For example if a function sys1 returning nothing is to be declared as staic function it is done as follows:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;static&amp;nbsp;void sys1()&lt;br /&gt;{&lt;br /&gt;........;&lt;br /&gt;.......;&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: verdana, Arial, Tahoma; font-size: 12px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: x-small;"&gt;&lt;h4 style="color: blue; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="color: blue;"&gt;Accessing Static Function:&lt;/span&gt;&lt;/h4&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;A normal member function is accessed using the object and an operator&amp;nbsp;called the dot member access&amp;nbsp;operator. The&amp;nbsp;functions&amp;nbsp;declared&amp;nbsp;static&amp;nbsp;or&amp;nbsp;static&amp;nbsp;functions&amp;nbsp;are accessed using only the class name and the scope resolution&amp;nbsp;operator, unlike in normal member functions&amp;nbsp;where these are not used.&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;#include &lt;/span&gt;&lt;iostream.h&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;class example&lt;br /&gt;{&lt;br /&gt;private:&lt;br /&gt;static&amp;nbsp;int sum;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/iostream.h&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Static&amp;nbsp;data&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;int x;&lt;br /&gt;public:&lt;br /&gt;example()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Constructor of the class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;br /&gt;sum=sum+1;&lt;br /&gt;x=sum;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;~example()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Destructor of the class&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;br /&gt;sum=sum-1;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;static&amp;nbsp;void sys1()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Static&amp;nbsp;function exforsys( ) defined with keyword&amp;nbsp;static&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;br /&gt;cout&amp;lt;&amp;lt;"\nResult is: "&amp;lt;&lt;/span&gt;&lt;sum;&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/sum;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;void number()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&amp;nbsp;//Normal member function number( )&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;br /&gt;cout&amp;lt;&amp;lt;"\nNumber is: "&amp;lt;&lt;/span&gt;&lt;x;&amp;nbsp;&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;}&lt;br /&gt;};&lt;/span&gt;&lt;/x;&amp;nbsp;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;void main()&lt;br /&gt;{&lt;br /&gt;example e1;&lt;br /&gt;example::sys1();&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Static&amp;nbsp;function exforsys() accessed using class name example and the scope resolution&amp;nbsp;operator&amp;nbsp;::&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;example e2,e3,e4;&lt;br /&gt;example::sys1();&lt;br /&gt;e1.number();&lt;/span&gt;&lt;/span&gt;&lt;span style="color: grey; font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;//Normal member function accessed using object e1 and the dot member accessoperator.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;e2.number();&lt;br /&gt;e3.number();&lt;br /&gt;e4.number();&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: verdana, Arial, Tahoma; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The output of the above program is:&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;blockquote style="margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 15px; padding-bottom: 0px; padding-left: 32px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span style="color: maroon; font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Result is: 1&lt;br /&gt;Result is: 4&lt;br /&gt;Number is: 1&lt;br /&gt;Number is: 2&lt;br /&gt;Number is: 3&lt;br /&gt;Number is: 4&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: verdana, Arial, Tahoma;"&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: verdana, Arial, Tahoma; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-decoration: none;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The&amp;nbsp;programmer&amp;nbsp;must note the following while using&amp;nbsp;static&amp;nbsp;member&amp;nbsp;functions:&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;ul style="display: block; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; text-align: left;"&gt;&lt;li style="margin-left: 25px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;A&amp;nbsp;static&amp;nbsp;member function can only access&amp;nbsp;static&amp;nbsp;member data,&amp;nbsp;static&amp;nbsp;memberfunctions&amp;nbsp;and data and&amp;nbsp;functions&amp;nbsp;outside the class. The&amp;nbsp;programmer&amp;nbsp;must take note not to use&amp;nbsp;static&amp;nbsp;member function in the same manner as non-static&amp;nbsp;member function, as non-static&amp;nbsp;member function can access all of the above including thestatic&amp;nbsp;data member.&lt;/span&gt; &lt;span style="color: white;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-left: 25px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;A non-static&amp;nbsp;member function can be declared as virtual but care must be taken not to declare a&amp;nbsp;static&amp;nbsp;member function as virtual.&lt;/span&gt; &lt;span style="color: white;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-left: 25px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The&amp;nbsp;programmer&amp;nbsp;must first understand the concept of&amp;nbsp;static&amp;nbsp;data while learning the context of&amp;nbsp;static&amp;nbsp;functions. It is possible to declare a data member of a class asstatic&amp;nbsp;irrespective of it being a public or a private type in class definition. If a data is declared as&amp;nbsp;static, then the&amp;nbsp;static&amp;nbsp;data is created and initialized only once. Non-static&amp;nbsp;data members are created again and again. For each separate object of the class, the&amp;nbsp;static&amp;nbsp;data is created and initialized only once. As in the concept ofstatic&amp;nbsp;data, all objects of the class in&amp;nbsp;static&amp;nbsp;functions&amp;nbsp;share the variables. This applies to all objects of the class.&lt;/span&gt; &lt;span style="color: white;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-left: 25px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;A non-static&amp;nbsp;member function can be called only after instantiating the class as an object. This is not the case with&amp;nbsp;static&amp;nbsp;member&amp;nbsp;functions. A static member function can be called, even when a class is not instantiated.&lt;/span&gt; &lt;span style="color: white;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-left: 25px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;A static member function cannot have access to the 'this' pointer of the class.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: left;"&gt;reference exforsys.com&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: 'Courier New'; font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-9003282322555818018?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/9003282322555818018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/c-static-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/9003282322555818018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/9003282322555818018'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/c-static-functions.html' title='C++ Static Functions'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-1637596191225542165</id><published>2010-05-25T11:27:00.000-07:00</published><updated>2010-05-25T11:27:56.075-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='INLINE'/><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='MACROS'/><title type='text'>INLINE FUNCTIONS VS MACROS</title><content type='html'>INLINE FUNCTION VS MACROS: the old battle :)&lt;br /&gt;&lt;br /&gt;I'm sure sometime or the other you might have had this question popping out of your mind-&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;"I’m confused about the use of inline functions and macros.What is the difference between them?"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Well the answer is simple-&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Inline functions are similar to macros because they both are expanded at compile time, but the macros are expanded by the preprocessor, while inline functions are parsed by the compiler. There are several important differences:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="font: normal normal normal 10pt/normal verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;"&gt;Inline functions follow all the protocols of type safety enforced on normal functions.&lt;/li&gt;&lt;li style="font: normal normal normal 10pt/normal verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;"&gt;Inline functions are specified using the same syntax as any other function except that they include the&amp;nbsp;&lt;b&gt;inline&lt;/b&gt;&amp;nbsp;keyword in the function declaration.&lt;/li&gt;&lt;li style="font: normal normal normal 10pt/normal verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;"&gt;Expressions passed as arguments to inline functions are evaluated once. In some cases, expressions passed as arguments to macros can be evaluated more than once.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Now the BIG QUESTION-&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;When should I use macro and when inline functions?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Besides the difference already pointed out, you also must have in mind that because macros are expanded at pre-compile time, you cannot use them for debugging, but you can use inline functions. This is one important judging factor, isn't it?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-1637596191225542165?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/1637596191225542165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/inline-functions-vs-macros.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1637596191225542165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/1637596191225542165'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/inline-functions-vs-macros.html' title='INLINE FUNCTIONS VS MACROS'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-7516670747844792323</id><published>2010-05-24T09:21:00.000-07:00</published><updated>2010-05-24T09:21:17.744-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>CHGRP &amp; CHOWN</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Change Group Ownership with chgrp&lt;/span&gt;&lt;/h2&gt;The&amp;nbsp;&lt;strong&gt;&lt;code&gt;chgrp&lt;/code&gt;&lt;/strong&gt;&amp;nbsp;command is used to change the group with which a file is associated. The first thing you will need to provide this command is the group which you want to change the file or directory to. After that you can list a single file or directory to be changed or list separate entities separated by spaces. The&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;command will not have any affect on the access granted to the group (the rw- in the middle of the three permissions sets) but will change who can use those permissions.&lt;br /&gt;Using the chgrp Command on a File&lt;br /&gt;&lt;code&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;br /&gt;# chgrp presidents gettysburg.txt&lt;br /&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 tclark presidents 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;/code&gt;&lt;br /&gt;The&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;command works the same for directories as it does for files. In the following example, the group ownership of the directory called examples will be changed. Directories are identified by the letter d in the first column of the ls –l display.&lt;br /&gt;Using the&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;Command on a Directory&lt;br /&gt;&lt;code&gt;# ls -l&lt;br /&gt;total 4&lt;br /&gt;-rw-rw-r– 1 tclark tclark 0 Jan 13 21:13 example1.fil&lt;br /&gt;-rw-rw-r– 1 tclark tclark 0 Jan 13 21:13 example2.xxx&lt;br /&gt;drwxrwxr-x 2 tclark tclark 4096 Jan 13 21:35 examples&lt;br /&gt;# chgrp authors examples&lt;br /&gt;# ls -l&lt;br /&gt;total 4&lt;br /&gt;-rw-rw-r– 1 tclark tclark 0 Jan 13 21:13 example1.fil&lt;br /&gt;-rw-rw-r– 1 tclark tclark 0 Jan 13 21:13 example2.xxx&lt;br /&gt;drwxrwxr-x 2 tclark authors 4096 Jan 13 21:35 examples&lt;/code&gt;&lt;br /&gt;You can change the group for multiple files and/or directories by using the&amp;nbsp;&lt;code&gt;–R&lt;/code&gt;(recursive) option for the&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;command. This is one of the few commands (we’ll see two of the others shortly) which use an upper-case R for the recursive option. When applied on a directory the&amp;nbsp;&lt;code&gt;–R&lt;/code&gt;&amp;nbsp;option will apply the&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;command to the directory and all its subdirectories and files. Care should be taken when using the&amp;nbsp;&lt;code&gt;–R&lt;/code&gt;&amp;nbsp;option.&lt;br /&gt;Next we’ll look at changing the ownership of files.&lt;br /&gt;&lt;h2&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Change User Ownership&lt;/span&gt;&lt;/h2&gt;The&amp;nbsp;&lt;strong&gt;&lt;code&gt;chown&lt;/code&gt;&lt;/strong&gt;&amp;nbsp;(change owner) command can be used to change ownership of a file or directory. The syntax is very similar to&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;.&lt;br /&gt;&lt;code&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;br /&gt;# chown abe gettysburg.txt&lt;br /&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 abe authors 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;/code&gt;&lt;br /&gt;Just like with&amp;nbsp;&lt;code&gt;chgrp&lt;/code&gt;&amp;nbsp;we see that chown accepts the username of the user who should get ownership and the file or directory to change. Again we could list multiple files or directories here with spaces separating them.&lt;br /&gt;The chown command can be used to change the group ownership instead of the user ownership of a file or directory. If you wish to use chown to change the group ownership you can list a group preceded with either a colon (:) or a period (.). Here’s an example of how to use chown to change the group ownership of a file:&lt;br /&gt;&lt;code&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 abe authors 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;br /&gt;# chown :presidents gettys*&lt;br /&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 abe presidents 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;/code&gt;&lt;br /&gt;If you wish to simultaneously change both the user and group ownership of a file you can specify the user and group in the format of&amp;nbsp;&lt;code&gt;user:group&lt;/code&gt;.&lt;br /&gt;In the following example the user will be changed back to tclark and the group back to authors using a single command.&lt;br /&gt;Using the chown Command to Change File Ownership&lt;br /&gt;&lt;code&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 abe presidents 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;br /&gt;# chown tclark:authors gettys*&lt;br /&gt;# ls -l&lt;br /&gt;total 12&lt;br /&gt;-rw-rw-r– 1 tclark authors 2229 Jan 13 21:35 declaration.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 1310 Jan 13 17:48 gettysburg.txt&lt;br /&gt;-rw-rw-r– 1 tclark authors 360 Jan 13 17:48 preamble.txt&lt;/code&gt;&lt;br /&gt;Here we see the user and group has been changed with a single command. Just like with chgrp the chown command will take the&amp;nbsp;&lt;code&gt;–R&lt;/code&gt;&amp;nbsp;(recursive) option and apply the chown command to a directory and its subdirectories. This should be used with care.&lt;br /&gt;&lt;br /&gt;reference:http://www.dba-oracle.com/linux&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-7516670747844792323?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/7516670747844792323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/chgrp-chown.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7516670747844792323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7516670747844792323'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/chgrp-chown.html' title='CHGRP &amp; CHOWN'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-7950402543464703326</id><published>2010-05-20T09:52:00.000-07:00</published><updated>2010-05-20T09:52:14.978-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software testing'/><category scheme='http://www.blogger.com/atom/ns#' term='SCRUM'/><title type='text'>SCRUM</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, verdana, helvetica; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;Scrum is an&amp;nbsp;agile software developement&amp;nbsp;model based on multiple small teams working in an intensive and interdependent manner. The term is named for the scrum (or scrummage) formation in rugby, which is used to restart the game after an event that causes play to stop, such as an infringement.&lt;br /&gt;Scrum employs&amp;nbsp;real time&amp;nbsp;decision-making processes based on actual events and information. This requires well-trained and specialized teams capable of self-management, communication and decision-making. The teams in the organization work together while constantly focusing on their common interests.&lt;br /&gt;Scrum involves:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Initial appointment of a project manager called the "scrum master."&lt;/li&gt;&lt;li&gt;Definition and prioritization of tasks to be done.&lt;/li&gt;&lt;li&gt;Planning sessions for each task.&lt;/li&gt;&lt;li&gt;Daily meetings among teams.&lt;/li&gt;&lt;li&gt;Identification and evaluation of potential project risks and process pitfalls.&lt;/li&gt;&lt;li&gt;Execution of projects in brief, high-intensity, frequent work sessions.&lt;/li&gt;&lt;li&gt;Reviews of progress and evaluations of completed projects.&lt;/li&gt;&lt;li&gt;Openness to constructive criticism and ideas for improvement.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-7950402543464703326?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/7950402543464703326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/scrum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7950402543464703326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/7950402543464703326'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/scrum.html' title='SCRUM'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4890916651374283108</id><published>2010-05-18T14:46:00.001-07:00</published><updated>2010-05-18T14:46:40.363-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><title type='text'>Explicit Constructors</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #4a67b1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.5em; padding-left: 0em; padding-right: 0em; padding-top: 0.5em;"&gt;Explicit Constructors&lt;/h2&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;The explicit keyword in C++ is used to declare explicit constructors. Explicit constructors are simply constructors that cannot take part in an implicit conversion. Consider the following example:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;class Array&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Array(size_t count);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // etc.&lt;br /&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;This seems innocent enough until you realize that you can do this:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;Array array = 123;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Well that’s ugly but hardly something to get excited about, or is it? This is known as an implicit conversion. The trouble is that it can occur in more insidious places. Consider the following function:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;void UseArray(const Array&amp;amp; array);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Because the compiler will attempt to find an implicit conversion, the following code compiles just find:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;UseArray(123);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Yikes! That’s terrible. First there is the problem of code clarity. What does this mean? Secondly, because the implicit conversion involves calling the Array constructor, presumably enough storage is being allocated for a new Array object, not to mention the memory reserved for 123 elements contained in the array. Surely this is not what the programmer intended!?&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;All of these subtleties can be avoided by making the Array constructor explicit:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;class Array&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; explicit Array(size_t size);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // etc.&lt;br /&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Now a programmer needs to be explicit about her use of the Array constructor.&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;Array array(123);&lt;br /&gt;UseArray(Array(123));&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;A thing of beauty.&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;So why aren’t all constructors explicit? Well in a small number of cases it makes sense to allow an implicit conversion to allow user-defined types to behave like built-in types. A canonical example would probably be a high-precision numeric type:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;Number number = 123;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;In this case it makes sense to provide a more natural expression.&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;And finally, if you have two or more required constructor arguments then it does not make sense to make the constructor explicit since it cannot be used in implicit conversions anyway:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;class UserName&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserName(const std::wstring&amp;amp; principal,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const std::wstring&amp;amp; authority);&lt;br /&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Making the UserName constructor explicit would have no effect. You might be tempted to give authority a default value and then allow UserName to take part in an implicit conversion. When considering this, you should always think about whether it could&amp;nbsp;&lt;a href="http://weblogs.asp.net/kennykerr/archive/2004/07/09/178435.aspx" style="color: #006666;"&gt;introduce an error by default&lt;/a&gt;. Consider what happens if we do this.&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;class UserName&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserName(const std::wstring&amp;amp; principal,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const std::wstring&amp;amp; authority = std::wstring());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // etc.&lt;br /&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Now the programmer can write the following dubious code:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;UserName userName = L”kenny@kennyandkarin.com”;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;What’s wrong with that? Well the entire string is passed as the principal and the programmer’s entirely innocent code is now incorrect. A better solution is to return to the original UserName class design and then the use of the UserName class is clear:&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;&lt;span style="font-family: 'Courier New';"&gt;UserName username(“kenny”,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “kennyandkarin.com”);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;"&gt;Since both arguments are required, it is much harder for the programmer to neglect the one, and setting the authority to an empty string would be easier to spot as an error in a code review. You might even have the UserName constructor throw an ArgumentException if the authority is empty.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4890916651374283108?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4890916651374283108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/explicit-constructors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4890916651374283108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4890916651374283108'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/explicit-constructors.html' title='Explicit Constructors'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-4259340339888816443</id><published>2010-05-18T14:35:00.001-07:00</published><updated>2010-05-18T14:35:28.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>Stack unwinding?</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="for_questions_blue" style="color: red; font-family: VErdana; font-size: 13px; font-weight: bold; text-decoration: none;"&gt;&lt;b&gt;What do you mean by Stack unwinding?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-4259340339888816443?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/4259340339888816443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/stack-unwinding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4259340339888816443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/4259340339888816443'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/stack-unwinding.html' title='Stack unwinding?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6802170839288551976</id><published>2010-05-18T14:32:00.000-07:00</published><updated>2010-05-18T14:32:18.021-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='pointers'/><title type='text'>What is a dangling pointer?</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;span class="for_questions_blue" style="color: blue; font-family: VErdana; font-size: 13px; font-weight: bold; text-decoration: none;"&gt;&lt;b&gt;What is a dangling pointer?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;A dangling pointer arises when you use the address of an object after&lt;br /&gt;its lifetime is over. This may occur in situations like returning&lt;br /&gt;addresses of the automatic variables from a function or using the&lt;br /&gt;address of the memory block after it is freed. The following&lt;br /&gt;code snippet shows this:&lt;br /&gt;&lt;br /&gt;class Sample&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;public:&lt;br /&gt;int *ptr;&lt;br /&gt;Sample(int i)&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;ptr = new int(i);&lt;/span&gt;}&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;&lt;br /&gt;~Sample()&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;delete ptr;&lt;/span&gt;}&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;void PrintVal()&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;cout &amp;lt;&amp;lt; "The value is " &amp;lt;&amp;lt; *ptr;&lt;/span&gt;}&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;void SomeFunc(Sample x)&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;cout &amp;lt;&amp;lt; "Say i am in someFunc " &amp;lt;&amp;lt; endl;&lt;/span&gt;}&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;/span&gt;{&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;Sample s1 = 10;&lt;br /&gt;SomeFunc(s1);&lt;br /&gt;s1.PrintVal();&lt;/span&gt;}&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;&lt;br /&gt;In the above example when PrintVal() function is&lt;br /&gt;called it is called by the pointer that has been freed by the&lt;br /&gt;destructor in SomeFunc.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6802170839288551976?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6802170839288551976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/what-is-dangling-pointer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6802170839288551976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6802170839288551976'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/what-is-dangling-pointer.html' title='What is a dangling pointer?'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-6184722114901903307</id><published>2010-05-18T13:51:00.001-07:00</published><updated>2010-05-18T13:51:48.098-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='delete'/><category scheme='http://www.blogger.com/atom/ns#' term='delete[]'/><title type='text'>delete operator C++</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="for_questions_blue" style="color: blue; font-family: VErdana; font-size: 13px; font-weight: bold; text-decoration: none;"&gt;&lt;b&gt;Anything wrong with this code?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style56" style="font-weight: bold;"&gt;T *p = new T[10];&lt;br /&gt;delete p;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;Everything is correct, Only the first element of the array will be deleted”, The entire array will be deleted, but only the first element destructor will be called.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers" style="font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="for_questions_blue" style="color: black; font-family: VErdana; font-size: 13px; font-weight: bold; text-decoration: none;"&gt;Anything wrong with this code?&lt;/span&gt;&lt;span class="style55" style="color: black; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: 900;"&gt;&lt;/span&gt;&lt;br /&gt;T *p = 0;&lt;br /&gt;delete p;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Bookman Old Style', Arial, 'Times New Roman'; font-size: 14px; font-weight: normal;"&gt;Yes, the program will crash in an attempt to delete a null pointer.&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1741088712173917145-6184722114901903307?l=techievicky.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techievicky.blogspot.com/feeds/6184722114901903307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techievicky.blogspot.com/2010/05/delete-operator-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6184722114901903307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1741088712173917145/posts/default/6184722114901903307'/><link rel='alternate' type='text/html' href='http://techievicky.blogspot.com/2010/05/delete-operator-c.html' title='delete operator C++'/><author><name>Vivek Nanda</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_lfigJiq8UqY/TM0RCxFBUMI/AAAAAAAAHA0/4HvdOCZg9HI/S220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1741088712173917145.post-8191402201828249289</id><published>2010-05-18T13:40:00.000-07:00</published><updated>2010-05-18T13:40:42.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='Const'/><category scheme='http://www.blogger.com/atom/ns#' term='pointers'/><title type='text'>Constant Pointers and Pointers to Constants</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;"&gt;Consider the following declaration:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;char A_char = 'A';&lt;br /&gt;char * myPtr = &amp;amp;A_char;&lt;/pre&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 18px; white-space: normal;"&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This is a simple declaration of the variable myPtr. myPtr is a pointer to a character variable and in this case points to the character 'A'.&lt;/div&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Don't be confused about the fact that a character pointer is being used to point to a single character—this is perfectly legal! Not every character pointer has to point to a string.&lt;/div&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now consider the following three declarations assuming that char_A has been defined as a type char variable.:&lt;/div&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;&lt;b&gt;const&lt;/b&gt; char * myPtr = &amp;amp;char_A;&lt;br /&gt;char * &lt;b&gt;const&lt;/b&gt; myPtr = &amp;amp;char_A;&lt;br /&gt;&lt;b&gt;const&lt;/b&gt; char * &lt;b&gt;const&lt;/b&gt; myPtr = &amp;amp;char_A;&lt;br /&gt;&lt;/pre&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What is the difference between each of the valid ones? Do you know?&lt;/div&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;They are all three valid and correct declarations. Each assigns the addres of char_A to a character pointer. The difference is in what is constant.&lt;/div&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The first declaration:&lt;/div&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;const char * myPtr&lt;/pre&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;declares a pointer to a constant character. You cannot use this pointer to change the value being pointed to:&lt;/div&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;char char_A = 'A';&lt;br /&gt;const char * myPtr = &amp;amp;char_A;&lt;br /&gt;*myPtr = 'J';    &lt;span class="codeComment"&gt;// error - can't change value of *myPtr&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The second declaration,&lt;/div&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;char * const myPtr&lt;/pre&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;declares a constant pointer to a character. The location stored in the pointer cannot change. You cannot change where this pointer points:&lt;/div&gt;&lt;pre style="background-attachment: scroll; background-clip: initial; background-color: transparent; background-image: url(http://www.codeguru.com/newimg/images/paperbg.gif); background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(245, 243, 215); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(245, 243, 215); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(245, 243, 215); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(245, 243, 215); border-top-style: solid; border-top-width: 2px; color: black; display: block; font-family: 'courier new', monospace; font-size: 13px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 3px; overflow-x: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px; width: 570px;"&gt;char char_A = 'A';&lt;br /&gt;char char_B = 'B';&lt;br /&gt;&lt;br /&gt;char * const myPtr = &amp;amp;char_A;&lt;br /&gt;myPtr = &amp;amp;char_B;    &lt;span class="codeComment"&gt;// error - can't change address of myPtr&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="font-size: 13px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The third declares a pointer to a character wh
