<?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:blogger='http://schemas.google.com/blogger/2008' 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-7953476913268941048</id><updated>2026-03-25T03:52:58.939-07:00</updated><category term="cProgram"/><category term="C Program"/><category term="Java"/><category term="C"/><category term="c++"/><category term="basicprogram"/><category term="ArrayQuestions"/><category term="C++ Program"/><category term="Array"/><category term="StringQuestions"/><category term="InterviewQuestions"/><category term="Basic C Program"/><category term="Recursion"/><category term="trickyQuestions"/><category term="CPlusPlusProgram"/><category term="Ctrickyquestion"/><category term="LinkedList"/><category term="factorial"/><category term="Basic Program"/><category term="Interview Questions"/><category term="Program"/><category term="CPlusPlus"/><category term="Concepts"/><category term="String"/><category term="String Question"/><category term="Algorithm"/><category term="Array Question"/><category term="Arrays"/><category term="Binary to Decimal"/><category term="Fibonacci Series"/><category term="Java Program"/><category term="Perfect number"/><category term="Prime Number"/><category term="Reverse a number"/><category term="Sorting"/><category term="Stack"/><category term="Vowel and Consonant"/><category term="palindrome"/><category term="ASCIIvalue"/><category term="Add two numbers"/><category term="Binary Search"/><category term="Bubble Sort"/><category term="Conversion"/><category term="Even Number"/><category term="Functions"/><category term="HCF"/><category term="LCM"/><category term="Largest Number"/><category term="Leap Year"/><category term="Matrices"/><category term="Palindrome Number"/><category term="Pattern"/><category term="Programming"/><category term="Reverse a string"/><category term="Reverse an Array"/><category term="Search Algorithm"/><category term="Smallest Number"/><category term="Sorting Algorithm"/><category term="Ubuntu"/><category term="sum of n numbers"/><category term="swap"/><category term=".htaccess"/><category term="ASCII"/><category term="Anagram"/><category term="Area"/><category term="Area of Circle"/><category term="Armstrong number"/><category term="Basic Questions"/><category term="C Questions"/><category term="C++Program"/><category term="Call By Reference"/><category term="Call by Value"/><category term="Compare two strings"/><category term="Concatenate"/><category term="Convert uppercase to lowercase"/><category term="Count number of digits in a number"/><category term="Cube"/><category term="Cube Root"/><category term="DataStructure"/><category term="DecimalToBinary"/><category term="Duplicate Element"/><category term="Even"/><category term="Ever Number"/><category term="Factors"/><category term="GCD"/><category term="Greatest"/><category term="Hashmap"/><category term="Insert an Element"/><category term="Insertion Sort"/><category term="Intersection"/><category term="Linear Search"/><category term="Linux"/><category term="Matrix"/><category term="Maximum Difference"/><category term="Merge Two Arrays"/><category term="Multiplication"/><category term="Multiplication Table"/><category term="Natural Numbers"/><category term="Odd"/><category term="PHP"/><category term="Perfect Square"/><category term="Pointers"/><category term="Practice Questions"/><category term="Print number"/><category term="QuickSort"/><category term="Rar"/><category term="Second Largest"/><category term="Second smallest number"/><category term="SimpleInterest"/><category term="SortingAlgo"/><category term="Stlen"/><category term="String Questions"/><category term="Strings"/><category term="Subtract two matrices"/><category term="System configuration on Ubuntu"/><category term="Time Complexity"/><category term="VoidPointer"/><category term="count digit"/><category term="cquestion"/><category term="date_format"/><category term="for loop"/><category term="hash"/><category term="largest"/><category term="linked list"/><category term="lowercase to uppercase"/><category term="memcached"/><category term="odd and even numbers"/><category term="odd numbers"/><category term="selection sort"/><category term="sieve algorithm"/><category term="sizeof"/><category term="smarty"/><category term="square"/><category term="stcmp()"/><category term="sum of a number"/><category term="tips-tricks"/><category term="while loop"/><title type='text'>Programming Tutorials</title><subtitle type='html'>CProgrammingCode.com is a programming blog where you learn how to code and data structure through our tutorials. </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>176</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-576783450385244060</id><published>2018-12-10T17:38:00.000-08:00</published><updated>2018-12-10T17:38:48.356-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array"/><category scheme="http://www.blogger.com/atom/ns#" term="ArrayQuestions"/><category scheme="http://www.blogger.com/atom/ns#" term="cProgram"/><title type='text'>Write a Program to Move all Zeros to End of an Array</title><summary type="text">
Given an array of random numbers, Write a c code to move all zeros to end of an array. An array contains only positive number.

