<?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-17913962</id><updated>2011-12-22T07:20:06.344-08:00</updated><category term='Unix'/><category term='Script'/><category term='commandline'/><category term='Shell Script'/><category term='admin'/><category term='C'/><category term='readable code'/><category term='Java'/><category term='ASP.NET'/><category term='C++'/><category term='C#'/><category term='general info'/><category term='sharepoint'/><category term='libumem'/><category term='commands'/><category term='Linux'/><category term='wss'/><category term='Solaris'/><category term='Win32'/><category term='Debugging'/><category term='markers'/><category term='Memory'/><category term='Debug'/><category term='Process'/><category term='HP-UX'/><category term='Patterns'/><category term='cmd'/><category term='CPU Usage'/><category term='AIX'/><category term='memory leak'/><title type='text'>ANOOB BACKER Technical Blog</title><subtitle type='html'>about C, C++, Java, C#, SharePoint, Algorithms, Shell Script Tips, Tricks, Tweaks and Hacks</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default?start-index=101&amp;max-results=100'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>106</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17913962.post-1701467935637579688</id><published>2011-05-02T21:57:00.000-07:00</published><updated>2011-05-02T21:57:51.369-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libumem'/><title type='text'>C++ - LIBUMEM Best Simple Memory Leak Detection Tool Ever</title><summary type='text'>A Simple usage of libumem
export LD_PRELOAD=libumem.so
export UMEM_DEBUG=default
export UMEM_LOGGING=transaction
Execute the program collect the core
Debug using core file

bash-3.00# mdb core

Loading modules: [ libumem.so.1 libc.so.1 libuutil.so.1 ld.so.1 ]
&gt; $G

C++ symbol demangling enabled
&gt; ::findleaks
&gt; BUFCTL $&lt;bufctl_audit


BUFCTL is the address outputted by the ::findleaks

