# InterviewElements.com

Thursday, Aug 16th

Last update12:59:40 PM GMT

• REGISTER

## Write a C program to find the depth or height of a tree.

The most efficient solution to this problem is recursive. We start with the root, and calculate the height of left and right sub-tree in recursive manner. The max of these two heights is one less than the height of this tree.

``` SyntaxHighlighter.config.clipboardSwf = "http://interviewelements.com/plugins/content/codecitation/scripts/clipboard.swf"; SyntaxHighlighter.defaults["auto-links"] = true; SyntaxHighlighter.defaults["collapse"] = false; SyntaxHighlighter.defaults["gutter"] = true; SyntaxHighlighter.defaults["smart-tabs"] = true; SyntaxHighlighter.defaults["tab-size"] = 4; SyntaxHighlighter.defaults["toolbar"] = true; SyntaxHighlighter.defaults["wrap-lines"] = true; SyntaxHighlighter.all(); tree_height(mynode *p) { if(p==NULL)return(0); if(p->left){</code> <code> h1=tree_height(p->left);</code> <code> } if(p->right){</code> <code> h2=tree_height(p->right);</code> <code> } return(max(h1,h2)+1); } </code>```
`The degree of the leaf is zero. The degree of a tree is the max of its element degrees. A binary tree of height n, h > 0, has at least h and at most (2^h -1) elements in it. The height of a binary tree that contains n, n>0, elements is at most n and atleast log(n+1) to the base 2.Log(n+1) to the base 2 = hn = (2^h - 1)`
``` Share this post < Previous ```
``` ```
``` ```
``` ```
``` ```
``` ```
``` ```
``` ```
``` Interview Questions Linked Lists (18) Write a Program... (6) Trees (8) Sorting Techniques (8) BIT Operations (8) Pointers and Arrays (13) Functions (15) Statements and Variables (22) Structures and Unions (8) Macros, Header Files, Declarations (11) File IO (6) Compiling and Linking (6) General Concepts (1) Databases and SQL (1) Embedded Programming (4) Find Your Article var AJ_ARTICLEMENU96804 = 1; function AJRemove96804(t_id){ for (var i= (t_id.options.length - 1); i >0 ; i--) { t_id.remove(i); } } function AJConstructMenu96804(t_menu, t_id, switch_what) { if(switch_what == 'section'){ for (var i=0; i<AJ_CATEGORIES96804.length; i++) { if (AJ_CATEGORIES96804[i][0] == t_id){ var cOpt = document.createElement("option"); cOpt.value = AJ_CATEGORIES96804[i][2]; cOpt.text = AJ_CATEGORIES96804[i][3]; t_menu.options.add(cOpt); } } } else { for (var i=0; i<AJ_ARTICLES96804.length; i++) { if (AJ_ARTICLES96804[i][0] == t_id){ var cOpt = document.createElement("option"); cOpt.value = AJ_ARTICLES96804[i][2]; cOpt.text = AJ_ARTICLES96804[i][3]; t_menu.options.add(cOpt); } } } } function AJSwitch96804(switch_what){ var t_section = document.getElementById('aj_section96804'); var t_category = document.getElementById('aj_category96804'); if(AJ_ARTICLEMENU96804 == 1){ var t_article = document.getElementById('aj_article96804'); AJRemove96804(t_article); } if(switch_what == 'section'){ AJRemove96804(t_category); if(t_section.value > 0){ AJConstructMenu96804(t_category,t_section.value, switch_what); } } else { if(t_category.value > 0){ AJConstructMenu96804(t_article,t_category.value, switch_what); } } } function AJGo296804(){ var t_section = document.getElementById('aj_section96804'); var t_category = document.getElementById('aj_category96804'); var t_article = (AJ_ARTICLEMENU96804 != 1) ? 0 : document.getElementById('aj_article96804').value; if ((t_section.value == 0) || (t_category.value == 0)){ alert('Please, select Section and Category.'); } else { if(AJ_ARTICLEMENU96804 == 1 && (t_article > 0)){ for (var i=0; i<AJ_ARTICLES96804.length; i++){ if(AJ_ARTICLES96804[i][2]==t_article){ t_link = AJ_ARTICLES96804[i][1]; break; } } } else { for (var i=0; i<AJ_CATEGORIES96804.length; i++){ if(AJ_CATEGORIES96804[i][2]==t_category.value){ t_link = AJ_CATEGORIES96804[i][1]; break; } } } window.location.href = t_link; } } var AJ_ARTICLES96804 = new Array(); var AJ_CATEGORIES96804 = new Array(); AJ_CATEGORIES96804[0] = new Array(2, '/find-your-article/1', 1, 'DS and Algos'); AJ_CATEGORIES96804[1] = new Array(5, '/find-your-article/3', 3, 'Operating Systems'); AJ_CATEGORIES96804[2] = new Array(2, '/find-your-article/4', 4, 'C/C++'); AJ_CATEGORIES96804[3] = new Array(2, '/find-your-article/5', 5, 'Java'); AJ_CATEGORIES96804[4] = new Array(3, '/find-your-article/7', 7, 'Puzzles for the Inquisitive'); AJ_CATEGORIES96804[5] = new Array(5, '/find-your-article/14', 14, 'RDBMS'); AJ_CATEGORIES96804[6] = new Array(5, '/find-your-article/25', 25, 'Networks'); AJ_CATEGORIES96804[7] = new Array(8, '/find-your-article/26', 26, 'Answering HR Questions'); AJ_CATEGORIES96804[8] = new Array(8, '/find-your-article/28', 28, 'Resume'); AJ_CATEGORIES96804[9] = new Array(8, '/find-your-article/34', 34, 'GDs and Case Studies'); AJ_CATEGORIES96804[10] = new Array(3, '/find-your-article/35', 35, 'Algo-Logics'); AJ_CATEGORIES96804[11] = new Array(15, '/find-your-article/41', 41, 'Linked Lists'); AJ_CATEGORIES96804[12] = new Array(15, '/find-your-article/42', 42, 'Write a Program...'); AJ_CATEGORIES96804[13] = new Array(15, '/find-your-article/43', 43, 'Trees'); AJ_CATEGORIES96804[14] = new Array(15, '/find-your-article/45', 45, 'Sorting Techniques'); AJ_CATEGORIES96804[15] = new Array(15, '/find-your-article/46', 46, 'Pointers and Arrays'); AJ_CATEGORIES96804[16] = new Array(15, '/find-your-article/47', 47, 'Functions'); AJ_CATEGORIES96804[17] = new Array(15, '/find-your-article/48', 48, 'Statements and Variables'); AJ_CATEGORIES96804[18] = new Array(15, '/find-your-article/49', 49, 'Structures and Unions'); AJ_CATEGORIES96804[19] = new Array(15, '/find-your-article/50', 50, 'Macros, Header Files, Declarations'); AJ_CATEGORIES96804[20] = new Array(15, '/find-your-article/52', 52, 'File IO'); AJ_CATEGORIES96804[21] = new Array(15, '/find-your-article/53', 53, 'Compiling and Linking'); AJ_CATEGORIES96804[22] = new Array(15, '/find-your-article/54', 54, 'General Concepts'); AJ_CATEGORIES96804[23] = new Array(15, '/find-your-article/55', 55, 'Databases and SQL'); AJ_CATEGORIES96804[24] = new Array(15, '/find-your-article/57', 57, 'BIT Operations'); AJ_CATEGORIES96804[25] = new Array(15, '/find-your-article/61', 61, 'Embedded Programming'); AJ_ARTICLES96804[0] = new Array(14, '/find-your-article/14-generic/5-databases', 5, 'Databases'); AJ_ARTICLES96804[1] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/7-ternary-search-tree', 7, 'Ternary Search tree'); AJ_ARTICLES96804[2] = new Array(4, '/find-your-article/4-cc/8-namespaces-in-c', 8, 'Namespaces in C++'); AJ_ARTICLES96804[3] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/11-5-pirates-and-gold', 11, '5 Pirates and Gold'); AJ_ARTICLES96804[4] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/17-the-parrot-sequence', 17, 'The parrot sequence'); AJ_ARTICLES96804[5] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/19-counting-sort', 19, 'Counting Sort'); AJ_ARTICLES96804[6] = new Array(14, '/find-your-article/14-generic/20-database-normalization', 20, 'Database Normalization - Part 1'); AJ_ARTICLES96804[7] = new Array(3, '/find-your-article/3-operating-systems/22-deadlock-avoidance-using-resource-allocation-graph', 22, 'Deadlock Avoidance using Resource-Allocation Graph'); AJ_ARTICLES96804[8] = new Array(5, '/find-your-article/5-java/23-interfaces', 23, 'Interfaces'); AJ_ARTICLES96804[9] = new Array(10, '/find-your-article/10-policies/27-can-india-overtake-china', 27, 'Can India overtake China'); AJ_ARTICLES96804[10] = new Array(14, '/find-your-article/14-generic/29-database-normalization-part-2', 29, 'Database Normalization - Part 2'); AJ_ARTICLES96804[11] = new Array(25, '/find-your-article/25-computer-networks/30-mac', 30, 'Medium Access Control Techniques'); AJ_ARTICLES96804[12] = new Array(5, '/find-your-article/5-java/31-collections', 31, 'Collections'); AJ_ARTICLES96804[13] = new Array(5, '/find-your-article/5-java/32-set', 32, 'Set'); AJ_ARTICLES96804[14] = new Array(29, '/find-your-article/29-infy-delhi-march-10/33-technical-round', 33, 'Technical Round'); AJ_ARTICLES96804[15] = new Array(14, '/find-your-article/14-generic/34-database-integrity', 34, 'Database Integrity'); AJ_ARTICLES96804[16] = new Array(28, '/find-your-article/28-resume/35-resume-writing', 35, 'Resume Writing'); AJ_ARTICLES96804[17] = new Array(26, '/find-your-article/26-answering-hr-questions/36-look-good', 36, 'Look Good!'); AJ_ARTICLES96804[18] = new Array(34, '/find-your-article/34-gds-and-case-studies/37-why-gds', 37, 'Why GDs?'); AJ_ARTICLES96804[19] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/39-lion-or-treasure', 39, 'Lion or Treasure'); AJ_ARTICLES96804[20] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/40-pills', 40, 'Pills'); AJ_ARTICLES96804[21] = new Array(5, '/find-your-article/5-java/41-list', 41, 'List'); AJ_ARTICLES96804[22] = new Array(35, '/find-your-article/35-algo-logics/42--find-sub-rectangle-with-the-largest-sum', 42, ' Find Sub-rectangle with the largest sum'); AJ_ARTICLES96804[23] = new Array(35, '/find-your-article/35-algo-logics/43-circumference-of-a-circle', 43, 'Circumference of a circle'); AJ_ARTICLES96804[24] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/44-binary-search', 44, 'Binary Search'); AJ_ARTICLES96804[25] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/45-100-storey-building-and-2-eggs', 45, '100 storey building and 2 eggs'); AJ_ARTICLES96804[26] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/46-defective-coin-puzzle', 46, 'Defective coin puzzle'); AJ_ARTICLES96804[27] = new Array(4, '/find-your-article/4-cc/47-virtual-functions', 47, 'Virtual Functions'); AJ_ARTICLES96804[28] = new Array(34, '/find-your-article/34-gds-and-case-studies/48-should-india-change-its-national-game', 48, 'GD: Should INDIA Change Its National Game?'); AJ_ARTICLES96804[29] = new Array(4, '/find-your-article/4-cc/49-vtable-virtual-functions', 49, 'VTABLE in Virtual Functions'); AJ_ARTICLES96804[30] = new Array(34, '/find-your-article/34-gds-and-case-studies/50-are-freshers-better-hires-than-laterals', 50, 'GD: Are Freshers Better Hires than Laterals '); AJ_ARTICLES96804[31] = new Array(28, '/find-your-article/28-resume/51-resume-format-for-freshers', 51, 'Resume Format for Freshers'); AJ_ARTICLES96804[32] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/52-heap-and-heap-sort', 52, 'Heap and Heap Sort'); AJ_ARTICLES96804[33] = new Array(26, '/find-your-article/26-answering-hr-questions/53-tell-me-something-about-yourself', 53, 'Tell me something about yourself'); AJ_ARTICLES96804[34] = new Array(25, '/find-your-article/25-computer-networks/54-what-is-dsl', 54, 'What is DSL?'); AJ_ARTICLES96804[35] = new Array(28, '/find-your-article/28-resume/55-resume-format-for-experienced', 55, 'Resume Format for Experienced'); AJ_ARTICLES96804[36] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/56-island-of-the-blue-eyed', 56, 'Island of the blue eyed'); AJ_ARTICLES96804[37] = new Array(25, '/find-your-article/25-computer-networks/57-wi-fi-explained-simply', 57, 'Wi-Fi Explained \'Simply\''); AJ_ARTICLES96804[38] = new Array(4, '/find-your-article/4-cc/58-function-templates', 58, 'Function Templates'); AJ_ARTICLES96804[39] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/59-3-denominations-for-food-stall-tokens', 59, '3 Denominations for food stall tokens'); AJ_ARTICLES96804[40] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/60-ratio-of-boys-to-girls', 60, 'Ratio of boys to girls'); AJ_ARTICLES96804[41] = new Array(25, '/find-your-article/25-computer-networks/61-wimax-explained-simply', 61, 'WiMAX Explained \'Simply\''); AJ_ARTICLES96804[42] = new Array(26, '/find-your-article/26-answering-hr-questions/62-what-are-your-greatest-strengths', 62, 'What are your greatest strengths?'); AJ_ARTICLES96804[43] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/63-merge-sort', 63, 'Merge Sort'); AJ_ARTICLES96804[44] = new Array(4, '/find-your-article/4-cc/64-cpp-class-templates', 64, 'C++ Class Templates'); AJ_ARTICLES96804[45] = new Array(34, '/find-your-article/34-gds-and-case-studies/65-gd3-western-culture-in-india', 65, 'GD: Western Culture in India'); AJ_ARTICLES96804[46] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/66-3-bindis', 66, '3 Bindis'); AJ_ARTICLES96804[47] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/67-monkey-and-bullet', 67, 'Monkey and Bullet'); AJ_ARTICLES96804[48] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/69-time-complexity-in-algorithms-the-maths', 69, 'Time Complexity in Algorithms - The Maths'); AJ_ARTICLES96804[49] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/71-camel-and-3000-bananas', 71, 'Camel and 3000 bananas'); AJ_ARTICLES96804[50] = new Array(4, '/find-your-article/4-cc/72-friend-functions-and-friend-classes', 72, 'Friend Functions and Friend Classes'); AJ_ARTICLES96804[51] = new Array(4, '/find-your-article/4-cc/73-c-templates-the-final-touch', 73, 'C++ Templates: the Final Touch'); AJ_ARTICLES96804[52] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/74-coins-lying-on-table', 74, 'Coins lying on table'); AJ_ARTICLES96804[53] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/75-100-prisoners-and-hats', 75, '100 prisoners and hats'); AJ_ARTICLES96804[54] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/76-golden-and-silver-coins-in-bag', 76, 'Golden and silver coins in bag'); AJ_ARTICLES96804[55] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/77-surgeon-and-gloves', 77, 'Surgeon and gloves'); AJ_ARTICLES96804[56] = new Array(34, '/find-your-article/34-gds-and-case-studies/78-gd-should-euthanasia-be-allowed-or-not', 78, 'GD: Should Euthanasia be allowed or not?'); AJ_ARTICLES96804[57] = new Array(14, '/find-your-article/14-generic/79-database-indexing', 79, 'Database Indexing'); AJ_ARTICLES96804[58] = new Array(5, '/find-your-article/5-java/80-map', 80, 'Map'); AJ_ARTICLES96804[59] = new Array(34, '/find-your-article/34-gds-and-case-studies/81-gd-state-should-not-interfere-in-matters-of-religion-', 81, 'GD: State should not interfere in matters of Religion '); AJ_ARTICLES96804[60] = new Array(35, '/find-your-article/35-algo-logics/82-permutations-of-a-string', 82, 'Permutations of a string'); AJ_ARTICLES96804[61] = new Array(35, '/find-your-article/35-algo-logics/83-divisor-problem', 83, 'Divisor Problem'); AJ_ARTICLES96804[62] = new Array(4, '/find-your-article/4-cc/84-operator-overloading-basics', 84, 'Operator Overloading Basics'); AJ_ARTICLES96804[63] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/86-poisoned-wine-for-bad-king', 86, 'Poisoned wine for Bad King'); AJ_ARTICLES96804[64] = new Array(26, '/find-your-article/26-answering-hr-questions/87-what-are-your-greatest-weaknesses', 87, 'What are your greatest weaknesses?'); AJ_ARTICLES96804[65] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/88-bananas-and-the-lucky-monkey', 88, 'Bananas and the lucky Monkey'); AJ_ARTICLES96804[66] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/89-jug-juggling', 89, 'Jug Juggling'); AJ_ARTICLES96804[67] = new Array(25, '/find-your-article/25-computer-networks/92-hubs-bridges-switches-and-routers', 92, 'Hubs, Bridges, Switches and Routers'); AJ_ARTICLES96804[68] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/94-time-complexity-in-algorithms-2', 94, 'Time Complexity in Algorithms-2'); AJ_ARTICLES96804[69] = new Array(4, '/find-your-article/4-cc/97-static-member-variables', 97, 'Static Member Variables'); AJ_ARTICLES96804[70] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/98-catch-the-robber', 98, 'Catch the Robber'); AJ_ARTICLES96804[71] = new Array(5, '/find-your-article/5-java/99-java-refresher', 99, 'Java Refresher II'); AJ_ARTICLES96804[72] = new Array(4, '/find-your-article/4-cc/100-static-member-functions', 100, 'Static Member Functions'); AJ_ARTICLES96804[73] = new Array(26, '/find-your-article/26-answering-hr-questions/101-why-do-want-to-change-your-job', 101, 'Why do want to change your job?'); AJ_ARTICLES96804[74] = new Array(34, '/find-your-article/34-gds-and-case-studies/102-gd-democracy-has-hampered-indias-progress', 102, 'GD: Democracy has hampered India’s progress'); AJ_ARTICLES96804[75] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/103-shape-o-logic', 103, 'Shap(e)-o-logic'); AJ_ARTICLES96804[76] = new Array(1, '/find-your-article/1-data-structures-a-algorithms/104-a-starter-on-sorting-algorithms', 104, 'A Starter on Sorting Algorithms'); AJ_ARTICLES96804[77] = new Array(4, '/find-your-article/4-cc/106-variadic-functions', 106, 'Variadic Functions'); AJ_ARTICLES96804[78] = new Array(28, '/find-your-article/28-resume/107-cover-letters', 107, 'Cover Letters'); AJ_ARTICLES96804[79] = new Array(28, '/find-your-article/28-resume/108-sample-cover-letter-1', 108, 'Sample Cover Letter 1'); AJ_ARTICLES96804[80] = new Array(34, '/find-your-article/34-gds-and-case-studies/109-gd-tips', 109, 'GD Tips'); AJ_ARTICLES96804[81] = new Array(35, '/find-your-article/35-algo-logics/110-find-candle-stand-for-candle', 110, 'Find candle stand for candle'); AJ_ARTICLES96804[82] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/111-measure-time-by-burning-ropes', 111, 'Measure time by burning ropes'); AJ_ARTICLES96804[83] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/112-calendar-cube', 112, 'Calendar Cube'); AJ_ARTICLES96804[84] = new Array(34, '/find-your-article/34-gds-and-case-studies/113-gd-faqs', 113, 'GD FAQs'); AJ_ARTICLES96804[85] = new Array(4, '/find-your-article/4-cc/114-operator-overloading-part-ii', 114, 'Operator Overloading Part-II'); AJ_ARTICLES96804[86] = new Array(28, '/find-your-article/28-resume/115-difference-between-resume-cv-and-biodata-', 115, 'Difference between Resume, C.V. and BioData '); AJ_ARTICLES96804[87] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/116-number-pyramid', 116, 'Number Pyramid'); AJ_ARTICLES96804[88] = new Array(5, '/find-your-article/5-java/117-java-refresher-i', 117, 'Java Refresher I'); AJ_ARTICLES96804[89] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/118-numbers-grid', 118, 'Numbers Grid'); AJ_ARTICLES96804[90] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/119-color-of-chameleon', 119, 'Color of Chameleon'); AJ_ARTICLES96804[91] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/120-whom-will-you-shoot-first-', 120, 'Whom will you shoot first ?'); AJ_ARTICLES96804[92] = new Array(34, '/find-your-article/34-gds-and-case-studies/123-tackling-case-interviews', 123, 'Tackling Case Interviews'); AJ_ARTICLES96804[93] = new Array(3, '/find-your-article/3-operating-systems/124-address-binding', 124, 'Address Binding'); AJ_ARTICLES96804[94] = new Array(26, '/find-your-article/26-answering-hr-questions/125-tell-me-about-something-you-did-or-failed-to-do-that-you-now-feel-a-little-ashamed-of', 125, 'Tell me about something you did that you now feel a little ashamed of'); AJ_ARTICLES96804[95] = new Array(3, '/find-your-article/3-operating-systems/128-dynamic-loading', 128, 'Dynamic Loading'); AJ_ARTICLES96804[96] = new Array(34, '/find-your-article/34-gds-and-case-studies/129-gdwho-is-better-a-manager-by-degree-or-a-manager-by-experience', 129, 'GD:Who is better- A Manager by Degree or a Manager by Experience?'); AJ_ARTICLES96804[97] = new Array(34, '/find-your-article/34-gds-and-case-studies/130-the-kashmir-issue', 130, 'The Kashmir Issue'); AJ_ARTICLES96804[98] = new Array(3, '/find-your-article/3-operating-systems/131-dynamic-linking', 131, 'Dynamic Linking'); AJ_ARTICLES96804[99] = new Array(28, '/find-your-article/28-resume/135-resume-essentials', 135, 'Resume Essentials'); AJ_ARTICLES96804[100] = new Array(25, '/find-your-article/25-computer-networks/136-telecom-gyan-gsm-overview', 136, 'Telecom Gyan - GSM Overview'); AJ_ARTICLES96804[101] = new Array(55, '/find-your-article/55-databases-and-sql/137-sql-interview-questions-with-answers', 137, 'SQL interview questions with answers'); AJ_ARTICLES96804[102] = new Array(26, '/find-your-article/26-answering-hr-questions/138-why-should-we-take-you', 138, 'Why should we take you?'); AJ_ARTICLES96804[103] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/139-trace-the-cube', 139, 'Trace the cube'); AJ_ARTICLES96804[104] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/140-knight-a-dragon-puzzle', 140, 'Knight & Dragon puzzle'); AJ_ARTICLES96804[105] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/141-einsteins-riddle', 141, 'Einstein\'s Riddle'); AJ_ARTICLES96804[106] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/142-chicken-nuggets-puzzle', 142, 'Chicken nuggets puzzle'); AJ_ARTICLES96804[107] = new Array(35, '/find-your-article/35-algo-logics/143-coin-a-logic', 143, 'Coin \'a\' Logic'); AJ_ARTICLES96804[108] = new Array(34, '/find-your-article/34-gds-and-case-studies/144-gd-who-will-win-india-or-china', 144, 'GD: Who will win - India or China?'); AJ_ARTICLES96804[109] = new Array(34, '/find-your-article/34-gds-and-case-studies/145-kyoto-protocol-and-carbon-credits', 145, 'Kyoto Protocol and Carbon Credits'); AJ_ARTICLES96804[110] = new Array(41, '/find-your-article/41-linked-lists/146-how-do-you-reverse-a-singly-linked-list-how-do-you-reverse-a-doubly-linked-list-write-a-c-program-to-do-the-same', 146, 'How do you reverse a singly linked list? How do you reverse a doubly linked list? Write a C program to do the same.'); AJ_ARTICLES96804[111] = new Array(41, '/find-your-article/41-linked-lists/147-given-only-a-pointer-to-a-node-to-be-deleted-in-a-singly-linked-list-how-do-you-delete-it-', 147, 'Given only a pointer to a node to be deleted in a singly linked list, how do you delete it? '); AJ_ARTICLES96804[112] = new Array(45, '/find-your-article/45-sorting-techniques/148-what-is-heap-sort', 148, 'What is heap sort?'); AJ_ARTICLES96804[113] = new Array(45, '/find-your-article/45-sorting-techniques/149-what-is-the-difference-between-merge-sort-and-quick-sort', 149, 'What is the difference between Merge Sort and Quick sort?'); AJ_ARTICLES96804[114] = new Array(45, '/find-your-article/45-sorting-techniques/150-write-a-c-code-for-the-merge-sort-algorithm', 150, 'Write a C code for the Merge sort algorithm'); AJ_ARTICLES96804[115] = new Array(45, '/find-your-article/45-sorting-techniques/151-how-can-i-sort-things-that-are-too-big-to-be-brought-into-memory', 151, 'How can I sort things that are too big to be brought into memory?'); AJ_ARTICLES96804[116] = new Array(4, '/find-your-article/4-cc/152-arrays-pointers-complicated-made-easy', 152, 'Pointers: complicated stuff made easy !!'); AJ_ARTICLES96804[117] = new Array(45, '/find-your-article/45-sorting-techniques/153-c-program-for-bubble-sort', 153, 'C Program for Bubble Sort'); AJ_ARTICLES96804[118] = new Array(45, '/find-your-article/45-sorting-techniques/154-c-program-for-selection-sort', 154, 'C Program for Selection Sort'); AJ_ARTICLES96804[119] = new Array(45, '/find-your-article/45-sorting-techniques/155-c-program-for-insertion-sort', 155, 'C Program for Insertion Sort'); AJ_ARTICLES96804[120] = new Array(45, '/find-your-article/45-sorting-techniques/156-c-program-for-quick-sort', 156, 'C Program for Quick Sort'); AJ_ARTICLES96804[121] = new Array(47, '/find-your-article/47-functions/157-how-do-you-declare-a-pointer-to-a-function', 157, 'How do you declare a pointer to a function?'); AJ_ARTICLES96804[122] = new Array(47, '/find-your-article/47-functions/158-what-does-extern-in-a-function-declaration-mean', 158, 'What does extern in a function declaration mean?'); AJ_ARTICLES96804[123] = new Array(47, '/find-your-article/47-functions/159-how-can-you-return-multiple-values-from-a-function', 159, 'How can you return multiple values from a function?'); AJ_ARTICLES96804[124] = new Array(47, '/find-your-article/47-functions/160-does-c-support-function-overloading', 160, 'Does C support function overloading?'); AJ_ARTICLES96804[125] = new Array(4, '/find-your-article/4-cc/161-pointers-basics', 161, 'Pointers: Basics'); AJ_ARTICLES96804[126] = new Array(47, '/find-your-article/47-functions/162-what-is-the-purpose-of-a-function-prototype', 162, 'What is the purpose of a function prototype?'); AJ_ARTICLES96804[127] = new Array(47, '/find-your-article/47-functions/163-throw-some-light-on-inline-functions', 163, 'Throw some light on Inline functions'); AJ_ARTICLES96804[128] = new Array(47, '/find-your-article/47-functions/164-how-to-declare-an-array-of-n-pointers-to-functions-returning-pointers-to-functions-returning-pointers-to-characters', 164, 'How to declare an array of N pointers to functions returning pointers to functions returning pointers to characters?'); AJ_ARTICLES96804[129] = new Array(47, '/find-your-article/47-functions/165-can-we-declare-a-function-that-can-return-a-pointer-to-a-function-of-the-same-type', 165, 'Can we declare a function that can return a pointer to a function of the same type?'); AJ_ARTICLES96804[130] = new Array(41, '/find-your-article/41-linked-lists/166-how-do-you-sort-a-linked-list-write-a-c-program-to-sort-a-linked-list', 166, 'How do you sort a linked list? Write a C program to sort a linked list.'); AJ_ARTICLES96804[131] = new Array(47, '/find-your-article/47-functions/167-how-can-i-write-a-function-that-takes-a-variable-number-of-arguments-what-are-the-limitations-with-this-what-is-vprintf', 167, 'How can I write a function that takes a variable number of arguments? What are the limitations with this? What is vprintf()?'); AJ_ARTICLES96804[132] = new Array(41, '/find-your-article/41-linked-lists/168-how-to-declare-a-structure-of-a-linked-list', 168, 'How to declare a structure of a linked list?'); AJ_ARTICLES96804[133] = new Array(41, '/find-your-article/41-linked-lists/169-write-a-c-program-to-implement-a-generic-linked-list', 169, 'Write a C program to implement a Generic Linked List.'); AJ_ARTICLES96804[134] = new Array(47, '/find-your-article/47-functions/170-what-is-the-difference-between-call-by-value-and-call-by-reference-which-method-does-c-use', 170, 'What is the difference between call-by-value and call-by-reference? Which method does C use?'); AJ_ARTICLES96804[135] = new Array(47, '/find-your-article/47-functions/171-if-i-have-the-name-of-a-function-in-the-form-of-a-string-how-can-i-invoke-that-function', 171, 'If I have the name of a function in the form of a string, how can I invoke that function?'); AJ_ARTICLES96804[136] = new Array(47, '/find-your-article/47-functions/172-what-does-the-error-invalid-redeclaration-of-a-function-mean', 172, 'What does the error, invalid redeclaration of a function mean?'); AJ_ARTICLES96804[137] = new Array(47, '/find-your-article/47-functions/173-how-can-i-pass-the-variable-argument-list-passed-to-one-function-to-another-function', 173, 'How can I pass the variable argument list passed to one function to another function?'); AJ_ARTICLES96804[138] = new Array(47, '/find-your-article/47-functions/174-how-do-i-pass-a-variable-number-of-function-pointers-to-a-variable-argument-vaarg-function', 174, 'How do I pass a variable number of function pointers to a variable argument (va_arg) function?'); AJ_ARTICLES96804[139] = new Array(47, '/find-your-article/47-functions/175-will-c-allow-passing-more-or-less-arguments-than-required-to-a-function', 175, 'Will C allow passing more or less arguments than required to a function?'); AJ_ARTICLES96804[140] = new Array(41, '/find-your-article/41-linked-lists/176-how-do-you-reverse-a-linked-list-without-using-any-c-pointers-', 176, 'How do you reverse a linked list without using any C pointers? '); AJ_ARTICLES96804[141] = new Array(41, '/find-your-article/41-linked-lists/177-how-would-you-detect-a-loop-in-a-linked-list-write-a-c-program-to-detect-a-loop-in-a-linked-list-', 177, 'How would you detect a loop in a linked list? Write a C program to detect a loop in a linked list. '); AJ_ARTICLES96804[142] = new Array(41, '/find-your-article/41-linked-lists/178-how-do-you-find-the-middle-of-a-linked-list-write-a-c-program-to-return-the-middle-of-a-linked-list', 178, 'How do you find the middle of a linked list? Write a C program to return the middle of a linked list.'); AJ_ARTICLES96804[143] = new Array(4, '/find-your-article/4-cc/179-pointers-the-next-step', 179, 'Pointers:The Array Relation'); AJ_ARTICLES96804[144] = new Array(48, '/find-your-article/48-statements-variables/180-what-is-short-circuiting-in-c-expressions', 180, 'What is short-circuiting in C expressions?'); AJ_ARTICLES96804[145] = new Array(48, '/find-your-article/48-statements-variables/181-what-is-wrong-with-the-expression-aii-what-is-a-sequence-point', 181, 'What is wrong with the expression a[i]=i++; ? What is a sequence point?'); AJ_ARTICLES96804[146] = new Array(48, '/find-your-article/48-statements-variables/182-does-the-ternary-operator-return-a-lvalue-how-can-i-assign-a-value-to-the-output-of-the-ternary-operator', 182, 'Does the ?: (ternary operator) return a lvalue? How can I assign a value to the output of the ternary operator?'); AJ_ARTICLES96804[147] = new Array(48, '/find-your-article/48-statements-variables/183-is-5array-the-same-as-array5', 183, 'Is 5[array] the same as array[5]?'); AJ_ARTICLES96804[148] = new Array(48, '/find-your-article/48-statements-variables/184-what-is-pragma-', 184, 'What is #pragma? '); AJ_ARTICLES96804[149] = new Array(4, '/find-your-article/4-cc/185-pointers-and-2-d-arrays', 185, 'Pointers and 2-D arrays: A Thumb Rule'); AJ_ARTICLES96804[150] = new Array(42, '/find-your-article/42-write-a-program/186-implementing-your-own-atoi-function', 186, 'Implementing your own atoi() function'); AJ_ARTICLES96804[151] = new Array(42, '/find-your-article/42-write-a-program/187-implementing-your-own-toupper-and-isupper-functions', 187, 'Implementing your own toUpper() and isUpper() functions'); AJ_ARTICLES96804[152] = new Array(42, '/find-your-article/42-write-a-program/188-what-is-strdup-function-implement-it', 188, 'What is strdup function? Implement it!!'); AJ_ARTICLES96804[153] = new Array(42, '/find-your-article/42-write-a-program/189-implement-your-own-strlen-function', 189, 'Implement your own strlen() function'); AJ_ARTICLES96804[154] = new Array(42, '/find-your-article/42-write-a-program/190-implement-your-own-strcat-function', 190, 'Implement your own strcat() function'); AJ_ARTICLES96804[155] = new Array(41, '/find-your-article/41-linked-lists/191-if-you-are-using-c-language-to-implement-the-heterogeneous-linked-list-what-pointer-type-will-you-use', 191, 'If you are using C language to implement the heterogeneous linked list, what pointer type will you use?'); AJ_ARTICLES96804[156] = new Array(41, '/find-your-article/41-linked-lists/192-how-to-compare-two-linked-lists-write-a-c-program-to-compare-two-linked-lists-', 192, 'How to compare two linked lists? Write a C program to compare two linked lists. '); AJ_ARTICLES96804[157] = new Array(41, '/find-your-article/41-linked-lists/193-how-to-create-a-copy-of-a-linked-list-write-a-c-program-to-create-a-copy-of-a-linked-list', 193, 'How to create a copy of a linked list? Write a C program to create a copy of a linked list.'); AJ_ARTICLES96804[158] = new Array(41, '/find-your-article/41-linked-lists/194-write-a-c-program-to-free-the-nodes-of-a-linked-list', 194, 'Write a C program to free the nodes of a linked list.'); AJ_ARTICLES96804[159] = new Array(41, '/find-your-article/41-linked-lists/195-can-we-do-a-binary-search-on-a-linked-list', 195, 'Can we do a Binary search on a linked list?'); AJ_ARTICLES96804[160] = new Array(41, '/find-your-article/41-linked-lists/196-write-a-c-program-to-return-the-nth-node-from-the-end-of-a-linked-list', 196, 'Write a C program to return the nth node from the end of a linked list.'); AJ_ARTICLES96804[161] = new Array(41, '/find-your-article/41-linked-lists/197-how-would-you-find-out-if-one-of-the-pointers-in-a-linked-list-is-corrupted-or-not', 197, 'How would you find out if one of the pointers in a linked list is corrupted or not?'); AJ_ARTICLES96804[162] = new Array(41, '/find-your-article/41-linked-lists/198-write-a-c-program-to-insert-nodes-into-a-linked-list-in-a-sorted-fashion', 198, 'Write a C program to insert nodes into a linked list in a sorted fashion'); AJ_ARTICLES96804[163] = new Array(41, '/find-your-article/41-linked-lists/199-write-a-c-program-to-remove-duplicates-from-a-sorted-linked-list', 199, 'Write a C program to remove duplicates from a sorted linked list'); AJ_ARTICLES96804[164] = new Array(41, '/find-your-article/41-linked-lists/200-how-can-i-search-for-data-in-a-linked-list-', 200, 'How can I search for data in a linked list ?'); AJ_ARTICLES96804[165] = new Array(48, '/find-your-article/48-statements-variables/201-what-is-the-difference-between-if1--x-and-ifx--1', 201, 'What is the difference between if(1 == x) and if(x == 1)?'); AJ_ARTICLES96804[166] = new Array(48, '/find-your-article/48-statements-variables/202-should-we-use-goto-or-not', 202, 'Should we use goto or not?'); AJ_ARTICLES96804[167] = new Array(48, '/find-your-article/48-statements-variables/203-is-i-really-faster-than-i-i-1', 203, 'Is ++i really faster than i = i + 1?'); AJ_ARTICLES96804[168] = new Array(48, '/find-your-article/48-statements-variables/204-what-do-lvalue-and-rvalue-mean', 204, 'What do lvalue and rvalue mean?'); AJ_ARTICLES96804[169] = new Array(48, '/find-your-article/48-statements-variables/205-what-does-the-term-cast-refer-to-why-is-it-used', 205, 'What does the term cast refer to? Why is it used?'); AJ_ARTICLES96804[170] = new Array(42, '/find-your-article/42-write-a-program/206-swap-two-variables-without-using-temporary-variable', 206, 'Swap two variables without using temporary variable'); AJ_ARTICLES96804[171] = new Array(35, '/find-your-article/35-algo-logics/207-8-queens-problem', 207, '8 Queens problem'); AJ_ARTICLES96804[172] = new Array(56, '/find-your-article/56-elementsnews/208-quiz-quest-is-here', 208, 'Quizzes for Interviews and Writtens - get yourself registered !!'); AJ_ARTICLES96804[173] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/209-find-jar-with-defective-coins', 209, 'Find jar with defective coins'); AJ_ARTICLES96804[174] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/210-break-gold-bar-in-three-pieces', 210, 'Break gold bar in three pieces'); AJ_ARTICLES96804[175] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/211-weigh-the-mystery-ball', 211, 'Weigh the mystery ball'); AJ_ARTICLES96804[176] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/212-find-the-fastest-3-horses', 212, 'Find the fastest 3 horses'); AJ_ARTICLES96804[177] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/213-guess-the-8-digit-number', 213, 'Guess the 8 digit number'); AJ_ARTICLES96804[178] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/214-spin-the-barrel', 214, 'Spin the barrel'); AJ_ARTICLES96804[179] = new Array(7, '/find-your-article/7-puzzles-for-the-inquisitive/215-is-the-story-true-', 215, 'Is the story true ?'); AJ_ARTICLES96804[180] = new Array(43, '/find-your-article/43-trees/216-write-a-c-program-to-find-the-depth-or-height-of-a-tree', 216, 'Write a C program to find the depth or height of a tree.'); AJ_ARTICLES96804[181] = new Array(48, '/find-your-article/48-statements-variables/217-what-is-the-difference-between-a-statement-and-a-block', 217, 'What is the difference between a statement and a block?'); AJ_ARTICLES96804[182] = new Array(48, '/find-your-article/48-statements-variables/218-can-comments-be-nested-in-c', 218, 'Can comments be nested in C?'); AJ_ARTICLES96804[183] = new Array(48, '/find-your-article/48-statements-variables/219-what-is-type-checking', 219, 'What is type checking?'); AJ_ARTICLES96804[184] = new Array(48, '/find-your-article/48-statements-variables/220-why-cant-you-nest-structure-definitions', 220, 'Why can\'t you nest structure definitions?'); AJ_ARTICLES96804[185] = new Array(48, '/find-your-article/48-statements-variables/221-what-is-a-forward-reference', 221, 'What is a forward reference?'); AJ_ARTICLES96804[186] = new Array(48, '/find-your-article/48-statements-variables/222-what-is-the-difference-between-the-a-and-aa-operators-and-the--and--operators-', 222, 'What is the difference between the & and && operators and the | and || operators? '); AJ_ARTICLES96804[187] = new Array(48, '/find-your-article/48-statements-variables/223-can-goto-be-used-to-jump-across-functions', 223, 'Can goto be used to jump across functions?'); AJ_ARTICLES96804[188] = new Array(48, '/find-your-article/48-statements-variables/224-whats-wrong-with-define-myptr-int-', 224, 'Whats wrong with #define myptr int *? '); AJ_ARTICLES96804[189] = new Array(48, '/find-your-article/48-statements-variables/225-can-we-use-variables-inside-a-switch-statement-can-we-use-floating-point-numbers-can-we-use-expressions', 225, 'Can we use variables inside a switch statement? Can we use floating point numbers? Can we use expressions?'); AJ_ARTICLES96804[190] = new Array(48, '/find-your-article/48-statements-variables/226-what-purpose-do-if-else-elif-endif-ifdef-ifndef-serve', 226, 'What purpose do #if, #else, #elif, #endif, #ifdef, #ifndef serve?'); AJ_ARTICLES96804[191] = new Array(48, '/find-your-article/48-statements-variables/227-what-is-more-efficient-a-switch-or-an-if-else-', 227, 'What is more efficient? A switch() or an if() else()? '); AJ_ARTICLES96804[192] = new Array(48, '/find-your-article/48-statements-variables/228-what-is-the-difference-between-a-deep-copy-and-a-shallow-copy', 228, 'What is the difference between a deep copy and a shallow copy?'); AJ_ARTICLES96804[193] = new Array(43, '/find-your-article/43-trees/229-write-a-c-program-to-determine-the-number-of-elements-or-size-in-a-tree', 229, 'Write a C program to determine the number of elements (or size) in a tree.'); AJ_ARTICLES96804[194] = new Array(43, '/find-your-article/43-trees/230-write-c-code-to-determine-if-two-trees-are-identical', 230, 'Write C code to determine if two trees are identical.'); AJ_ARTICLES96804[195] = new Array(43, '/find-your-article/43-trees/231-write-a-c-program-to-find-the-mininum-value-in-a-binary-search-tree', 231, 'Write a C program to find the mininum value in a binary search tree.'); AJ_ARTICLES96804[196] = new Array(43, '/find-your-article/43-trees/232-write-a-c-program-to-create-a-mirror-copy-of-a-tree-left-nodes-become-right-and-right-nodes-become-left', 232, 'Write a C program to create a mirror copy of a tree (left nodes become right and right nodes become left)'); AJ_ARTICLES96804[197] = new Array(43, '/find-your-article/43-trees/233-write-c-code-to-implement-the-preorder-inorder-and-postorder-traversals', 233, 'Write C code to implement the preorder(), inorder() and postorder() traversals.'); AJ_ARTICLES96804[198] = new Array(43, '/find-your-article/43-trees/234-write-c-code-to-check-if-a-given-binary-tree-is-a-binary-search-tree-or-not', 234, 'Write C code to check if a given binary tree is a binary search tree or not.'); AJ_ARTICLES96804[199] = new Array(49, '/find-your-article/49-structures-and-unions/235-can-structures-be-assigned-to-variables-and-passed-to-and-from-functions-', 235, 'Can structures be assigned to variables and passed to and from functions? '); AJ_ARTICLES96804[200] = new Array(49, '/find-your-article/49-structures-and-unions/236-can-we-directly-compare-two-structures-using-the-operator', 236, 'Can we directly compare two structures using the == operator?'); AJ_ARTICLES96804[201] = new Array(49, '/find-your-article/49-structures-and-unions/237-can-we-pass-constant-values-to-functions-which-accept-structure-arguments', 237, 'Can we pass constant values to functions which accept structure arguments?'); AJ_ARTICLES96804[202] = new Array(49, '/find-your-article/49-structures-and-unions/238-how-does-one-use-fread-and-fwrite-can-we-readwrite-structures-tofrom-files', 238, 'How does one use fread() and fwrite()? Can we read/write structures to/from files?'); AJ_ARTICLES96804[203] = new Array(49, '/find-your-article/49-structures-and-unions/239-why-do-structures-get-padded-why-does-sizeof-return-a-larger-size', 239, 'Why do structures get padded? Why does sizeof() return a larger size?'); AJ_ARTICLES96804[204] = new Array(49, '/find-your-article/49-structures-and-unions/240-can-we-determine-the-offset-of-a-field-within-a-structure-and-directly-access-that-element', 240, 'Can we determine the offset of a field within a structure and directly access that element?'); AJ_ARTICLES96804[205] = new Array(49, '/find-your-article/49-structures-and-unions/241-explain-unions', 241, 'Explain Unions'); AJ_ARTICLES96804[206] = new Array(49, '/find-your-article/49-structures-and-unions/242-what-are-bit-fields-in-structures', 242, 'What are bit fields in structures?'); AJ_ARTICLES96804[207] = new Array(43, '/find-your-article/43-trees/243-write-c-code-to-search-for-a-value-in-a-binary-search-tree-bst-', 243, 'Write C code to search for a value in a binary search tree (BST). '); AJ_ARTICLES96804[208] = new Array(34, '/find-your-article/34-gds-and-case-studies/244-commonwealth-games-2010-the-glory', 244, 'Commonwealth Games 2010 - The Glory'); AJ_ARTICLES96804[209] = new Array(26, '/find-your-article/26-answering-hr-questions/245-100-potential-interview-questions', 245, '100 Potential Interview Questions'); AJ_ARTICLES96804[210] = new Array(4, '/find-your-article/4-cc/246-copy-constructor-and-assignment-operator-in-c', 246, 'Copy Constructor and Assignment Operator in C++'); AJ_ARTICLES96804[211] = new Array(57, '/find-your-article/57-bit-operations/247-write-a-c-program-to-count-bits-set-in-an-integer', 247, 'Write a C program to count bits set in an integer?'); AJ_ARTICLES96804[212] = new Array(57, '/find-your-article/57-bit-operations/248-what-purpose-do-the-bitwise-and-or-xor-and-the-shift-operators-serve', 248, 'What purpose do the bitwise and, or, xor and the shift operators serve?'); AJ_ARTICLES96804[213] = new Array(57, '/find-your-article/57-bit-operations/249-write-a-c-program-utility', 249, 'Write a C Program Utility'); AJ_ARTICLES96804[214] = new Array(57, '/find-your-article/57-bit-operations/250-how-to-reverse-the-bits-in-an-integer', 250, 'How to reverse the bits in an integer?'); AJ_ARTICLES96804[215] = new Array(57, '/find-your-article/57-bit-operations/251-how-to-check-if-the-20th-bit-of-a-32-bit-integer-is-on-or-off', 251, 'How to check if the 20th bit of a 32 bit integer is on or off?'); AJ_ARTICLES96804[216] = new Array(57, '/find-your-article/57-bit-operations/252-how-to-reverse-the-odd-bits-of-an-integer', 252, 'How to reverse the odd bits of an integer?'); AJ_ARTICLES96804[217] = new Array(52, '/find-your-article/52-file-io/253-how-do-stat-fstat-vstat-work-how-to-check-whether-a-file-exists', 253, 'How do stat(), fstat(), vstat() work? How to check whether a file exists?'); AJ_ARTICLES96804[218] = new Array(52, '/find-your-article/52-file-io/254-how-can-i-insert-or-delete-a-line-or-record-in-the-middle-of-a-file', 254, 'How can I insert or delete a line (or record) in the middle of a file?'); AJ_ARTICLES96804[219] = new Array(52, '/find-your-article/52-file-io/255-how-can-i-recover-the-file-name-using-its-file-descriptor', 255, 'How can I recover the file name using its file descriptor?'); AJ_ARTICLES96804[220] = new Array(52, '/find-your-article/52-file-io/256-how-can-i-delete-a-file-how-do-i-copy-files-how-can-i-read-a-directory-in-a-c-program', 256, 'How can I delete a file? How do I copy files? How can I read a directory in a C program?'); AJ_ARTICLES96804[221] = new Array(52, '/find-your-article/52-file-io/257-the-use-of-various-file-io-functions', 257, 'The use of various file I/O functions'); AJ_ARTICLES96804[222] = new Array(52, '/find-your-article/52-file-io/258-how-to-check-if-a-file-is-a-binary-file-or-an-ascii-file', 258, 'How to check if a file is a binary file or an ascii file?'); AJ_ARTICLES96804[223] = new Array(34, '/find-your-article/34-gds-and-case-studies/259-commonwealth-games-the-shame', 259, 'Commonwealth Games 2010 - The Shady Side'); AJ_ARTICLES96804[224] = new Array(50, '/find-your-article/50-macros-headers-declaration/260-how-should-we-write-a-multi-statement-macro', 260, 'How should we write a multi-statement macro?'); AJ_ARTICLES96804[225] = new Array(50, '/find-your-article/50-macros-headers-declaration/261-how-can-i-write-a-macro-which-takes-a-variable-number-of-arguments', 261, 'How can I write a macro which takes a variable number of arguments?'); AJ_ARTICLES96804[226] = new Array(50, '/find-your-article/50-macros-headers-declaration/262-what-is-the-token-pasting-operator-and-stringizing-operator-in-c', 262, 'What is the token pasting operator and stringizing operator in C?'); AJ_ARTICLES96804[227] = new Array(50, '/find-your-article/50-macros-headers-declaration/263-define-a-macro-called-sqr-which-squares-a-number', 263, 'Define a macro called SQR which squares a number'); AJ_ARTICLES96804[228] = new Array(50, '/find-your-article/50-macros-headers-declaration/264-what-should-go-in-header-files-how-to-prevent-a-header-file-being-included-twice', 264, 'What should go in header files? How to prevent a header file being included twice?'); AJ_ARTICLES96804[229] = new Array(50, '/find-your-article/50-macros-headers-declaration/265-is-there-a-limit-on-the-number-of-characters-in-the-name-of-a-header-file', 265, 'Is there a limit on the number of characters in the name of a header file?'); AJ_ARTICLES96804[230] = new Array(50, '/find-your-article/50-macros-headers-declaration/267-is-it-acceptable-to-declaredefine-a-variable-in-a-c-header', 267, 'Is it acceptable to declare/define a variable in a C header?'); AJ_ARTICLES96804[231] = new Array(50, '/find-your-article/50-macros-headers-declaration/268-what-is-the-difference-between-char-a-and-char-a', 268, 'What is the difference between char *a and char a[]?'); AJ_ARTICLES96804[232] = new Array(50, '/find-your-article/50-macros-headers-declaration/269-how-can-i-declare-an-array-with-only-one-element-and-still-access-elements-beyond-the-first-element', 269, 'How can I declare an array with only one element and still access elements beyond the first element?'); AJ_ARTICLES96804[233] = new Array(50, '/find-your-article/50-macros-headers-declaration/270-what-is-the-difference-between-enumeration-variables-and-the-preprocessor-defines', 270, 'What is the difference between enumeration variables and the preprocessor #defines?'); AJ_ARTICLES96804[234] = new Array(53, '/find-your-article/53-compiling-and-linking/271-how-to-list-all-the-predefined-identifiers', 271, 'How to list all the predefined identifiers?'); AJ_ARTICLES96804[235] = new Array(53, '/find-your-article/53-compiling-and-linking/272-how-the-compiler-make-difference-between-c-and-c', 272, 'How the compiler make difference between C and C++?'); AJ_ARTICLES96804[236] = new Array(53, '/find-your-article/53-compiling-and-linking/273-give-a-list-of-the-general-steps-in-compilation', 273, 'Give a list of the general steps in compilation'); AJ_ARTICLES96804[237] = new Array(53, '/find-your-article/53-compiling-and-linking/274-what-are-the-different-types-of-linkages', 274, 'What are the different types of linkages?'); AJ_ARTICLES96804[238] = new Array(53, '/find-your-article/53-compiling-and-linking/275-what-do-you-mean-by-scope-and-duration', 275, 'What do you mean by scope and duration?'); AJ_ARTICLES96804[239] = new Array(53, '/find-your-article/53-compiling-and-linking/276-what-are-makefiles-why-are-they-used', 276, 'What are makefiles? Why are they used?'); AJ_ARTICLES96804[240] = new Array(38, '/find-your-article/38-c-programming/277-tutorials-on-c-language', 277, 'Tutorials on C Language'); AJ_ARTICLES96804[241] = new Array(39, '/find-your-article/39-data-structures/278-tutorials-on-data-structures', 278, 'Tutorials on Data Structures'); AJ_ARTICLES96804[242] = new Array(40, '/find-your-article/40-java/279-java-video-lessons', 279, 'Java Video Lessons'); AJ_ARTICLES96804[243] = new Array(58, '/find-your-article/58-mit-videos/280-mit-videos', 280, 'MIT Videos'); AJ_ARTICLES96804[244] = new Array(59, '/find-your-article/59-resume-service/283-resume-service', 283, 'Resume Service'); AJ_ARTICLES96804[245] = new Array(59, '/find-your-article/59-resume-service/284-resume-structuring', 284, 'Resume Structuring'); AJ_ARTICLES96804[246] = new Array(59, '/find-your-article/59-resume-service/285-cover-letters-format-content', 285, 'Cover Letters - Format and Content'); AJ_ARTICLES96804[247] = new Array(46, '/find-your-article/46-pointers/286-how-to-write-functions-which-accept-two-dimensional-arrays-when-the-width-is-not-known', 286, 'How to write functions which accept two-dimensional arrays when the width is not known?'); AJ_ARTICLES96804[248] = new Array(46, '/find-your-article/46-pointers/287-is-char-a3--qabcq-legal-what-does-it-mean', 287, 'Is char a[3] = \"abc\"; legal? What does it mean?'); AJ_ARTICLES96804[249] = new Array(46, '/find-your-article/46-pointers/288-if-a-is-an-array-is-a-valid', 288, 'If a is an array, is a++ valid?'); AJ_ARTICLES96804[250] = new Array(46, '/find-your-article/46-pointers/289-how-can-we-find-out-the-length-of-an-array-dynamically-in-c', 289, 'How can we find out the length of an array dynamically in C?'); AJ_ARTICLES96804[251] = new Array(46, '/find-your-article/46-pointers/290-what-are-the-common-causes-of-pointer-bugs', 290, 'What are the common causes of pointer bugs?'); AJ_ARTICLES96804[252] = new Array(46, '/find-your-article/46-pointers/291-what-is-an-opaque-pointer', 291, 'What is an opaque pointer?'); AJ_ARTICLES96804[253] = new Array(46, '/find-your-article/46-pointers/292-why-is-sizeof-an-operator-and-not-a-function', 292, 'Why is sizeof() an operator and not a function?'); AJ_ARTICLES96804[254] = new Array(46, '/find-your-article/46-pointers/293-what-is-the-difference-between-malloc-and-calloc', 293, 'What is the difference between malloc() and calloc()?'); AJ_ARTICLES96804[255] = new Array(46, '/find-your-article/46-pointers/294-what-are-near-far-and-huge-pointers', 294, 'What are near, far and huge pointers?'); AJ_ARTICLES96804[256] = new Array(46, '/find-your-article/46-pointers/295-what-operations-are-valid-on-pointers', 295, 'What operations are valid on pointers?'); AJ_ARTICLES96804[257] = new Array(46, '/find-your-article/46-pointers/296-is-pij-is-equivalent-to-pij', 296, 'Is *(*(p+i)+j) is equivalent to p[i][j]?'); AJ_ARTICLES96804[258] = new Array(46, '/find-your-article/46-pointers/297-what-do-pointers-contain', 297, 'What do pointers contain?'); AJ_ARTICLES96804[259] = new Array(59, '/find-your-article/59-resume-service/298-resume-service-faqs', 298, 'Resume Service FAQs'); AJ_ARTICLES96804[260] = new Array(60, '/find-your-article/60-resumes-and-cover-letters/300-resumes-and-cover-letters', 300, 'Resumes and Cover Letters'); AJ_ARTICLES96804[261] = new Array(5, '/find-your-article/5-java/301-java-refresher-jdk-a-jre', 301, 'Java Refresher - JDK & JRE'); AJ_ARTICLES96804[262] = new Array(3, '/find-your-article/3-operating-systems/302-vi-basics', 302, 'VI Editor Basics'); AJ_ARTICLES96804[263] = new Array(61, '/find-your-article/61-embedded-programming/303-best-questions-for-embedded-programmers', 303, 'Best questions for Embedded Programmers'); AJ_ARTICLES96804[264] = new Array(57, '/find-your-article/57-bit-operations/304-find-the-next-closest-multiple-of-8-using-bitwise-operations', 304, 'Find the next closest multiple of 8 using bitwise operations'); AJ_ARTICLES96804[265] = new Array(57, '/find-your-article/57-bit-operations/305-turn-off-rightmost-bit-least-significant-bit-of-an-integer', 305, 'Turn Off Rightmost bit (Least significant bit) of an integer'); AJ_ARTICLES96804[266] = new Array(61, '/find-your-article/61-embedded-programming/306-using-the-define-statement-how-would-you-declare-a-manifest-constant-thatreturns-the-number-of-seconds-in-a-year', 306, 'Using the #define statement, how would you declare a manifest constant thatreturns the number of seconds in a year?'); AJ_ARTICLES96804[267] = new Array(61, '/find-your-article/61-embedded-programming/307-write-the-qstandardq-min-macro-that-is-a-macro-that-takes-two-arguments-and-returns-the-smaller-of-the-two-arguments', 307, 'Write the \"standard\" MIN macro-that is, a macro that takes two arguments and returns the smaller of the two arguments.'); AJ_ARTICLES96804[268] = new Array(61, '/find-your-article/61-embedded-programming/308-infinite-loops-often-arise-in-embedded-systems-how-does-you-code-an-infinite-loop-in-c', 308, 'Infinite loops often arise in embedded systems. How does you code an infinite loop in C?'); AJ_ARTICLES96804[269] = new Array(46, '/find-your-article/46-pointers/309-write-definition-for-the-given-conditions', 309, 'Write definition for the given pointer conditions.'); AJ_ARTICLES96804[270] = new Array(54, '/find-your-article/54-general-concepts/310-what-are-the-uses-of-the-keyword-static', 310, 'What are the uses of the keyword static?'); AJ_ARTICLES96804[271] = new Array(25, '/find-your-article/25-computer-networks/312-satellite-internet', 312, 'Satellite Internet : the next level of internet'); AJ_ARTICLES96804[272] = new Array(25, '/find-your-article/25-computer-networks/313-ip-addresses-maintaining-uniqueness', 313, 'IP addresses – Maintaining Uniqueness'); AJ_ARTICLES96804[273] = new Array(25, '/find-your-article/25-computer-networks/314-ip-routing-finding-the-way', 314, 'IP routing – Finding the way'); AJ_ARTICLES96804[274] = new Array(25, '/find-your-article/25-computer-networks/316-osi-layers-building-blocks-of-networking', 316, 'OSI Layers - Building blocks of Networking'); Select Section Programming Puzzles Logic Computer Science Untechnicals Q & A Select Category Select Article Find Us On FACEBOOK ﻿ .FBConnectButton_Small{background-position:-5px -232px !important;border-left:1px solid #1A356E}.FBConnectButton_Text{margin-left:12px !important;padding:2px 3px 3px !important}#ShareSidebar{top: 20%;width:69px;Left: 0 !important;overflow:hidden;position: fixed;z-index: 100000;text-align:center;line-height:normal;_position: absolute;font-size:11px;}#ShareSidebar a,#ShareSidebar a:hover,#ShareSidebar a:visited{text-decoration:none;font-size:11px;} Share Tweet ```
``` ```
``` About UsSUBMIT AN ARTICLESITEMAPCONTACT US document.write(unescape("%3Cscript src='http://www.rating.in/service/circlecode.php?sid=8147&amp;bid=57' type='text/javascript'%3E%3C/script%3E")); Top © 2018 Falcon Minds. All Rights Reserved. var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-18185101-3']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); ```
``` ```