For example -

Input

int arr[] = {1,6,0,3,8,9,0,2};


Output

&amp;nbsp;// Move all zero at the end

int arr[] = {1,6,3,8,9,2,0,0};


&amp;nbsp; 





How to Move all Zeros to End of an Array

Traverse an array and push all non-zero element in an array. Maintain the count. </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/576783450385244060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-move-all-zeros-at-end.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/576783450385244060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/576783450385244060'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-move-all-zeros-at-end.html' title='Write a Program to Move all Zeros to End of an Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA7gnlhj574TAuCLZzPRaEWAhsJRzV5Ax4mfWGwmyU_urluM20stWsDNO0ZJj73061KwSaECQQCienOwj7rR7M-m_v-iPs7Mj4ocZMgvLaxfWq2BUE-DrIZ47FvdXxsPeAjaDcLA74JFY/s72-c/Screen+Shot+2017-07-23+at+10.10.51+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-9116059587463356640</id><published>2018-12-08T03:42:00.000-08:00</published><updated>2018-12-08T18:53:47.030-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic C Program"/><category scheme="http://www.blogger.com/atom/ns#" term="C Program"/><title type='text'>C Program to Calculate Power of a Number using For &amp; While Loop</title><summary type="text">
Write a c program to calculate power of a number using for &amp;amp; while loop without using inbuilt pow() function.

In this tutorial, You are going to learn&amp;nbsp; how to calculate power of a number without using pow() function. In this program, we take two numbers (base and exponent) as an input from a user and calculate it&#39;s result which is (baseexponent).

For example -

Input number (base) : 2</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/9116059587463356640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/12/program-to-calculate-power-of-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/9116059587463356640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/9116059587463356640'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/12/program-to-calculate-power-of-number.html' title='C Program to Calculate Power of a Number using For &amp; While Loop'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidQPKX9Zu6dcqV5uSBeSjC771kQGontrojrawTkkdlyhS93SzAocEgAlbMRW4lyxj8kENmmFXgU2XCZO1v3lbikJ_ARiWx1ZZ2M10OpcsOhOboRZ44NT0cLkJ3zTzpW_S5CxEg_osMcT0/s72-c/Screen+Shot+2017-03-05+at+8.43.32+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-6443732595296576465</id><published>2018-12-04T16:54:00.000-08:00</published><updated>2018-12-04T16:54:09.251-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array Question"/><category scheme="http://www.blogger.com/atom/ns#" term="C Program"/><title type='text'>C Program to Delete an Element from an Array</title><summary type="text">
Write a c program to delete an element from an array at specified position. In this program, we take an input array and position to delete an array element from a user. Then we check whether a position entered by user is valid or not.

All elements of an array are stored in a contiguous memory location. To delete an element at index i in an array, We have to shift all elements from index i+1 to </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/6443732595296576465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/06/c-program-to-delete-element-from-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6443732595296576465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6443732595296576465'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/06/c-program-to-delete-element-from-array.html' title='C Program to Delete an Element from an Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpHeEgw9wYl1Tl2j32FoOTZIGWt9ozjw3d1CMGCiYHZQ7pIUHXpaYo0t28ZOcXSNa-TgD2y5h1DWMoyom34xAMBJiPDJXrNbbmQ3WVg0tfMCZX0qnttlfIGZA8KFnAcADnI-xSn3kFBD4/s72-c/Screen+Shot+2017-06-20+at+8.57.49+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-6736654610124821511</id><published>2018-11-20T16:40:00.000-08:00</published><updated>2018-11-20T17:09:21.995-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array Question"/><category scheme="http://www.blogger.com/atom/ns#" term="ArrayQuestions"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>C Program to Insert an Element in an Array</title><summary type="text">
Write a c program to insert an element in an array. In this tutorial, we are going to write a c program which insert an element in an array at a given index.

This question is also very important in terms of an interview.

In this program, we are going to write a c code which takes an input array, position and value of a new element from a user and insert it at a specified position.