http://</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1701467935637579688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1701467935637579688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1701467935637579688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1701467935637579688'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2011/05/c-best-simple-memory-leak-detection.html' title='C++ - LIBUMEM Best Simple Memory Leak Detection Tool Ever'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-1604587644805811032</id><published>2009-02-14T21:05:00.000-08:00</published><updated>2009-02-14T21:17:37.768-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory leak'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='markers'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ - Object Heap Marker to Detect Memory Leaks</title><summary type='text'>In this post I have a program which generates core and from the core file we can find out how many objects for a particular class has been created. This helps in isolating memory leaks related issues. Using this method we can analyze release mode core dumps so as to see the values within each objects.The basic idea is to put a heap marker string along with each object so that we can identify the </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1604587644805811032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1604587644805811032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1604587644805811032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1604587644805811032'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2009/02/c-heap-marker-to-detect-memory-leaks.html' title='C++ - Object Heap Marker to Detect Memory Leaks'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-342896473300762801</id><published>2009-02-14T19:48:00.000-08:00</published><updated>2009-02-14T20:01:06.001-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# - Command line Tools n Modularizing IF-ELSE</title><summary type='text'>I have been writing some of the command line tools which handles lots of functionality. I used to end up writing lots of IF-ELSE which are non reusable code. What I think we should do to make such tools really extensible is defining the commands within an XML file.   &lt;command name="displayallnames" class="[class and assembly name]"  /&gt;Once a person enters a particular option we traverse through </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/342896473300762801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=342896473300762801' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/342896473300762801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/342896473300762801'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2009/02/c-command-line-tools-n-modularizing-if.html' title='C# - Command line Tools n Modularizing IF-ELSE'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-6061120393881210447</id><published>2009-02-09T09:58:00.000-08:00</published><updated>2009-02-14T21:16:35.493-08:00</updated><title type='text'>SharePoint - SSP Personalization Services Permissions</title><summary type='text'>In /ssp/admin/manageservicepermissions.aspx datasources are used to map these permissions. So it seems it gets stored inside a table within SQL &lt;ItemTemplate&gt;  &lt;asp:LinkButton runat="server"     ForeColor='&lt;%#DataBinder.Eval(Container.DataItem, "Color")%&gt;'     OnClientClick='&lt;%#DataBinder.Eval(Container.DataItem, "Script")%&gt;'     Text='&lt;%# DataBinder.Eval(Container.DataItem, "UserName")%&gt;'     </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/6061120393881210447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=6061120393881210447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6061120393881210447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6061120393881210447'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2009/02/sharepoint-ssp-personalization-services.html' title='SharePoint - SSP Personalization Services Permissions'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-6683332338680421115</id><published>2008-12-09T11:13:00.000-08:00</published><updated>2010-10-27T23:42:31.759-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd'/><title type='text'>Windows - 013 Useful Windows Commands</title><summary type='text'>Useful Windows XP commandsMerge two files into another - copy smalefile1 + smallfile2  largefileDecompress Files - extractpushd and popd same as that for bash.Associate a folder to a drive - subst X: C:\windowsTree structure for directory - treeFind files or find string with in a file - find/findstrHiding files within another file(NTFS Filesystem Specific) - type 1.jpg &gt; 1.txt:hidden.jpgAlias a </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/6683332338680421115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=6683332338680421115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6683332338680421115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6683332338680421115'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/12/windows-013-windows-commands-line-tips.html' title='Windows - 013 Useful Windows Commands'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-4030736553246059456</id><published>2008-12-09T11:12:00.000-08:00</published><updated>2008-12-09T11:13:11.802-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux - 013 Linux Bash Tips</title><summary type='text'>0xa  Linux Bash Commands which helps me most in my daily work.1. cd -, swaps take you to the last cd last location2. cd, Change to home directory3. pushd, pushes the current directory path into stack and later you can use popd to go back to that location, use dirs to display the stack4. fg, mainly for programmers who are editing and compiling the from command line. Eg. Start vim make some changes</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/4030736553246059456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=4030736553246059456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4030736553246059456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4030736553246059456'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/12/linux-013-linux-bash-tips.html' title='Linux - 013 Linux Bash Tips'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-1163301845529306774</id><published>2008-12-08T00:43:00.000-08:00</published><updated>2008-12-08T01:37:26.238-08:00</updated><title type='text'>SharePoint - Permissions</title><summary type='text'>SharePoint PermissionsUsing Object Model (OM) we can get all resources and its heirachy details. OM provides RoleAssigment property for each SPWeb/SPList/SPListItem object which will list down the role assignments. Now using this we can collect all the RoleAssignment for all Web-&gt;List-&gt;ListItems.Sample RoleAssigment propertyXML representation of RoleAssigment for web resource (/sites/mysite) is </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1163301845529306774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1163301845529306774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1163301845529306774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1163301845529306774'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/12/sharepoint-permissions.html' title='SharePoint - Permissions'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-4746521118107410525</id><published>2008-11-17T20:36:00.000-08:00</published><updated>2008-11-17T20:40:00.821-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='readable code'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Readable Code - Remove Checking null</title><summary type='text'>Readable Code – Checking NULLWe must have come across these lines of code many times//JAVAbool func(String name){    if ( (name != null) &amp;&amp; (name.equals("true") ) {        ...    } else {        ...    }}A better way to code this would be//JAVAbool func(String name){    if ( "true".equals(name) ) {        ...    } else {        ...    }}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/4746521118107410525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=4746521118107410525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4746521118107410525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4746521118107410525'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/11/readable-code-remove-checking-null.html' title='Readable Code - Remove Checking null'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-6805635618079258752</id><published>2008-11-14T19:20:00.000-08:00</published><updated>2008-11-14T20:02:25.835-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wss'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>SharePoint - Windows SharePoint Services (WSS) Overview and Architecture</title><summary type='text'>IntendOff lately I have started working on technologies based on C# and ASP.NET. Initially I used to concentrate on scalability and performance optimization in C#. Now I have started looking into SharePoint technology. While I was searching for the materials on SharePoint there were a lot of materials which describes the functionality part but I was not able to find any single document that </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/6805635618079258752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=6805635618079258752' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6805635618079258752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/6805635618079258752'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/11/sharepoint-windows-sharepoint-services.html' title='SharePoint - Windows SharePoint Services (WSS) Overview and Architecture'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_xSSiRHFox-c/SR5FgfvjfdI/AAAAAAAACn8/MYwnAwJwnHk/s72-c/image001.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-7778760705630056310</id><published>2008-11-11T18:55:00.000-08:00</published><updated>2008-11-11T18:58:46.258-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general info'/><title type='text'>General Update</title><summary type='text'>Off lately i have started working on various technologies so i am planning to post topics on .NET, JAVA, SharePoint... I will start off with a post on "SharePoint Architecture".thanks</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/7778760705630056310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=7778760705630056310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/7778760705630056310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/7778760705630056310'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/11/general-update.html' title='General Update'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-3676908620200369062</id><published>2008-10-10T11:02:00.000-07:00</published><updated>2008-10-10T11:13:55.917-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'>C++ Programming - Split Linked List into Two</title><summary type='text'>Given a linked listWe have to split it into two. One of the obvious way is to traverse the linked list once get the count and terminating at the midpoint. But it will be of the order n + n/2. Another solution is to add intermediate elements into another linked list which will be of the order n.Here is the solution (C++):template  class node {    T val;    node *nxt;public:    node(T v): val(v), </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/3676908620200369062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=3676908620200369062' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3676908620200369062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3676908620200369062'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/10/c-programming-split-linked-list-into.html' title='C++ Programming - Split Linked List into Two'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_xSSiRHFox-c/SO-ZJOEjREI/AAAAAAAACLo/8IMeH8biEQ8/s72-c/list.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-4700203662007154126</id><published>2008-08-23T02:55:00.001-07:00</published><updated>2008-08-23T03:10:52.936-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>General - Collecting Stack Trace</title><summary type='text'>If we have any native debugger installed collect the stack trace. Try to generate stack trace from core file for all the threads dumped.SOLARISpstack core or /opt/SUNWspro/bin/dbx program core(dbx) thread -info t@1 ==&gt; show the thread information(dbx) where ==&gt; show the thread stack  AIXThe syscorepath utility can be used to specify a single system-wide directory in which all core files of any </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/4700203662007154126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=4700203662007154126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4700203662007154126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4700203662007154126'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/general-collecting-stack-trace.html' title='General - Collecting Stack Trace'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-394948022810224621</id><published>2008-08-23T02:47:00.000-07:00</published><updated>2008-08-23T02:54:27.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general info'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>General - Useful Commands For Collecting  System  Details</title><summary type='text'>I found these command pretty useful or rather i use this as my preliminary analysis part before taking up any UNIX/LINUX issuesIf it is related to any performance or memory issue  vmstat 1 AIX topas  prtconf SOLARIS prtdiagprtconf/proc/meminfoprstat LINUX top -d 1 |grep processnamecat /proc/cpuinfo  cat /proc/meminfo  cat /proc/version HPUX  grep -i Physical /var/adm/syslog/syslog.log </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/394948022810224621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=394948022810224621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/394948022810224621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/394948022810224621'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/general-useful-commands-for-collecting.html' title='General - Useful Commands For Collecting  System  Details'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-8836848582898208157</id><published>2008-08-23T02:36:00.001-07:00</published><updated>2008-08-23T02:44:23.105-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Script'/><category scheme='http://www.blogger.com/atom/ns#' term='Shell Script'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging'/><title type='text'>Shell Scripting - Debugging Shell Scripts</title><summary type='text'>There are various ways of debugging shell scripts, i found these useful when debugging UNIX/LINUX related installer issues.Add the line set -vx in the beginning of the script. The shell script will then start debug output. You can disable the debug message by adding set +vx from that point onwards debug messages will be disabledOr doing sh -x shellscriptfilename (best option out the lot)This is </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/8836848582898208157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=8836848582898208157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/8836848582898208157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/8836848582898208157'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/shell-scripting-debugging-shell-scripts.html' title='Shell Scripting - Debugging Shell Scripts'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-3797472019483658955</id><published>2008-08-23T02:29:00.001-07:00</published><updated>2008-08-23T02:47:01.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general info'/><category scheme='http://www.blogger.com/atom/ns#' term='admin'/><category scheme='http://www.blogger.com/atom/ns#' term='HP-UX'/><title type='text'>General - HPUX FAQs</title><summary type='text'>Useful site which lists down the HPUX related FAQs likeURL: comp.sys.hp.hpux    How can I tell if I have a 32-bit or 64-bit kernel?    How do I determine if a system supports a 32 and/or a 64-bit kernel?    How do I set per-process limits?    Where do I get HP-UX patches?    How can I tell what patches are in the kernel?...</summary><link rel='related' href='http://www.faqs.org/faqs/hp/hpux-faq/preamble.html' title='General - HPUX FAQs'/><link rel='enclosure' type='text/html' href='http://www.faqs.org/faqs/hp/hpux-faq/preamble.html' length='0'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/3797472019483658955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=3797472019483658955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3797472019483658955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3797472019483658955'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/general-hpux-faqs.html' title='General - HPUX FAQs'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-3365638446156790098</id><published>2008-08-09T00:37:00.000-07:00</published><updated>2008-08-23T02:43:53.517-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CPU Usage'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><category scheme='http://www.blogger.com/atom/ns#' term='Shell Script'/><category scheme='http://www.blogger.com/atom/ns#' term='Process'/><title type='text'>Shell Scripting - Monitor Process</title><summary type='text'>This script wil help you in monitoring process resources like memory, cpu usage etc in a portable way across all UNIX/LINUX environment#!bin/shPROCCHECKDELAY=1RUNCHECKDELAY=2PROCNORUN=PAGEROWS=80PROCNAME=$1PROCID=if [ $# -ne 1 ]then echo give program name to watch; exit 1;fistat_process(){ PROCID= _mypid= while [ true ] do   _mypid=`ps -e 2&gt;/dev/null|grep $1|head -n1|awk '{ print $1 }'`;   if [ !</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/3365638446156790098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=3365638446156790098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3365638446156790098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/3365638446156790098'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/shell-script-monitor-process.html' title='Shell Scripting - Monitor Process'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-158046048303648276</id><published>2008-08-08T23:20:00.000-07:00</published><updated>2008-08-09T00:36:02.731-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><title type='text'>C/C++ Programming - Solaris Core Dump Analysis</title><summary type='text'>Solaris is best platforms to trace out the crash issues. They have a bunch of tools to help us instead of screaming in the office during nights :). While analyzing the core dumps i follow few steps given below most of the time which has helped me in most of the scenarios.  Observe the complete stack trace esp multi-threaded programs. $&gt;pstack core|c++filt  Deploy sample programs to test the </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/158046048303648276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=158046048303648276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/158046048303648276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/158046048303648276'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/08/cc-programming-solaris-core-dump.html' title='C/C++ Programming - Solaris Core Dump Analysis'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-1830936556144997171</id><published>2008-04-04T00:15:00.000-07:00</published><updated>2008-04-04T00:36:53.027-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Debug'/><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C/C++ Programming - Windows Memory Leak Analysis using DebugDiag</title><summary type='text'>DebugDiag  one of the simple tools which has helped me in analyzing memory leaks for Windows. Once we enable the tracker to monitor for memory pressure analysis we can generate memory dumps for corresponding process and do an Analysis to get the stack trace, allocation count and memory leak probability. We can also get the dependent DLL specific memory as well, which helps in narrowing down issue</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1830936556144997171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1830936556144997171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1830936556144997171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1830936556144997171'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2008/04/cc-programming-windows-memory-leak.html' title='C/C++ Programming - Windows Memory Leak Analysis using DebugDiag'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-442966678958395582</id><published>2007-12-27T08:31:00.000-08:00</published><updated>2007-12-27T08:37:15.619-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general info'/><title type='text'>General Announcement - New Name...</title><summary type='text'>hi everyone,this is to inform that we are moving to code greping. thanks to blogger for taking care of the old readers...</summary><link rel='related' href='http://code.grep.in' title='General Announcement - New Name...'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/442966678958395582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=442966678958395582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/442966678958395582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/442966678958395582'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/12/general-announcement-new-name.html' title='General Announcement - New Name...'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-5364383471805126513</id><published>2007-12-03T11:53:00.000-08:00</published><updated>2007-12-03T12:06:01.054-08:00</updated><title type='text'>C++ Programming - Windows Compiler and Linker Issues</title><summary type='text'>Few days before in VC 7.0 i had an issue while creating binary using one of my static library files only in case DEBUG build. The linker was crashing with an error LNK1000. Most of my search landed in groups and forum where they advised for M$ support. I kept on searching till i found quiet an useful page LNK1000 error when building resource-only DLLs.  The last post by HuangTM saved my day. i </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/5364383471805126513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=5364383471805126513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5364383471805126513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5364383471805126513'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/12/c-programming-windows-compiler-and.html' title='C++ Programming - Windows Compiler and Linker Issues'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-1369783328330129502</id><published>2007-11-11T02:13:00.000-08:00</published><updated>2007-11-11T02:23:44.449-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Three Beautiful Quicksorts (by Jon Bentley)</title><summary type='text'>This talk describes three of the most beautiful pieces of code that I have ever written:  ... all » three different implementations of Hoare's classic Quicksort algorithm. The first implementation is a bare-bones function in about a dozen lines of C. The second implementation starts by instrumenting the first program to measure its run time; a dozen systematic code transformations proceed to make</summary><link rel='related' href='http://video.google.com/videoplay?docid=-1031789501179533828' title='C Programming - Three Beautiful Quicksorts (by Jon Bentley)'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1369783328330129502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1369783328330129502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1369783328330129502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1369783328330129502'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/11/c-programming-three-beautiful.html' title='C Programming - Three Beautiful Quicksorts (by Jon Bentley)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-5250303616085972554</id><published>2007-11-11T02:09:00.000-08:00</published><updated>2007-11-11T02:13:13.528-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debug'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><title type='text'>Debugging - Core Dump Management on the Solaris OS</title><summary type='text'>Really cool article on how to manage core files under solaris. Sun has a very nice list of tools like coreadm, pstack and dumpadm.enjoy debugging!</summary><link rel='related' href='http://developers.sun.com/solaris/articles/manage_core_dump.html' title='Debugging - Core Dump Management on the Solaris OS'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/5250303616085972554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=5250303616085972554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5250303616085972554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5250303616085972554'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/11/debugging-core-dump-management-on.html' title='Debugging - Core Dump Management on the Solaris OS'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-1505746601930753635</id><published>2007-11-09T00:02:00.000-08:00</published><updated>2007-11-09T00:28:38.012-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='AIX'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><category scheme='http://www.blogger.com/atom/ns#' term='HP-UX'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><title type='text'>C C++ Programming - Useful Tracing and Profiling Tools</title><summary type='text'>I have been searching for few tracing and profiling tools these days. Tracing tools are my fav because we will be able to debug it while it is running and can get an overview of what is happening inside a.out. esp while learning the flow of a prog.I found the given below tools and links very useful...LinuxgprofGNU gprofSpeed your code with the GNU profilercallgrindCallgrind: a heavyweight </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/1505746601930753635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=1505746601930753635' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1505746601930753635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/1505746601930753635'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/11/c-c-programming-useful-tracing-and.html' title='C C++ Programming - Useful Tracing and Profiling Tools'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-5366979502029080454</id><published>2007-11-02T15:17:00.000-07:00</published><updated>2007-11-09T00:29:19.505-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Script'/><category scheme='http://www.blogger.com/atom/ns#' term='AIX'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><category scheme='http://www.blogger.com/atom/ns#' term='HP-UX'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><title type='text'>Shell Script - Memory Watch for UNIX Platforms</title><summary type='text'>Simple memory profile script for UNIX/LINUX platforms.#!bin/shPROCCHECKDELAY=1RUNCHECKDELAY=2PAGEROWS=80PROCNAME=$1PROCID=if [ $# -ne 1 ]then        echo give program name to watch;        exit 1;fistat_process(){    PROCID=    _mypid=    while [ true ]    do        _mypid=`ps -e 2&gt;/dev/null|grep $1|head -n1|awk '{ print $1 }'`;        if [ -z "$_mypid" ]        then            echo "$1 is not </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/5366979502029080454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=5366979502029080454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5366979502029080454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/5366979502029080454'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/11/shell-script-memory-watch-for-unix.html' title='Shell Script - Memory Watch for UNIX Platforms'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-747142704059856895</id><published>2007-11-02T14:41:00.000-07:00</published><updated>2007-11-02T15:11:20.207-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Path Correction</title><summary type='text'>If you enter any relative path convert that to absolute path removing those dotdot and dot. Assuming that input is following our grammer :)eg: Input: /a/b/c/.././ and Output: /a/bThe most obvious solution seems to be stack. But i wanted to give a try with an in-place replacement logic. Here is what i came up with. Lets start from the other end of the string.#define COLS 2#define TESTPATHS{{"/asd/</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/747142704059856895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=747142704059856895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/747142704059856895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/747142704059856895'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/11/c-programming-path-correction.html' title='C Programming - Path Correction'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-4746492294933110253</id><published>2007-01-26T06:54:00.000-08:00</published><updated>2007-01-26T07:40:26.433-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Empty Base Class Optimization</title><summary type='text'>It is know that a class without any non-static data members will be having a size of 1 byte.class A {    static int i;}; // sizeof(A) will be 1Now suppose that we inherited this to create another empty (no non-static member) class B, as followclass B: public A {   }; // Still sizeof(B) will be 1 instead of 2 bytesNow lets take the case in which the inherited class has a non-static data member. </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/4746492294933110253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=4746492294933110253' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4746492294933110253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/4746492294933110253'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/01/c-programming-empty-base-class.html' title='C++ Programming - Empty Base Class Optimization'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-2174608851591028438</id><published>2007-01-26T06:51:00.000-08:00</published><updated>2007-01-29T10:06:17.322-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Programming - Code Browsing Made Easy Using ctags+gvim</title><summary type='text'>Using ctags+gvim for code browsing... The following command generates a tag file for C/C++ ONLY, you can extend the exclude list for more specific one. ctags -R --languages="-Java,-JavaScript,-HTML,-Perl,-Sh" &lt; directory name &gt;For listing all supported languages usectags --list-languages</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/2174608851591028438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=2174608851591028438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/2174608851591028438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/2174608851591028438'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2007/01/programming-code-browsing-made-easy.html' title='Programming - Code Browsing Made Easy Using ctags+gvim'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116680027549473054</id><published>2006-12-22T07:11:00.000-08:00</published><updated>2006-12-22T07:26:12.513-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - BST Level Order Printing</title><summary type='text'>Q. Level Order traversal of Binary Search TreeThis will traverse the BST in levels and print the elements according to the level from left to right.Node:struct Node {    Node *left;    Node *right;    int data;    Node(int value) : data(value)     {        left = right = NULL;    }};Explaination:This is a common solution. The logic behind this we start of with a queue which is having the root </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116680027549473054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116680027549473054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116680027549473054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116680027549473054'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/12/c-programming-bst-level-order-printing.html' title='C++ Programming - BST Level Order Printing'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116664185670663798</id><published>2006-12-20T11:10:00.000-08:00</published><updated>2006-12-28T02:02:19.773-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Removing Loop from a Linked List</title><summary type='text'>Given a Linked List which has loop within it, remove the looping with minimum complexity.Node:struct NODE {    int data;    struct NODE *next;}Explanation:If Linked List is as given below1-&gt;2-&gt;3-&gt;4-&gt;5-&gt;6          |_________|What we are doing in this solutions is inserting an element who data element is known to us between every node, such that it looks like1-&gt;B-&gt;2-&gt;B-&gt;3-&gt;B-&gt;4-&gt;B-&gt;5-&gt;B-&gt;6</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116664185670663798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116664185670663798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116664185670663798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116664185670663798'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/12/c-programming-removing-loop-from.html' title='C Programming - Removing Loop from a Linked List'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116663890832162298</id><published>2006-12-20T10:14:00.000-08:00</published><updated>2006-12-20T10:22:48.153-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Divisible By 3 or Not (continued)</title><summary type='text'>Some more additions to my previous post C Programming - Divisible By 3 or Not.Code:1. A solution that I got as a comment to my previous post. Thanks Piyush!struct NODE {    bool returnValue;    struct NODE *next;} MOD3_LOOP[3];bool DivBy3(int n){    MOD3_LOOP[0].returnValue = TRUE;    MOD3_LOOP[0].next = &amp;MOD3_LOOP[1];    MOD3_LOOP[1].returnValue = FALSE;    MOD3_LOOP[1].next = &amp;MOD3_LOOP[2];    </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116663890832162298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116663890832162298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116663890832162298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116663890832162298'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/12/c-programming-divisible-by-3-or-not.html' title='C Programming - Divisible By 3 or Not (continued)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116641877650494044</id><published>2006-12-17T20:59:00.000-08:00</published><updated>2006-12-18T08:44:32.500-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Copy Linked List (including arbitrary pointer)</title><summary type='text'>Given a Linked List of node structure asstruct Node {    type element;    Node *next;    Node *arb;};You are asked to create an exact copy this linked list. Pointer arb points to an arbitrary node with in the Linked List.Solution:Suppose the original linked list is likeX1-&gt;X2-&gt;X3-&gt;....-&gt;NULL we are supposed to create another Linked List like Y1-&gt;Y2-&gt;Y3-&gt;....-&gt;NULL.First we modify the Source </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116641877650494044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116641877650494044' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116641877650494044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116641877650494044'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/12/c-programming-copy-linked-list.html' title='C Programming - Copy Linked List (including arbitrary pointer)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116231149448169910</id><published>2006-10-31T08:18:00.000-08:00</published><updated>2006-10-31T08:26:23.426-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Different signature problem with extern variables</title><summary type='text'>One of my friend asked me this question few days back which seemed to be very interesting for me atleast. The question was as follows File1.c  File2.c   1  int arr[80];    1  extern int *arr;2  int main()3  {4      arr[1] = 100;5      return 0;6  }What will be the output when complied and linked together?&lt;!-- Put here the contents which are not to be displayed in the main page --&gt;It was </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116231149448169910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116231149448169910' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116231149448169910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116231149448169910'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/10/c-programming-different-signature.html' title='C Programming  -  Different signature problem with extern variables'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-116098608739499013</id><published>2006-10-16T01:06:00.000-07:00</published><updated>2006-10-16T01:08:07.406-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><title type='text'>Window - 013 Windows XP Commands</title><summary type='text'>Some nice Windows XP commands1. Merge two files into another - copy smalefile1 + smallfile2  largefile2. Decompress Files - extract3. pushd and popd same as that for bash.4. Associate a folder to a drive - subst X: C:\windows5. tree structure for directory - tree6. find files or find string with in a file - find/findstr7. Hiding files within another file(NTFS Filesystem Specific) - type 1.jpg &gt; 1</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/116098608739499013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=116098608739499013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116098608739499013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/116098608739499013'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/10/window-013-windows-xp-commands.html' title='Window - 013 Windows XP Commands'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-115911113036074083</id><published>2006-09-24T08:14:00.000-07:00</published><updated>2006-12-28T01:45:28.770-08:00</updated><title type='text'>Linux - 013 Linux Bash Tips</title><summary type='text'>0xa  Linux Bash Commands which helps me most in my daily work.1. cd -, swaps take you to the last cd last location2. cd, Change to home directory3. pushd, pushes the current directory path into stack and later you can use popd to go back to that location, use dirs to display the stack4. fg, mainly for programmers who are editing and compiling the from command line. Eg. Start vim make some changes</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/115911113036074083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=115911113036074083' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115911113036074083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115911113036074083'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/09/linux-013-linux-bash-tips.html' title='Linux - 013 Linux Bash Tips'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-115876536565978986</id><published>2006-09-20T08:01:00.000-07:00</published><updated>2006-09-20T08:25:24.796-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><title type='text'>Windows - Debugging Tools</title><summary type='text'>I would like to mention few very good debugging tools which were very useful for me.All the below links correspond to 32 bit platforms, go to those links they says it all.1. Debugging Tools for Windows2. Debug Diag3. Dependency Walker4. Process Explorer5. DebugView 6. JXplorer - For LDAP related stuffs</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/115876536565978986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=115876536565978986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115876536565978986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115876536565978986'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/09/windows-debugging-tools.html' title='Windows - Debugging Tools'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-115859228790640233</id><published>2006-09-18T08:10:00.000-07:00</published><updated>2006-12-16T01:01:47.293-08:00</updated><title type='text'>Update....</title><summary type='text'>I will be posting my articles in both K5REC as well as cprogrammers.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/115859228790640233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=115859228790640233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115859228790640233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115859228790640233'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/09/update.html' title='Update....'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-115859219289765278</id><published>2006-09-18T07:51:00.000-07:00</published><updated>2006-09-18T08:09:52.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><title type='text'>Windows - Memory Leak Analysis using Windbg</title><summary type='text'>Windbg is a tool from the house of MS. It come handy when debugging in a production enviornment as it is light weight. I have been using Windbg for the last few weeks and I would like to share some tips.Let us start of with memory leak analysis!Download Location: Debugging Tools For WindowsWindbg has build in extension exts.dll which can used to find memory leaks. Here are the steps. Enable Stack</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/115859219289765278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=115859219289765278' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115859219289765278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/115859219289765278'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/09/windows-memory-leak-analysis-using.html' title='Windows - Memory Leak Analysis using Windbg'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114967885564486844</id><published>2006-06-07T04:04:00.000-07:00</published><updated>2006-06-07T04:20:01.580-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Divisible By 3 or Not</title><summary type='text'>Given a number we have to find whether it is divisible by 3 or not without using /,%,*.We are provided with char *itoa(int) functionPlease post in your comments. Let us find a good solution!!!!Solution:One of the property of a number divisible by 3 is that its sum of digits will be also divisible by 3.Suppose abcd is a 4 digit decimal numberabdc = 1000a + 100b + 10c + d = (999a + 99b + 9c) + (a +</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114967885564486844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114967885564486844' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114967885564486844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114967885564486844'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/06/c-programming-divisible-by-3-or-not.html' title='C Programming  -  Divisible By 3 or Not'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114922817914326917</id><published>2006-06-01T22:59:00.000-07:00</published><updated>2006-06-01T23:03:22.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  - Remove Characters within a String</title><summary type='text'>The characters to be removed from a string is given as another string.Your comments are valuable!!Solution:void remove(char src[], char del[]){     char hash[26] = {0};     char *fsrc = del,*fdst;     int count;     while(*fsrc) {          hash[*fsrc - 'a'] = 1;          fsrc++;     }     fsrc = fdst = src;     while(*fsrc) {          if ( (*fsrc == ' ') || ( hash[*fsrc - 'a'] == 0 ) ) {</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114922817914326917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114922817914326917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114922817914326917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114922817914326917'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/06/c-programming-remove-characters-within.html' title='C Programming  - Remove Characters within a String'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114922787589732838</id><published>2006-06-01T22:32:00.000-07:00</published><updated>2006-06-01T22:57:55.913-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Rev()</title><summary type='text'>An array of size N has distinct values 1…N in random order. You have only operator called rev(X) (where X is any value from 0 to N-1) which reverses all values from 0 to X (example values 2,3,1,4 and rev(2) gets you 1,3,2,4). Our objective is to sort the array using minimum number of Rev(X) functions. How many permutations of N size array require exactly N number of rev(X) operators to get </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114922787589732838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114922787589732838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114922787589732838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114922787589732838'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/06/c-programming-rev.html' title='C Programming  -  Rev()'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114775430689508019</id><published>2006-05-15T21:36:00.000-07:00</published><updated>2006-05-15T21:38:26.910-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - String to Integer (atoi)</title><summary type='text'>Another TechMahindra Interview question. The question was to convert a VALID string into its corresponding integer value.Post in your comments!Solution:int atoi(char *string){    int value=0,sign=1;       if ( !string || !*string ) return 0;      if ( *string == '-' ) {        sign = -1;        string++;   }      while ( *string ) {         if ( (*string &gt;= '0') &amp;&amp; (*string &lt;= '9') ) {</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114775430689508019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114775430689508019' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114775430689508019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114775430689508019'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/05/c-programming-string-to-integer-atoi.html' title='C Programming - String to Integer (atoi)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114770205400946401</id><published>2006-05-15T07:05:00.000-07:00</published><updated>2006-05-15T07:07:34.023-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Reverse Bits in an Integer</title><summary type='text'>It is supposed to be an 32bit integer. Solution:unsigned intreverse(register unsigned int x){ x = (((x &amp; 0xaaaaaaaa) &gt;&gt; 1) | ((x &amp; 0x55555555) &lt;&lt; 1)); x = (((x &amp; 0xcccccccc) &gt;&gt; 2) | ((x &amp; 0x33333333) &lt;&lt; 2)); x = (((x &amp; 0xf0f0f0f0) &gt;&gt; 4) | ((x &amp; 0x0f0f0f0f) &lt;&lt; 4)); x = (((x &amp; 0xff00ff00) &gt;&gt; 8) | ((x &amp; 0x00ff00ff) &lt;&lt; 8)); return((x &gt;&gt; 16) | (x &lt;&lt; 16));}</summary><link rel='related' href='http://aggregate.org/MAGIC/#Bit%20Reversal' title='C Programming - Reverse Bits in an Integer'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114770205400946401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114770205400946401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770205400946401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770205400946401'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/05/c-programming-reverse-bits-in-integer.html' title='C Programming - Reverse Bits in an Integer'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114770036840508349</id><published>2006-05-15T06:37:00.000-07:00</published><updated>2006-05-15T06:40:14.646-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Remove Concequetive Repeting Chars with that Character</title><summary type='text'>What I meant was convert "aaabccddd" to "abcd".Solution:#include &lt; stdio.h &gt;#define STRING "aaabccddd"int replaceCChars(char *string){    char *dest=string;        while(*string) {         if ( *string != *(string+1) ) {                   *dest++ = *string;         }         string++;    }    *dest = '\0';     }int main(){    char a[]=STRING;    printf("Before: %s ",a);    replaceCChars(a);    </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114770036840508349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114770036840508349' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770036840508349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770036840508349'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/05/c-programming-remove-concequetive.html' title='C Programming  -  Remove Concequetive Repeting Chars with that Character'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114770016269652242</id><published>2006-05-15T06:34:00.000-07:00</published><updated>2006-12-18T08:58:55.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Find Perfect Square Between Two Numbers</title><summary type='text'>TechMahindra Interview Question, this is how I did that.Solution:#include &lt; stdio.h &gt;#define START 10#define STOP 100int main(){    int i=0;    while( (i*i) &lt; START ) i++;    while( (i*i) &lt; STOP ) {           printf("%d ",i*i);           i++;    }}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114770016269652242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114770016269652242' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770016269652242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114770016269652242'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/05/c-programming-find-perfect-square.html' title='C Programming - Find Perfect Square Between Two Numbers'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114769994298319548</id><published>2006-05-15T06:29:00.000-07:00</published><updated>2006-05-15T06:36:17.820-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Reverse Words in a String (In-Place)</title><summary type='text'>Another typical interview question!!Here is the solution that I could think off...Post your comments!!!Solution:#include &lt; stdio.h &gt;#define SENT "Hello I am Here"int reverse(char *string, char delimiter){    char *src, *dest,*temp=string;    while( *temp ) {         if (*temp == delimiter) {                     temp++;                     continue;         }         src=dest=temp;         while (</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114769994298319548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114769994298319548' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114769994298319548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114769994298319548'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/05/c-programming-reverse-words-in-string.html' title='C Programming - Reverse Words in a String (In-Place)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114630110707987233</id><published>2006-04-29T01:54:00.000-07:00</published><updated>2006-04-29T01:58:27.090-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Dynamic Pointer Cast vs Dynamic Reference Cast</title><summary type='text'>Only difference is that in case of bast casts to references a suitable handler can be provided.Like the one belowtry {    A &amp;a = dynamic_cast &lt; A &amp; &gt;(b); // suppose that this fails}catch (bad_cast) {     // do what ever you want}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114630110707987233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114630110707987233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114630110707987233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114630110707987233'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/04/c-programming-dynamic-pointer-cast-vs.html' title='C Programming - Dynamic Pointer Cast vs Dynamic Reference Cast'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114614540459982304</id><published>2006-04-27T06:36:00.000-07:00</published><updated>2006-04-27T06:43:24.613-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Using Declarations for Access Control</title><summary type='text'>class A {private:    int a;protected:    int b;public:    int c;}class B: private A {    using B::b;    using B::c;}This gives access to B::b and B::c but not B::a.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114614540459982304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114614540459982304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114614540459982304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114614540459982304'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/04/c-programming-using-declarations-for.html' title='C++ Programming - Using Declarations for Access Control'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114603405860113063</id><published>2006-04-25T23:44:00.000-07:00</published><updated>2006-04-26T00:04:52.803-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Format Strings are Important!!</title><summary type='text'>Guess, What will be the output?#include &lt; stdio.h &gt;int main(int argc, char *argv[]){ int i=10; int *j=&amp;i; printf("aaa%n\n"); printf("%d\n",i);}I ran this program on .NET platform with optimization disabled, it should be portable across all other platforms also.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114603405860113063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114603405860113063' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114603405860113063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114603405860113063'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/04/c-programming-format-strings-are.html' title='C Programming - Format Strings are Important!!'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114516378170683165</id><published>2006-04-15T21:57:00.000-07:00</published><updated>2006-04-15T22:22:10.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  - Is that a Prime Number?</title><summary type='text'>Interviewers favourite :)The problem is to find out whether a number is prime or not?This is the one best solution that I could find out!!!Solution:/* returns 1, if number is prime else 0 */int prime(int number){    int iter,bound;    if (!(number % 2)) return (number == 2);    if (!(number % 3)) return (number == 3);    if (!(number % 5)) return (number == 5);    for(iter = 7; (iter * iter)&lt;= </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114516378170683165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114516378170683165' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114516378170683165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114516378170683165'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/04/c-programming-is-that-prime-number.html' title='C Programming  - Is that a Prime Number?'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114397351764056953</id><published>2006-04-02T03:23:00.000-07:00</published><updated>2006-04-02T03:25:17.640-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Max Sum</title><summary type='text'>You have an array of n nonzero numbers. The array is randomly filled with positive and negative numbers.Write an algorithm/program to find 2 such indexes in the array, so as the sum of the numbers between these indexes is the maximum.For e.g. if the array is10, -20, 9, 8, 3, -12, 6, 3, 4, 1, -5, 3, -1Then the indexes would be 2 and 9, the sum is 9 + 8 + 3 + -12 + 6 + 3 + 4 + 1 =22At first glance </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114397351764056953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114397351764056953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114397351764056953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114397351764056953'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/04/c-programming-max-sum.html' title='C Programming - Max Sum'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114302076308663657</id><published>2006-03-22T01:40:00.000-08:00</published><updated>2006-03-22T01:51:10.936-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Self Exploit</title><summary type='text'>Self Exploit &lt; Code Snippet &gt;. strcpy !!!! Is she the culprit?Note: Tested on Redhat Linux i386 platform.#include &lt; string.h &gt;#include &lt; stdio.h &gt;#include &lt; stdlib.h &gt;int payload();int exploit(char *d);int main() {    int distance;    char a[512] = {0};    distance = exploit(NULL);    memset(a, 0xFF, distance);    *(void**)(a + distance) = &amp;payload;    *(void**)(a + distance + sizeof(void*)) = 0;</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114302076308663657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114302076308663657' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114302076308663657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114302076308663657'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-self-exploit.html' title='C Programming  -  Self Exploit'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114300625730304212</id><published>2006-03-21T21:38:00.000-08:00</published><updated>2006-04-02T03:27:36.480-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Program that prints itself</title><summary type='text'>This program output will print the program itselfint main(){char c[]="int main()%c{%cchar c[]=%c%s%c;%cprintf(c,10,10,34,c,34,10,10,10);%c}%c";printf(c,10,10,34,c,34,10,10,10);}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114300625730304212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114300625730304212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114300625730304212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114300625730304212'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-program-that-prints.html' title='C Programming - Program that prints itself'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114285650959421137</id><published>2006-03-20T03:58:00.000-08:00</published><updated>2006-03-21T21:37:08.373-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Print In Reverse-Order</title><summary type='text'>This is only for printing, we are not storing the reversed output anywhere and another shortcoming is that it will cause SEGFAULT for a huge length string.Recursive main() calling!! For beginners it will be a great to surprise to call main() function within main() it, but wait, Isn't main() also a function?/* reverse.c */#include int main(){    char ch;    if ( (ch=getchar()) != '\n' ) {        </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114285650959421137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114285650959421137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114285650959421137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114285650959421137'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-print-in-reverse-order.html' title='C Programming - Print In Reverse-Order'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114198205961405817</id><published>2006-03-12T22:17:00.000-08:00</published><updated>2006-03-12T22:40:35.303-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Extract Token from Strings</title><summary type='text'>glibc implementation of strtok for i386 platform.static char *olds;void *rawmemchr (const void *s, int c){  register unsigned long int d0;  register unsigned char *res;  __asm__ __volatile__    ("cld\n\t"     "repne; scasb\n\t"     : "=D" (res), "=&amp;c" (d0)     : "a" (c), "0" (s), "1" (0xffffffff),       "m" ( *(struct { char __x[0xfffffff]; } *)s)     : "cc");  return res - 1;}char *strtok (char </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114198205961405817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114198205961405817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114198205961405817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114198205961405817'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-extract-token-from.html' title='C Programming  -  Extract Token from Strings'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114180357624903909</id><published>2006-03-09T13:08:00.000-08:00</published><updated>2006-03-21T21:46:59.853-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Heap Overview</title><summary type='text'>An Overview of Heap OverflowEach threads of a running program has a stack where local variables are stored. In linux all program has a .BSS (global and static uninitialized varibles) and .DATA segment (global and static initialized varibles) along with other segments used by malloc() and allocated with brk() - Sets the end of data segment to the values specified or mmap() - map file into memory, </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114180357624903909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114180357624903909' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114180357624903909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114180357624903909'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-heap-overview.html' title='C Programming  -  Heap Overview'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114180381990498767</id><published>2006-03-07T23:39:00.000-08:00</published><updated>2006-03-07T23:43:39.913-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  - String Length!!</title><summary type='text'>glibc implementation of strlen for i386 platform.Cool!size_tstrlen (const char *str){  int cnt;  asm("cld\n"   /* Search forward.  */      /* Some old versions of gas need `repne' instead of `repnz'.  */      "repnz\n"   /* Look for a zero byte.  */      "scasb" /* %0, %1, %3 */ :      "=c" (cnt) : "D" (str), "0" (-1), "a" (0));  return -2 - cnt;}Note: This was extracted from glibc-2.3.6 (sysdeps</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114180381990498767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114180381990498767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114180381990498767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114180381990498767'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-string-length.html' title='C Programming  - String Length!!'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114163096612787880</id><published>2006-03-05T23:21:00.000-08:00</published><updated>2006-03-05T23:44:58.733-08:00</updated><title type='text'>My Favourites</title><summary type='text'>My Favourite Casts:Unlimited Enlightenment!!!!CS 162: Operating Systems and System Programming by Anthony JosephHak5 by Darren, Wess, Alli, Harison and JonathanKn1ght's Round Table by Kn1ghtl0rdMac Pro Podcast and Podcaster Confessions by Joseph NiloMartin Bailey Photography Podcast by Martin BaileySecurity Now! by Steve Gibson and Leo LaporteTWiT by Leo  Laporte</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114163096612787880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114163096612787880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114163096612787880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114163096612787880'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/my-favourites.html' title='My Favourites'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114157612910518773</id><published>2006-03-05T08:19:00.000-08:00</published><updated>2006-03-07T07:49:46.506-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  ShellCoding Series - Episode #1 (AUDIO)</title><summary type='text'>At last ended up creating AUDIO!Overview of Linux Process Memory ModelOverview Stack SegmentStack Segment PopulationStack Segment ManipulationDownload MP3| AACNext Episode: Writing ShellCode for Spawing a Shell (/bin/sh)Show Notes:Program1:/* program1.c */int f(int i, int j, int k){   char buffer1[5];   char buffer2[10];}int main(){   f(1,2,3);}Disassembly of Program1.c:$&gt; gdb -q program1(no </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114157612910518773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114157612910518773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114157612910518773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114157612910518773'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-shellcoding-series.html' title='C Programming  -  ShellCoding Series - Episode #1 (AUDIO)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114136536364652243</id><published>2006-03-02T21:43:00.000-08:00</published><updated>2006-03-02T23:47:10.803-08:00</updated><title type='text'>Network Sniffing - Cain &amp; Abel!</title><summary type='text'>I ran cain &amp; abel to listen to my ethernet adapater. The surprising stuff was that I didn't if have to do an ARP Poisioning!!! bcoz all the machines was connected to a HUB.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114136536364652243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114136536364652243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114136536364652243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114136536364652243'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/network-sniffing-cain-abel.html' title='Network Sniffing - Cain &amp; Abel!'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114136451216424322</id><published>2006-03-02T21:13:00.000-08:00</published><updated>2006-03-20T22:19:46.756-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Bit Twiddling Hack</title><summary type='text'>Some Bit Twiddling code snippets!!Bit Twiddling HacksContents:# Compute the sign of an integer# Compute the integer absolute value (abs) without branching# Compute the minimum (min) or maximum (max) of two integers without branching# Determining if an integer is a power of 2# Sign extending    * Sign extending from a constant bit width    * Sign extending from a variable bit-width    * Sign </summary><link rel='related' href='http://graphics.stanford.edu/~seander/bithacks.html' title='C Programming - Bit Twiddling Hack'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114136451216424322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114136451216424322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114136451216424322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114136451216424322'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-bit-twiddling-hack.html' title='C Programming - Bit Twiddling Hack'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114128348863117127</id><published>2006-03-01T23:06:00.000-08:00</published><updated>2006-03-01T23:11:28.633-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>Operating System/Data Structures/Machine Structures Classes from Berkeley</title><summary type='text'>Following are RSS feeds for MOST WANTED!!!Operating Systems and System ProgrammingThe Structure and Interpretation of Computer ProgramsData StructuresMachine Structures</summary><link rel='related' href='http://webcast.berkeley.edu/courses/feeds.php' title='Operating System/Data Structures/Machine Structures Classes from Berkeley'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114128348863117127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114128348863117127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114128348863117127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114128348863117127'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/operating-systemdata-structuresmachine.html' title='Operating System/Data Structures/Machine Structures Classes from Berkeley'/><author><name>bekz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114123099472779338</id><published>2006-03-01T08:16:00.000-08:00</published><updated>2006-03-01T08:43:51.390-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming  -  Stack Segment</title><summary type='text'>#include &lt; stdio.h &gt;main(){   char i=10;   char *ptr=&amp;i;   unsigned long j;   for(j=0; j&lt;4294967296; j++) printf("%u -- %d\n",ptr+j, *(ptr+j)); }Platform used: Redhat Linux E.L 4.0 on Intel P4 2.8GhzWe got a SEG fault when (ptr+j) crosses 3GB. Why?It does not seem to be an authentic explanation to me as well, but learn something from this.PAE (Physical Address Extension) enabled kernel will </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114123099472779338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114123099472779338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114123099472779338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114123099472779338'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/03/c-programming-stack-segment.html' title='C Programming  -  Stack Segment'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114114657460497669</id><published>2006-02-28T09:05:00.000-08:00</published><updated>2006-03-01T23:21:09.323-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Is static the problem?</title><summary type='text'>#include &lt; iostream &gt;using namespace std;static int i;class x { int i; public:  x() { cout &lt;&lt; "In HERE" &lt;&lt; endl; }  int geti() { return i; }};int main(){ cout &lt;&lt; "Inside main() = " &lt;&lt; ((x *)(&amp;i+1))-&gt;geti() &lt;&lt; endl; *(&amp;i+1) = 17; cout &lt;&lt; "Inside main() = " &lt;&lt; ((x *)(&amp;i+1))-&gt;geti() &lt;&lt; endl; static x aa; cout &lt;&lt; "Inside f() : " &lt;&lt; aa.geti() &lt;&lt; endl; x bb;}When we ran this on Intel Platform Linux (</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114114657460497669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114114657460497669' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114114657460497669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114114657460497669'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/c-programming-is-static-problem.html' title='C++ Programming - Is static the problem?'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-114103079332001449</id><published>2006-02-27T00:56:00.000-08:00</published><updated>2006-02-27T01:01:46.226-08:00</updated><title type='text'>Excuses ...</title><summary type='text'>Still researching the software with which I can do the video, as I am not having any prof camera I am going to do a screenrecorder kind of video.Still in a great confussion to make this an complete audio as we have video posted earlierJust send me the links of software that are suitable for capturing screen and audio, currently i am using iCord.Post in your comments!!</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/114103079332001449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=114103079332001449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114103079332001449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/114103079332001449'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/excuses.html' title='Excuses ...'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113955267457443387</id><published>2006-02-09T22:21:00.000-08:00</published><updated>2006-02-09T22:55:32.203-08:00</updated><title type='text'>Future  ...</title><summary type='text'>A complete discussion on the article by Aleph One. Complete hands-on video this time along with SOUND (for deaf ;)Feel free to post comments, your input are valuable!!!!!!</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113955267457443387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113955267457443387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113955267457443387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113955267457443387'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/future.html' title='Future  ...'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113946860679400306</id><published>2006-02-08T23:03:00.000-08:00</published><updated>2006-03-05T08:04:08.776-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - ShellCode Writing Part 2 (NO AUDIO)</title><summary type='text'>Shellcode writing with null byte stripped!!!Download - Video File</summary><link rel='related' href='http://www.archive.org/download/Stack_Overflow__Shellcode/presentation2.avi' title='C Programming - ShellCode Writing Part 2 (NO AUDIO)'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113946860679400306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113946860679400306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113946860679400306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113946860679400306'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/c-programming-shellcode-writing-part-2.html' title='C Programming - ShellCode Writing Part 2 (NO AUDIO)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113929583561806744</id><published>2006-02-06T23:01:00.000-08:00</published><updated>2006-03-05T08:03:18.730-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Shellcode Writing Part 1 (NO AUDIO)</title><summary type='text'>ShellCode writing (without trimming null).Reference: Smashing The Stack For Fun And ProfitDownload - Video File</summary><link rel='related' href='http://www.archive.org/download/Stack_Overflow__ShellCode_with_Null_Characters/presentation1.avi' title='C Programming - Shellcode Writing Part 1 (NO AUDIO)'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113929583561806744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113929583561806744' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113929583561806744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113929583561806744'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/c-programming-shellcode-writing-part-1.html' title='C Programming - Shellcode Writing Part 1 (NO AUDIO)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113922062571810125</id><published>2006-02-06T02:07:00.000-08:00</published><updated>2006-02-06T02:10:25.720-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Find a Linked List is cyclic or not (Vintage Method)</title><summary type='text'>Two pointer method:Keep two pointers. One at element 1 and the next at element 3. See if they are equal; if not, move P1 by one and P2 by two. Check and continue. If P1 or P2 is null, there is no loop. If there is one, it will definitely be detected. One pointer will eventually catch up with the other (i.e., have the same value), though it might take several traversals of the cycle to do it.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113922062571810125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113922062571810125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113922062571810125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113922062571810125'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/c-programming-find-linked-list-is.html' title='C Programming - Find a Linked List is cyclic or not (Vintage Method)'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113922022012945415</id><published>2006-02-06T01:35:00.000-08:00</published><updated>2006-02-09T22:25:40.536-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Skip Video!!!! NO AUDIO</title><summary type='text'>Seeing is believing!!!Check this previous post for more detailsDownload - Video File</summary><link rel='related' href='http://www.archive.org/download/Stack_Overflow__WarmUP/presentation.avi' title='C Programming - Skip Video!!!! NO AUDIO'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113922022012945415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113922022012945415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113922022012945415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113922022012945415'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/02/c-programming-skip-video-no-audio.html' title='C Programming - Skip Video!!!! NO AUDIO'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113747381962833003</id><published>2006-01-16T20:56:00.000-08:00</published><updated>2006-01-16T20:56:59.630-08:00</updated><title type='text'>Would you like to work for Google?</title><summary type='text'>Cool stuff!!!</summary><link rel='related' href='http://video.google.com/videoplay?docid=-8618166999532839788' title='Would you like to work for Google?'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113747381962833003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113747381962833003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113747381962833003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113747381962833003'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/would-you-like-to-work-for-google.html' title='Would you like to work for Google?'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113747232771549725</id><published>2006-01-16T20:29:00.000-08:00</published><updated>2006-01-16T20:32:07.726-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Smashing the stack for fun and profit</title><summary type='text'>An intro to how stack overflow works, how to exploit those and some more shellcode</summary><link rel='related' href='http://www.securityforest.com/wiki/index.php/Smashing_the_stack_for_fun_and_profit' title='C Programming - Smashing the stack for fun and profit'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113747232771549725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113747232771549725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113747232771549725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113747232771549725'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/c-programming-smashing-stack-for-fun.html' title='C Programming - Smashing the stack for fun and profit'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113740505910330136</id><published>2006-01-16T01:49:00.000-08:00</published><updated>2006-01-16T01:50:59.103-08:00</updated><title type='text'>Programming - How to be a Programmer</title><summary type='text'>How to be a Programmer: A Short, Comprehensive, and Personal Summary!!!!</summary><link rel='related' href='http://samizdat.mines.edu/howto/HowToBeAProgrammer.html' title='Programming - How to be a Programmer'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113740505910330136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113740505910330136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740505910330136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740505910330136'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/programming-how-to-be-programmer.html' title='Programming - How to be a Programmer'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113740443800599422</id><published>2006-01-16T01:39:00.000-08:00</published><updated>2006-01-16T01:40:38.006-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - The Ten Commandments for C Programmers</title><summary type='text'>Dos and dons!!!!</summary><link rel='related' href='http://www.lysator.liu.se/c/ten-commandments.html' title='C Programming - The Ten Commandments for C Programmers'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113740443800599422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113740443800599422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740443800599422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740443800599422'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/c-programming-ten-commandments-for-c.html' title='C Programming - The Ten Commandments for C Programmers'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113740427349985818</id><published>2006-01-16T01:36:00.000-08:00</published><updated>2006-01-16T01:37:53.500-08:00</updated><title type='text'>Programming - Collections of Algorithms</title><summary type='text'>A good collection of algorithms, rather a Directory of Algorithms!!!</summary><link rel='related' href='http://www.algosort.com/' title='Programming - Collections of Algorithms'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113740427349985818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113740427349985818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740427349985818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740427349985818'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/programming-collections-of-algorithms.html' title='Programming - Collections of Algorithms'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113740412809721184</id><published>2006-01-16T01:30:00.000-08:00</published><updated>2006-01-16T01:41:35.213-08:00</updated><title type='text'>Programming - Introduction to Reverse Engineering Software</title><summary type='text'>Nice article which teachs you various debugging techniques, information amount how stack is maintained, disassembling the code and many more.</summary><link rel='related' href='http://www.acm.uiuc.edu/sigmil/RevEng/index.html' title='Programming - Introduction to Reverse Engineering Software'/><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113740412809721184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113740412809721184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740412809721184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740412809721184'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/programming-introduction-to-reverse.html' title='Programming - Introduction to Reverse Engineering Software'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113740290502180868</id><published>2006-01-16T01:13:00.000-08:00</published><updated>2006-01-16T01:16:20.620-08:00</updated><title type='text'>C/C++ Programming - Max Sequence</title><summary type='text'>You have an array of n nonzero numbers. The array is randomly filled with positive and negative numbers.Write an algorithm/program to find 2 such indexes in the array, so as the sum of the numbers between these indexes is the maximum.For e.g. if the array is 10, -20, 9, 8, 3, -12, 6, 3, 4, 1, -5, 3, -1Then the indexes would be 2 and 9, the sum is 9 + 8 + 3 + -12 + 6 + 3 + 4 + 1 =22At first glance</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113740290502180868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113740290502180868' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740290502180868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113740290502180868'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2006/01/cc-programming-max-sequence.html' title='C/C++ Programming - Max Sequence'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113361608907980378</id><published>2005-12-03T04:39:00.000-08:00</published><updated>2005-12-03T05:21:29.106-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming: Bitwise Copy</title><summary type='text'>A default copy constructor does not do a Bitwise Copy under the following circumstancesWhen the class contains a member object of a class for which a copy assignment operator existsWhen the class is derived from a base class for which a copy assignment operator existsWhen the class declares one or more virtual functions (we must not copy the vptr address of the right-hand class object, since it </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113361608907980378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113361608907980378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113361608907980378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113361608907980378'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/12/c-programming-bitwise-copy.html' title='C++ Programming: Bitwise Copy'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113332517658016403</id><published>2005-11-29T20:17:00.000-08:00</published><updated>2005-11-29T20:32:56.590-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming: Cross Casts</title><summary type='text'>A multiply inherited class object can be converted into a second base class.For ex:struct A{  int i;  virtual ~A () {}};struct B {  bool b; };struct D: public A, public B{  int k;  D() { b = true; i = k = 0; }};A *ptra = new D;B *ptrb = dynamic_cast&lt; B* &gt;ptra;The static type for ptra is A * where as the dynamic type is D *. Normal static cast can't be used here as A and B are two different </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113332517658016403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113332517658016403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113332517658016403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113332517658016403'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-cross-casts.html' title='C++ Programming: Cross Casts'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113247677381995409</id><published>2005-11-20T02:27:00.000-08:00</published><updated>2005-11-20T02:27:49.813-08:00</updated><title type='text'>Programming - Must Read Books</title><summary type='text'>The Shellcoder's Handbook : Discovering and Exploiting Security Holes Shellcoder's Programming UncoveredHacker's DelightProgramming Interviews Exposed: Secrets to Landing Your Next JobExceptional C++: 47 Engineering Puzzles, Programming Problems, and SolutionsMore Exceptional C++</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113247677381995409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113247677381995409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113247677381995409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113247677381995409'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/programming-must-read-books.html' title='Programming - Must Read Books'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113248226937727411</id><published>2005-11-20T02:00:00.000-08:00</published><updated>2005-11-21T20:43:53.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Inline or Macro</title><summary type='text'>A function defined within the declaration of a class is inline by default. When no inline specifier is used, linkage will be external unless an inline definition appears before the first call.Inline function should only have exactly one definition. Expansion of Arguments can give weird result or compile time errors while using MACRO MACROS has the ability to operate on any type of arguments. Both</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113248226937727411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113248226937727411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113248226937727411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113248226937727411'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-inline-or-macro.html' title='C++ Programming - Inline or Macro'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113223562045114459</id><published>2005-11-20T01:56:00.000-08:00</published><updated>2005-11-21T20:38:07.586-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - The Assert Macro</title><summary type='text'>assert () marcro takes a boolean-valued expression evalutes to true, but it prints an informative message and terminates the program if expression eveluates to false. If using C++ you can avoid the deprecated warning message by using  instead of eg:assert ( ptr == NULL );</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113223562045114459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113223562045114459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113223562045114459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113223562045114459'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-assert-macro.html' title='C Programming - The Assert Macro'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113248066634236982</id><published>2005-11-20T01:53:00.000-08:00</published><updated>2005-11-21T20:40:07.470-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Unnamed Bit-Field</title><summary type='text'>An unnamed bit field is used for padding to conform to external imposed layouts. Unnamed bit-field with a width of zero specifies aloignment of the next bit field at an allocation unit boundary.struct becks {   ...   int :3 //three bit field   ...}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113248066634236982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113248066634236982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113248066634236982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113248066634236982'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-unnamed-bit-field.html' title='C++ Programming - Unnamed Bit-Field'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113205919358977829</id><published>2005-11-15T04:50:00.000-08:00</published><updated>2005-11-21T20:44:57.466-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Class Member Alignment</title><summary type='text'>class A { bool a; int b; bool c;};class B { bool a; bool c; int b;};What will be the value of sizeof(A) and sizeof(B)?</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113205919358977829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113205919358977829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113205919358977829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113205919358977829'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-class-member-alignment.html' title='C++ Programming - Class Member Alignment'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113040185128639994</id><published>2005-11-05T01:51:00.000-08:00</published><updated>2005-11-21T20:46:26.290-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Stack</title><summary type='text'>Note: Almost all the cases explained below are for intel x86 under linux platform and compiled using gcc.The stack is LIFO data structure. Stack boundary is defined by extended stack pointer (ESP) register. In over case ESP points to the last address used on the stack, whereas there as architectures in which it points to the first free address.Suppose we call a function f(1,2,3) from our main </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113040185128639994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113040185128639994' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113040185128639994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113040185128639994'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-stack.html' title='C Programming - Stack'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118334649897620</id><published>2005-11-05T01:35:00.000-08:00</published><updated>2006-01-16T02:31:25.526-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Unions in C++</title><summary type='text'>Default access to a union is public, it can contain member functions and member data.Other than that there are some more specialties for unions in C++.It can't have a static data members or a member of reference type.It can't have virtual functions.It can't be used as a base class nor it can have base class.An object of a class with a construct or a destructor or a user-defined assignment </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118334649897620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118334649897620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118334649897620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118334649897620'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-unions-in-c.html' title='C++ Programming - Unions in C++'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118324998789861</id><published>2005-11-05T01:33:00.001-08:00</published><updated>2005-11-05T01:34:09.986-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Global Anonymous Unions</title><summary type='text'>An anonymous union that is declared in a named namespace or in the global namespace has to be explicitly declared static. For examplestatic union //anonymous union in global namespace{  int num;  char *pc;};namespace NS{  static union { double d; bool b;}; //anonymous union in a named namespace}int main(){  NS::d = 0.0;  num = 5;  pc = "str";  return 0;}</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118324998789861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118324998789861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118324998789861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118324998789861'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-global-anonymous-unions.html' title='C++ Programming - Global Anonymous Unions'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118319844394352</id><published>2005-11-05T01:33:00.000-08:00</published><updated>2005-11-05T01:33:18.443-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - sizeof()</title><summary type='text'>An empty class doesn't have any data members or member functions. Therefore, the size of an instance is seemingly zero. However, C++ guarantees that the size of a complete object is never zero. Consider the following example:class Empty {};Empty  e; // e occupies at least 1 byte of memoryIf an object is allowed to occupy zero bytes of storage, its address can overlap with the address of a </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118319844394352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118319844394352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118319844394352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118319844394352'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-sizeof.html' title='C++ Programming - sizeof()'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118317180935082</id><published>2005-11-05T01:32:00.000-08:00</published><updated>2005-11-05T01:32:51.810-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Big Three</title><summary type='text'>Constructor+Destructor+Copy Constructor=Big Three</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118317180935082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118317180935082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118317180935082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118317180935082'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-big-three.html' title='C++ Programming - Big Three'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118314292907572</id><published>2005-11-05T01:31:00.001-08:00</published><updated>2006-01-16T02:26:17.306-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Pure Virtual Destructors</title><summary type='text'>Unlike ordinary member functions, a virtual destructor is not overridden when it is redefined in a derived class. Rather, it is extended. The lower-most destructor first invokes the destructor of its base class; only then is it executed. Consequently, when you try to declare a pure virtual destructor, you might encounter compilation errors, or worse -- a runtime crash. In this respect, pure </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118314292907572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118314292907572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118314292907572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118314292907572'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-pure-virtual-destructors.html' title='C++ Programming - Pure Virtual Destructors'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118311058147003</id><published>2005-11-05T01:31:00.000-08:00</published><updated>2006-01-16T02:26:46.613-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Pseudo Destructors</title><summary type='text'>Fundamental types have constructors, as you have seen. In addition, fundamental types also have a pseudo destructor. A pseudo destructor is a syntactic construct whose sole purpose is to satisfy the need of generic algorithms and containers. It is a no-op code that has no real effect on its object. If you examine the assembly code that your compiler produces for a pseudo destructor invocation, </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118311058147003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118311058147003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118311058147003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118311058147003'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-pseudo-destructors.html' title='C++ Programming - Pseudo Destructors'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118307446731080</id><published>2005-11-05T01:30:00.001-08:00</published><updated>2006-01-16T02:27:06.533-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Destructor Invocation</title><summary type='text'>Destructors are invoked implicitly in the following cases:    * For static objects at program termination    * For local objects when the block in which the object is created exits    * For a temporary object when the lifetime of the temporary object ends    * For objects allocated on the free store using new, through the use of delete    * During stack unwinding that results from an exceptionA </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118307446731080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118307446731080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118307446731080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118307446731080'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-destructor-invocation.html' title='C++ Programming - Destructor Invocation'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118303317456795</id><published>2005-11-05T01:30:00.000-08:00</published><updated>2006-01-16T02:27:27.556-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Member Initialization Lists</title><summary type='text'>The choice between using a mem-initialization list and initialization inside the constructor's body is significant in the following four cases:    *Initialization of const members    *Initialization of reference members    *Passing arguments to a constructor of a base class or an embedded object    *Initialization of member objectsIn the first three cases, a mem-initialization list is mandatory; </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118303317456795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118303317456795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118303317456795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118303317456795'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-member-initialization.html' title='C++ Programming - Member Initialization Lists'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118300555147043</id><published>2005-11-05T01:29:00.000-08:00</published><updated>2007-12-25T05:50:19.078-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Programming - Explicit Constructors</title><summary type='text'>class A {public: A() { ... }; A(int i) { ... };};main(){ A a; A b = 1;  ...}The compiler interprets the expression A b= 1; as if the programmer had writtenA b = A(1);You might encounter a similar problem when calling a function that takes A as argument. The following example can either be a cryptic coding style or simply a programmer's typographical error. However, due to the implicit conversion </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118300555147043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118300555147043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118300555147043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118300555147043'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/c-programming-explicit-constructors.html' title='C++ Programming - Explicit Constructors'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-113118295915782125</id><published>2005-11-05T01:28:00.000-08:00</published><updated>2006-01-16T02:28:13.756-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Trivial Constructors</title><summary type='text'>A constructor is considered trivial when all the following hold true:    * Its class has no virtual member functions and no virtual base classes.    * All the direct base classes of the constructor's class have trivial constructors.    * All the member objects in the constructor's class have trivial constructors.</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/113118295915782125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=113118295915782125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118295915782125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/113118295915782125'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/11/trivial-constructors.html' title='Trivial Constructors'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112987340097925886</id><published>2005-10-20T22:34:00.000-07:00</published><updated>2006-01-16T02:29:12.270-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Byte Order</title><summary type='text'>Little Endian Byte Order: "Little Endian" means that the low-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address. eg. long int i = 0x12345678; /* assuming long int has 4 bytes */0x8000490: 0x780x8000491: 0x560x8000492: 0x340x8000493: 0x12Big Endian Byte Order:"Big Endian" means that the high-order byte of the number is stored in </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112987340097925886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112987340097925886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112987340097925886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112987340097925886'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-byte-order.html' title='C Programming - Byte Order'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112962470232886712</id><published>2005-10-18T01:22:00.000-07:00</published><updated>2007-01-15T12:43:19.870-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Complicated Declaration Made Simple</title><summary type='text'>IntroductionA declaration can have exactly one basic type, and it's always on the far left of the expression.The "basic types" are augmented with "derived types", and C has three of them: *   pointer to... This is denoted by the familiar * character, and it should be self evident that a pointer always has to point to something.   []   array of... "Array of" can be undimensioned -- [] -- or </summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112962470232886712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112962470232886712' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112962470232886712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112962470232886712'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-complicated-declaration.html' title='C Programming - Complicated Declaration Made Simple'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112953704066994673</id><published>2005-10-17T01:13:00.000-07:00</published><updated>2005-10-17T21:44:24.256-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - One amoung the Two-&gt; x = x == a ? b : a;</title><summary type='text'>x can have only values a or b, we want to assign x a value otherthan the current one.x ^= a ^ b</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112953704066994673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112953704066994673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112953704066994673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112953704066994673'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-one-amoung-two-x-x-b.html' title='C Programming - One amoung the Two-&gt; x = x == a ? b : a;'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112953129088593551</id><published>2005-10-16T23:39:00.000-07:00</published><updated>2005-10-17T05:49:16.370-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Exchanging Corresponding fields of integer</title><summary type='text'>Exchange the contents of the variable x and y wherever the mask bit mi=1x^=yy^=(x&amp;m)x^=y</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112953129088593551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112953129088593551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112953129088593551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112953129088593551'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-exchanging-corresponding.html' title='C Programming - Exchanging Corresponding fields of integer'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112952471469279784</id><published>2005-10-16T21:50:00.000-07:00</published><updated>2005-10-17T05:49:27.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Turn OFF Right Most ON Bit</title><summary type='text'>x &amp; (x - 1)AlSo UsEd To FiNd If x Is A pOwEr Of 2</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112952471469279784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112952471469279784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112952471469279784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112952471469279784'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-turn-off-right-most-on.html' title='C Programming - Turn OFF Right Most ON Bit'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17913962.post-112952460359006226</id><published>2005-10-16T21:49:00.001-07:00</published><updated>2005-10-17T05:49:55.756-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><title type='text'>C Programming - Rounding Up</title><summary type='text'>An unsigned integer x can be rounded up to the next greater multiple of 8 with either of(x + 7) &amp; -8x + (-x &amp; 7)</summary><link rel='replies' type='application/atom+xml' href='http://cprogrammers.blogspot.com/feeds/112952460359006226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17913962&amp;postID=112952460359006226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112952460359006226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17913962/posts/default/112952460359006226'/><link rel='alternate' type='text/html' href='http://cprogrammers.blogspot.com/2005/10/c-programming-rounding-up.html' title='C Programming - Rounding Up'/><author><name>Anoob Backer</name><uri>https://profiles.google.com/113599801339809196758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Niwm7YtZamI/AAAAAAAAAAI/AAAAAAAAHIg/16gHVslIGO0/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