For example</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/6736654610124821511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2013/11/write-c-program-to-insert-element-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6736654610124821511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6736654610124821511'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2013/11/write-c-program-to-insert-element-in.html' title='C Program to Insert an Element in an Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizNPuFas51nor3W2EpRZ3e5q46zdyqH_eyr3Gc8criioz4MyycR1NQLj0OCF4oIy1GVYvrgkHCm-2psNQcRSKkC50VEiXVTgzrUQz2YL0-M0S3gsUZfNH2_mvIEUWswaU_5m_SZqakqC4/s72-c/Screen+Shot+2017-08-26+at+11.40.55+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-5808534351768793831</id><published>2018-08-14T23:11:00.000-07:00</published><updated>2018-11-20T16:42:30.955-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArrayQuestions"/><category scheme="http://www.blogger.com/atom/ns#" term="Arrays"/><category scheme="http://www.blogger.com/atom/ns#" term="cProgram"/><title type='text'>Find Smallest Number in Array - C, C++ Code</title><summary type="text">


C, C++ Program to Print Smallest Element of an Array

Write a C, C++&amp;nbsp;program to find smallest number in an array. Given an unsorted array, we have to write a code to print smallest number of an array.

To understand this problem, &amp;nbsp;Let&#39;s take an array arr[] = {3, 4, 1, 5, 6}. The smallest number in an array is 1. 

Now the question is how to solve this problem. You can use multiple </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/5808534351768793831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-find-smallest-element.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5808534351768793831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5808534351768793831'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-find-smallest-element.html' title='Find Smallest Number in Array - C, C++ Code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX1Vk_qIj6jzKSBJjtA5PY0IsFBBaKVDhrX1a9UcgN2g-IFLgh2_PVLRfIYWHkcqhOonC3_A2pIyMAFvtdyPQXM5GCuVdKDTTu4-VW4WMkPQ1m5g42raPADJdPvZQ90-d2KoT40YeC9cg/s72-c/Screen+Shot+2016-09-03+at+1.50.04+pm.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-2387140908738424016</id><published>2018-06-09T23:40:00.000-07:00</published><updated>2018-06-09T23:49:49.984-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic Program"/><category scheme="http://www.blogger.com/atom/ns#" term="Greatest"/><title type='text'>C Program to Find Largest of Three Numbers using Ternary Operator</title><summary type="text">
Write a C program to find largest of three numbers using ternary operator. Given three input numbers, we have to write a code to find largest of three numbers using ternary operator.









Algorithm to Find Largest of three Numbers using Ternary Operator


1. In first step, let&#39;s declare three variables to hold the values of three input numbers.

2.&amp;nbsp; use ternary operator to compare the </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/2387140908738424016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2011/08/write-program-to-find-greatest-number.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/2387140908738424016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/2387140908738424016'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2011/08/write-program-to-find-greatest-number.html' title='C Program to Find Largest of Three Numbers using Ternary Operator'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtJDRdlK0m5EHWUSMInQKE4QkDXdqqTNfxrulOYW_ZJWvsyKF68dT9aYfOGIsqrIm9YiCEwWj9FcS_R8iHxGVPh7sQjWhMAB4QAiyOmCkjdVLz-V8lI1t980RlXDzfgapSs381dL8Dyz4/s72-c/Screen+Shot+2018-06-10+at+12.15.13+PM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-5932072170320114143</id><published>2018-05-20T01:01:00.000-07:00</published><updated>2018-05-20T01:01:31.484-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic C Program"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++ Program"/><title type='text'>Program to Print Hello World without using Semicolon - C, C++ Code</title><summary type="text">

Write a C, C++ program to print hello world without using semicolon. In this tutorial, we are going to write a program which will print hello world using if-else, while and switch statements.

In c, c++ programming language every line ends with a semicolon, so it seems tricky how do you use&amp;nbsp;printf&amp;nbsp; in C and cout in C++ without semicolon.


Programming Questions on Strings

How to read</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/5932072170320114143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2011/08/print-output-without-main-function.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5932072170320114143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5932072170320114143'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2011/08/print-output-without-main-function.html' title='Program to Print Hello World without using Semicolon - C, C++ Code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvwf4HEvMRA0ZoXyiiT8IqBZCzIQMcPPSNLPJLw1eIkVeW44gSH7f0wWOCizY0pm40jnYwo4wjAzIZgp-palhNGZEyl_LOeimQiI2m2MlP_PYMIXbGmubu2dK7HNssSuUKWP2v9wCEFKA/s72-c/Screen+Shot+2018-05-20+at+1.28.23+PM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-395793362801377218</id><published>2018-04-15T07:45:00.000-07:00</published><updated>2018-04-27T20:32:41.127-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Count number of digits in a number"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Count Number of Digits in a Number</title><summary type="text">
Write a Java program to count number of digits in a number. In this program, We take a number as an input and print the count of digit in a number.










C, C++ Program to count number of digits in a number

Java program to print factorial of a number

Java program to reverse a string

Java programs


 Java Program to Count Number of Digits in a Number 


import java.util.*;

public class </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/395793362801377218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2016/09/java-program-to-count-number-of-digits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/395793362801377218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/395793362801377218'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2016/09/java-program-to-count-number-of-digits.html' title='Java Program to Count Number of Digits in a Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNTDDs0DCaXCBLL0fYL2LUxK90a0ewbU3ITd7RGBD39ZP65yEklu2BO_fwcXgF739_iw2bOB-E1PMUdUEnmVYggRjd62i5rALD1gGDcZ9yHmslHNouL5kcsPHMWqeiHGr37ywA1h-K_6Q/s72-c/Screen+Shot+2018-04-15+at+8.13.55+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-6262638708402891870</id><published>2018-02-10T21:09:00.000-08:00</published><updated>2018-04-27T20:33:12.350-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="Binary Search"/><category scheme="http://www.blogger.com/atom/ns#" term="Search Algorithm"/><title type='text'>Binary Search Program Using Recursion in C, C++</title><summary type="text">
Write a C, C++ code to implement binary search program using recursion.

&amp;nbsp;What is Binary Search?&amp;nbsp;

Binary Search algorithm is used to search an element in a sorted array. Binary search works by comparing the value to the middle element of an array. 

If the value is found then index is returned otherwise the steps is repeated until the value is found.

It is faster than linear search.
</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/6262638708402891870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/08/write-cc-code-to-implement-binary.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6262638708402891870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6262638708402891870'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/08/write-cc-code-to-implement-binary.html' title='Binary Search Program Using Recursion in C, C++'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-7269268742133167002</id><published>2018-01-19T18:11:00.000-08:00</published><updated>2018-04-27T20:33:30.477-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="Stack"/><title type='text'>C Program to Implement a Stack Using Array</title><summary type="text">
Write a C program to implement a stack using array. In this tutorial, You are going to learn the implement of stack data structure using an array.

What is a Stack Data Structure?

A Stack is a data structure in which insertion and deletion can be done from one end only. That&#39;s why it is also called LIFO(Last In First Out).

In stack, Insertion and deletion operation is known as&amp;nbsp;push (</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/7269268742133167002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/05/program-to-implement-stack-push-and-pop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/7269268742133167002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/7269268742133167002'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/05/program-to-implement-stack-push-and-pop.html' title='C Program to Implement a Stack Using Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf5I-8Bk87CDIDet2dCKTbewa3-NYg0gNzm4DBgJL0PtGCE4JHYTpOAp5YQufO0GhJ0X-EZ_V7dgXSwTAtN8o9HnNONPG8ufgQM_StHjdHNCiA137ZvpZWjrfMfGEOPMRnQmCivzx_tZk/s72-c/Screen+Shot+2018-01-20+at+7.37.38+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-6249960089544624337</id><published>2018-01-19T07:08:00.000-08:00</published><updated>2018-04-27T20:34:48.248-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="Stack"/><category scheme="http://www.blogger.com/atom/ns#" term="StringQuestions"/><title type='text'>Write a Program to Reverse a String Using Stack </title><summary type="text">


Write a C, C++ program to reverse a string using Stack data structure. In this question, A string is input by a user and our program will reverse a string using a Stack.


 Stack Data Structure 

Stack is an abstract data type in which push (insertion) and pop (deletion) operations can be done at one end. &amp;nbsp;Stack is a LIFO (Last in First Out) data structure, which means element which is </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/6249960089544624337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/05/write-program-to-reverse-string-using.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6249960089544624337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6249960089544624337'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/05/write-program-to-reverse-string-using.html' title='Write a Program to Reverse a String Using Stack '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-35078904919758288</id><published>2017-12-31T21:01:00.000-08:00</published><updated>2018-04-27T20:34:58.780-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic C Program"/><category scheme="http://www.blogger.com/atom/ns#" term="C Program"/><title type='text'>C Program to Calculate the Sum of First N Natural Numbers</title><summary type="text">
Write a C program to calculate the&amp;nbsp;sum of first n natural numbers. Given an input n, We have to write a code to print the sum of first n natural number (1 to n).

There are multiple approaches to solve this problem.

* We can solve this problem using loop.
* Other approach is to use mathematical formula to calculate the sum of first n natural number.
* We can also use recursion to find the </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/35078904919758288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/06/write-program-to-calculate-sum-of-n.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/35078904919758288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/35078904919758288'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/06/write-program-to-calculate-sum-of-n.html' title='C Program to Calculate the Sum of First N Natural Numbers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg5WlHxmvgXIi6IWEIQNvcighAw0_3vy8yUMyInj0U7RD4L1Zi6INk6boU8olEUidDraFAudfAx4QZLHmiSfgGWknwP7sIiV0p3dWHiC4X_ppqvRMDuRHly_c5IWtkS4l4wep5v-0Qxwc/s72-c/Screen+Shot+2018-01-01+at+10.26.37+AM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-2134096019959742949</id><published>2017-12-24T06:33:00.002-08:00</published><updated>2017-12-24T19:11:57.690-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program"/><category scheme="http://www.blogger.com/atom/ns#" term="Recursion"/><category scheme="http://www.blogger.com/atom/ns#" term="Reverse an Array"/><title type='text'>Java Program to Reverse an Array using Recursion</title><summary type="text">
Write a java program to reverse an array using recursion. Given an input array, we have to write a java code to reverse an array using recursion. In this tutorial, We are going to solve this problem using recursion.

Recursion is an important programming concept, if you are not familiar with recursion concept then you can check this tutorial on recursion.

Difference between recursion and </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/2134096019959742949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/12/java-program-to-reverse-array-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/2134096019959742949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/2134096019959742949'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/12/java-program-to-reverse-array-using.html' title='Java Program to Reverse an Array using Recursion'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4rsF_8DEhje_X2FHnuTdOLAPU4KNoCzg06cm9pB9PtXJfF7gGZqW_h0yHarD5mM7mxsaKdZWYpIUfNMxSQttXE_jkEjEuneCH2JMXt4HOlhn9jYlNy349cmywuOh-ey232x211OZ2L4w/s72-c/Screen+Shot+2017-12-24+at+7.51.04+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-5542967287404147164</id><published>2017-09-13T05:10:00.000-07:00</published><updated>2017-09-13T07:19:49.369-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Perfect number"/><title type='text'>Java Program to Check Perfect Number</title><summary type="text">
Write a java program to check whether a number is perfect or not. Given an input number, we have to write a java code which check whether an input number is perfect number or not.

Before solving this problem, let&#39;s first understand what is a perfect number.


What is Perfect Number?

A perfect number is a positive integer that is equal to the sum of it&#39;s positive divisors &amp;nbsp;excluding the </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/5542967287404147164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2016/04/program-to-check-perfect-number-in-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5542967287404147164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/5542967287404147164'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2016/04/program-to-check-perfect-number-in-java.html' title='Java Program to Check Perfect Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3X6ySBnDsIS1-EsV_iRhOJ0-X1LZI2IEiwVTJ-poxpBaBFBH7X9YENZrna9VO4sQJnYtRc21VoI0XVOo_OqMkHTd0xgR5a86jlqeWH1qM4j3E5icmzOjgHTK166RVMKvuflMI3anyd_w/s72-c/Screen+Shot+2017-09-13+at+6.41.19+PM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-1232879669306864831</id><published>2017-08-27T07:18:00.001-07:00</published><updated>2017-08-27T07:18:50.631-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPlusPlus"/><category scheme="http://www.blogger.com/atom/ns#" term="Insert an Element"/><title type='text'>C++ Program to Insert an Element in an Array</title><summary type="text">
Write a c++ program to insert an element in an array. In this program, we are going to write a c++ code which takes an input array, position and value of an element and insert it an array.


C program to insert an element in an array








C++ Program to Insert an Element in an Array

#include &amp;lt;iostream&amp;gt;
using namespace std;

 int main() {
 
   int arr[100], size, pos, val, i, temp;
 
</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/1232879669306864831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-insert-element-in-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1232879669306864831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1232879669306864831'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-insert-element-in-array.html' title='C++ Program to Insert an Element in an Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk8RAr0gyPsG__iHM0-6N3Qez8Wvea3KRgPKwhyh5Ocoxi_OMU3J_jdSMsrosh52cLi_B5fSz52jQsVgcFCsSMVv_KHN2eSus4MZB3u08NkSvIWwW80rJ6VLqqF9iaBly_Q6zbx_LKVGM/s72-c/Screen+Shot+2017-08-27+at+7.42.04+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-8195033021048024008</id><published>2017-08-25T16:59:00.002-07:00</published><updated>2017-08-25T16:59:37.828-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++ Program"/><category scheme="http://www.blogger.com/atom/ns#" term="CPlusPlus"/><category scheme="http://www.blogger.com/atom/ns#" term="Leap Year"/><title type='text'>C++ Program to Check Leap Year - Whether a Entered Year is Leap Year or Not</title><summary type="text">
Write a c++ program to check whether a entered year is leap year or not. In this programming tutorial, We are going to write a c++&amp;nbsp;code which takes an input year and check whether a entered year is leap year or not.

In my previous tutorial, I have explained what is a leap year and algorithm to check leap year.

C program to check leap year

Programming videos







C++ Program to Check </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/8195033021048024008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-check-leap-year-whether.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/8195033021048024008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/8195033021048024008'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-check-leap-year-whether.html' title='C++ Program to Check Leap Year - Whether a Entered Year is Leap Year or Not'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_9fApzQQOIDcbyulkr1HKUcSsB10Pn9d9HZmHqbKzeQb_OUhIRJrQimzOdZghO1FAitxF22qbyDYxJCm6Yyq7pV0NsxKn15eSUMf3_F9N_CoVUzMptRsI1xL1iAGx2Et6Qtuud_j5Aw/s72-c/Screen+Shot+2017-08-20+at+2.45.58+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-1124066198801912345</id><published>2017-08-19T21:34:00.000-07:00</published><updated>2017-08-19T21:34:01.648-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic C Program"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C Program"/><category scheme="http://www.blogger.com/atom/ns#" term="Leap Year"/><title type='text'>C Program to Check Leap Year</title><summary type="text">
Write a C program to check whether a entered year is a leap year or not. In this tutorial, &amp;nbsp;we are going to write a code which take a year as an input and print whether a input year is a leap year or not.


What is Leap Year?

A Leap year is a year which has 366 days, it means it has one additional day. Each leap year has 366 days instead of the usual 365 days.






Algorithm to Check Leap</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/1124066198801912345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2015/11/leap-year-program-in-c-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1124066198801912345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1124066198801912345'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2015/11/leap-year-program-in-c-c.html' title='C Program to Check Leap Year'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7S7sT4pCHFYgwCWQbrWfbVsySK2aXmdxEbZhKhgIXXsJy6CB6Qw8cxQofwM7BY88BJ6hB_X8f8C24Spdd1sfSRPoZiW1kck74M6zvrz0EHVOqaRmvAf3QZn6rRWr4UZjSfh_KOPpVdcY/s72-c/Screen+Shot+2016-09-23+at+5.39.46+am.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-3368853759415045324</id><published>2017-08-15T16:55:00.001-07:00</published><updated>2017-08-15T16:55:14.278-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Binary to Decimal"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Convert Binary to Decimal Number</title><summary type="text">
Write a java program to convert binary to decimal number. In this tutorial, we are going to write a program which takes an input binary number and convert them into decimal number.


How to Convert Binary to Decimal Number

Let&#39;s assume, we have to convert 1000 to decimal number.

Decimal Number Conversion : 1 * 23 &amp;nbsp; + 0 *&amp;nbsp;2&amp;nbsp;2 &amp;nbsp;&amp;nbsp;+ &amp;nbsp;0 *&amp;nbsp;2&amp;nbsp;1&amp;nbsp;+ &amp;nbsp;0 *</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/3368853759415045324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/08/java-program-to-convert-binary-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/3368853759415045324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/3368853759415045324'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/08/java-program-to-convert-binary-to.html' title='Java Program to Convert Binary to Decimal Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja28fLbCMZvO4mZspfaQRkou9tj1DiNU3YTqE2gq01P14VZ8ZiaT1YkQ3qDa91bS0GwM8IC9IgKwDOp6uMahzynmnPQPn3czEqqO6qobunLT4dXbnhbRolC7J4e4kN2gpd2Gnp3x-04r0/s72-c/Screen+Shot+2017-08-16+at+5.09.24+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-675750570555682769</id><published>2017-08-14T19:35:00.001-07:00</published><updated>2017-08-14T19:35:10.051-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Binary to Decimal"/><category scheme="http://www.blogger.com/atom/ns#" term="C++ Program"/><title type='text'>C++ Program to Convert Binary to Decimal Number</title><summary type="text">
Write a C++ code to convert binary to Decimal number. Given an input binary number, we have to write a code to convert binary to decimal number.


C program to convert binary to decimal number








C++ program to check whether a number is palindrome or not



C++ Program to Convert Binary to Decimal Number


In this program, we write a code which takes an input binary number and print it&#39;s </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/675750570555682769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-convert-binary-to-decimal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/675750570555682769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/675750570555682769'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/08/c-program-to-convert-binary-to-decimal.html' title='C++ Program to Convert Binary to Decimal Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaD_WB6Ze0YBsFs91Eb7Vw1k1M9bNslrE267ZU94hGm0YI2t6U90vyrdsbswXWxcUXhjRwAmil84yjgzIQgjxa8ptMmv8eSg3-mkhtFNlw4AFULDNe5wnc1oY1DSSd1DSyZl3dUC35waE/s72-c/Screen+Shot+2017-08-15+at+7.56.05+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-8644822389218793048</id><published>2017-08-14T19:22:00.000-07:00</published><updated>2017-08-14T19:37:11.206-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="basicprogram"/><category scheme="http://www.blogger.com/atom/ns#" term="Binary to Decimal"/><title type='text'>C Program to Convert Binary to Decimal Number</title><summary type="text">
Write a C program to convert binary to decimal number. In this programming question, we are going to write a code which takes binary number as an input and print their decimal representation.

This question is very important in terms of technical interview.

C interview questions and answers

For example -

Input &amp;nbsp; &amp;nbsp; &amp;nbsp;: 100 (Binary Number)
Output &amp;nbsp; &amp;nbsp;: 4 &amp;nbsp; &amp;nbsp;(</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/8644822389218793048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/12/c-program-to-convert-binary-to-decimal.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/8644822389218793048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/8644822389218793048'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/12/c-program-to-convert-binary-to-decimal.html' title='C Program to Convert Binary to Decimal Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-GbOaxudUDKQB0d-w-KzyUGxxjObIQxTTrMEwfI9ASFkC_0rxOGTYVyQKGrtonU2ImpnBg5VQz55X_bIlbuFMtix-orn0PiDylWyW-TieE8QuAx7bwFcqBav2DZHdX_jwkjKKIqSSYyE/s72-c/Screen+Shot+2017-08-15+at+7.47.33+AM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-3696220970631923904</id><published>2017-08-07T05:57:00.000-07:00</published><updated>2017-08-20T02:03:02.930-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="basicprogram"/><category scheme="http://www.blogger.com/atom/ns#" term="CPlusPlus"/><category scheme="http://www.blogger.com/atom/ns#" term="String Questions"/><title type='text'>C++ Program to Count the Number of Vowels and consonants in a String</title><summary type="text">
Write a C++ program to count the number of vowels and consonants in a string. In this programming question, We have to write a code which takes a string as an input and count number of vowels and consonants in a string.

C program to count the number of vowels and consonants in a string






How to read string with spaces using scanf

Programming Questions on Strings

C program to find the </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/3696220970631923904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/06/write-program-to-count-number-of-vowels.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/3696220970631923904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/3696220970631923904'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/06/write-program-to-count-number-of-vowels.html' title='C++ Program to Count the Number of Vowels and consonants in a String'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5GSKnmjqsySpMilT7GeGBPUoNVC-An4bxMdm5Eosy0ogDLnw9-OZ1VJScRhue4tZ0RsU7P4F3MQf-QuPti18LwhLW9sJnGf7BzFfQy1YBnwoHxTk1Zhjxny1kaUNOKynlbDnPgBXkAcc/s72-c/Screen+Shot+2017-08-07+at+6.25.07+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-1498524617224268738</id><published>2017-08-06T20:29:00.000-07:00</published><updated>2017-08-06T20:29:57.852-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cProgram"/><category scheme="http://www.blogger.com/atom/ns#" term="Stlen"/><category scheme="http://www.blogger.com/atom/ns#" term="String Question"/><title type='text'>C Program to Find the Length of a String without using Strlen</title><summary type="text">
Write a c program to find length of a string without using strlen() function. &amp;nbsp;In this programming questions, we have to write a code to find the length of a string.

We can easily find the length of string using inbuilt strlen() function. Let&#39;s first find the length of a string using strlen() function.

C program to compare two strings using strcmp() function


C Program to Find the Length</summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/1498524617224268738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/12/c-program-to-find-length-of-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1498524617224268738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1498524617224268738'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/12/c-program-to-find-length-of-string.html' title='C Program to Find the Length of a String without using Strlen'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ2aSsdjH0SUoGHT6qc-2Ut4q-PJXsBNaDDs0rweutwuXc3Iuy1wlUThjNeuOs-TNRl4Eavx3ZJj36Yhb8razgGFRHE9N8LCXR65Pz3oQitYcYjHufIP91y2jtVw_HOoi4H2NxUH6RCX8/s72-c/Screen+Shot+2017-08-07+at+8.52.30+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-6392906840614998915</id><published>2017-07-29T10:11:00.000-07:00</published><updated>2017-07-29T10:11:09.162-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Compare two strings"/><category scheme="http://www.blogger.com/atom/ns#" term="stcmp()"/><category scheme="http://www.blogger.com/atom/ns#" term="String"/><title type='text'>C Program to Compare Two Strings Using strcmp() Function</title><summary type="text">
Write a c program to compare two strings using strcmp() function. In this tutorial, we are going to write a c code which take two strings as an input and compare it with inbuilt strcmp() function.

The strcmp() function compares two strings lexicographically. 

i) When both the strings are equal, &amp;nbsp;then it returns zero.

ii) When first string is lexicographically greater than second string, </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/6392906840614998915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-compare-two-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6392906840614998915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/6392906840614998915'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2014/03/write-program-to-compare-two-strings.html' title='C Program to Compare Two Strings Using strcmp() Function'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpPSkASLt7SjjEKiZmcy69lwRmMiZ9txw7wGxTluNPrapXEBLi-NsbWg4RtwesSRBheqreRvvtcaqJIyID_EN8nOxUz5TrAOBIUgPJldftKif0ZKHs3dBAft_FWZa_fAZbEP2A1PhN9iY/s72-c/Screen+Shot+2017-07-29+at+9.42.24+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-1128246135471093471</id><published>2017-07-26T16:36:00.000-07:00</published><updated>2017-07-26T16:38:38.352-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="factorial"/><title type='text'>C++ Program to Print Factorial of a Number using Recursion</title><summary type="text">
Write a c++ program to print factorial of a number using recursion. In this programming question, we are going to write a c++ code which takes an input number and print factorial of a number using recursion.

This question is mostly asked in an interviews. There are two approaches to print factorial of a number (Iterative &amp;amp; Recursive).

i) C++ program to print factorial of a number - </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/1128246135471093471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2017/07/c-program-to-print-factorial-of-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1128246135471093471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/1128246135471093471'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2017/07/c-program-to-print-factorial-of-number.html' title='C++ Program to Print Factorial of a Number using Recursion'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7953476913268941048.post-7436882663994468539</id><published>2017-07-16T02:04:00.000-07:00</published><updated>2018-01-27T16:59:48.920-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cProgram"/><category scheme="http://www.blogger.com/atom/ns#" term="factorial"/><title type='text'>Print Factorial of a Number using Recursion in C</title><summary type="text">
Write a program to print factorial of a number using recursion in C. &amp;nbsp;In this program, we have to write a code which takes an input number and print factorial of a number using recursion.



Before solving this problem, let&#39;s first understand what is recursion? And the difference between recursion and iteration.


What is Recursion?

In Recursion, A function calls itself until the base </summary><link rel='replies' type='application/atom+xml' href='http://www.cprogrammingcode.com/feeds/7436882663994468539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.cprogrammingcode.com/2011/09/find-factorial-of-number-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/7436882663994468539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7953476913268941048/posts/default/7436882663994468539'/><link rel='alternate' type='text/html' href='http://www.cprogrammingcode.com/2011/09/find-factorial-of-number-using.html' title='Print Factorial of a Number using Recursion in C'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6WOcTFlXE1PExm2w1GwaDyI32UQ5y62s2P24QIhzETWpxToa9wI-yYgKM3ryNEmYG-q9XOZi2qydCOud0Yeh3WWsJnorGXJiA_vqtMOssPc4KID1-5EA_NLeX10hmRA-z0o2KE3UCus/s72-c/Screen+Shot+2017-07-16+at+2.27.05+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>