<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7092135066960371093</atom:id><lastBuildDate>Fri, 23 Jan 2026 04:37:47 +0000</lastBuildDate><category>C Assignments</category><category>Basics of C</category><category>c</category><category>C++ Assignment</category><category>Interview Question in C</category><category>C++</category><category>Graphics In C</category><category>Hardware leavel C Programming</category><category>Pointer types and Arrays</category><category>Projects In C</category><category>Data Structure in C</category><category>Unix Linux Based Programs</category><category>File Handling</category><category>Linux Based Programs</category><category>Array Pointers interview Questions</category><category>Memory Allocation</category><category>Virus in C</category><category>games in c</category><category>2 Dimensional Array in C</category><category>Array Pointers Memory Allocation</category><category>C Assignment to Transpose of two matrix</category><category>C File handling</category><category>C Program to print STAR PATTERNS  pyramids</category><category>C Tricky Programms</category><category>C Tricky Programs</category><category>C program to calculate length of given string  reverse string</category><category>Conversion Programs in C</category><category>FAQ on Array and pointers</category><category>Frequently Asked Questions on Arrays and Pointers</category><category>Hacking tools in C</category><category>Sum of diagonal elements of a matrix in c</category><category>VHDL Programs</category><category>array manipulations in C</category><category>2-D Array</category><category>2-D Array Dimensional</category><category>2D Array  Pointers</category><category>5 numbers in each line printing 1 to 100 numbers</category><category>Addition of 2 polynomials in C</category><category>Addition of two 3x3 matrix in C | Addition on matrix in C</category><category>Area and Perimeter of Square in C</category><category>Arithmatic operaton in C switch case</category><category>Array Program to calculate Sum of marks in C</category><category>Automorphism Numbers in C</category><category>Average of Floating Number</category><category>Basic Pre-Processing Example In C</category><category>Best fortran compiler for Windows 7</category><category>Bitwise operators supported by C language</category><category>C 2 numbers swap</category><category>C Asked in Interview or Viva</category><category>C Assignment to Find Given Year leap year or Not</category><category>C Assignment to find Enter value is number or Char</category><category>C Assignment to print Diamond shape in C</category><category>C Language  convert string to int | Converting String to Integer in C</category><category>C Language Program to find Palindrome String</category><category>C Language to show captcha</category><category>C Mark list Program using Structure</category><category>C Multiple Structure Program of Mark-list</category><category>C PROGRAM TO CREATE Triangle USING FOR LOOP TO OBTAIN THE Triangle</category><category>C PROGRAM TO READ A FLOATING POINT NUMBER AND DISPLAYS THE RIGHT MOST DIGIT OF THE INTEGRAL PART OF THE NUMBER</category><category>C PROGRAMS CONVERT TEMPERATURE FROM DEGREE CELSIUS TO DEGREE FAHRENHEIT</category><category>C Pre Processor</category><category>C Program (WAP) to show addition of two 2-dimensional Array</category><category>C Program 2D arrays with structs and pointers</category><category>C Program Add Two Numbers Using Pointer | Addition of Numbers using Pointers in C</category><category>C Program Binary search</category><category>C Program FOR MATRIX MULTIPLICATION</category><category>C Program For Entering An Array Of Elements</category><category>C Program For Multiplication of two matrices | matrices 3D Array Program in C</category><category>C Program On Pointers  2 - Dimensional Array</category><category>C Program On Pointers and 2 - Dimensional Array.</category><category>C Program RECURSIVE FUNCTION TO FIND FACTORIAL OF A NUMBER</category><category>C Program TO FIND OR COUNT TOTAL NUMBER OF PALINDROME IN A GIVEN STRING</category><category>C Program TO REPLACE A PARTICULAR WORD  BY ANOTHER WORD IN GIVEN STRING</category><category>C Program To Accept Floating Point Numbers  Print Average</category><category>C Program To Accept Floating Point Numbers  Print Average.</category><category>C Program To Accept and Add Ten Numbers Using Pointers</category><category>C Program To Convert Celsius Temperature To Fahrenheit.</category><category>C Program To Display The Days In A Week.</category><category>C Program To FIND POWER OF A NUMBER USING C PROGRAM</category><category>C Program To Find The Reverse Of A Number.</category><category>C Program To Find Transpose a 3 x 2 matrix</category><category>C Program To Insert An Element In An Array</category><category>C Program To Multiply Two Matrix</category><category>C Program To Print Size Of Commonly Used Data Types.</category><category>C Program To Print Sum Of Series 1 + 3 + 5 +.... N</category><category>C Program To Sort Numbers In Ascending Numbers.</category><category>C Program showing to short hand operator</category><category>C Program to Blink Charterers in C</category><category>C Program to Calculating a floating-point average using pointers</category><category>C Program to Check Whether Number is Perfect Or Not</category><category>C Program to Convert Decimal to Binary using Bitwise and operator | C Program to Convert to Decimal to binary</category><category>C Program to Convert Lowercase Letters to Upper Case</category><category>C Program to Convert an integer to words</category><category>C Program to Converting Degree to Radian | Degree to Radian conversion in C | Degree to Radian Changing in C language</category><category>C Program to Count the Number of Characters in given string by using /0</category><category>C Program to Displaying printable characters plus whitspace names</category><category>C Program to Fin Leap Year</category><category>C Program to Find prime numbers in an array using function</category><category>C Program to Generate a multiplication table using  IF  and for loops</category><category>C Program to Identify</category><category>C Program to Perform Arithmetic operations</category><category>C Program to Print Acsii Value of Given Number</category><category>C Program to Print Diamond in C</category><category>C Program to Print IP address of your computer</category><category>C Program to Print Memory Size of Variable</category><category>C Program to Print Value and address of an array elements</category><category>C Program to Printing on a printer Directly</category><category>C Program to Prove Memory allocation for Integer is 2 byte by using array Pointer</category><category>C Program to SORT A LIST OF n POSITIVE INTEGERS IN ASCENDING ORDER</category><category>C Program to Sort the numbers and store them in file using user define function</category><category>C Program to Summing reciprocals of given five values</category><category>C Program to TO REVERSE THE GIVEN STRING using Pointers</category><category>C Program to accept arithmetic operator</category><category>C Program to add two polynomials using array</category><category>C Program to allocate Run time Memory For variable in C</category><category>C Program to be terminated by pressing  X key</category><category>C Program to calculate Discount in Bill</category><category>C Program to calculate Electric Bill</category><category>C Program to calculate sum of array elements in C</category><category>C Program to change system date.</category><category>C Program to copy one file contents to another file</category><category>C Program to create Tower Of Hanoi</category><category>C Program to derive Table of reciprocals</category><category>C Program to do Subtraction matrix by using 2D (2 Dimensional) Array</category><category>C Program to draw SWASTIKA on center on the screen with blink effect | Blink Effect in C Language</category><category>C Program to evaluate the power series</category><category>C Program to find G.P. Series.</category><category>C Program to find absolute value</category><category>C Program to find area of circle</category><category>C Program to find frequency table</category><category>C Program to find out the given number is automorphic or not</category><category>C Program to find the biggest of the given numbers</category><category>C Program to find the sum of the cos series</category><category>C Program to find the sum of the sine series</category><category>C Program to find twin prime numbers</category><category>C Program to get nth term of Fibonacci series using recursion | Fibonacci series in C Language</category><category>C Program to identify user entered number</category><category>C Program to insert and delete a node from the binary search tree</category><category>C Program to interchange the values of two different strings  variable</category><category>C Program to left shift bitwise operator | bitwise operator in operator C Program</category><category>C Program to play wavefile | Play Audio File in C | Audio output in C Language</category><category>C Program to print ASCII value of given character</category><category>C Program to print Fibonacci numbers Series</category><category>C Program to print Number rhombus</category><category>C Program to print System date</category><category>C Program to print asterisk</category><category>C Program to print number of days in given Month  | Number of days in given month | Switch case Months Days Calculator</category><category>C Program to print or display lower triangular matrix</category><category>C Program to print pattern of stars and numbers | Printing pattern of Stars and Number Combination | pyramid in stars and numbers in C</category><category>C Program to print the multiplication table</category><category>C Program to print the triangle</category><category>C Program to print twice of number and three times of number using Function</category><category>C Program to reverse a given number | Reverse the given Number in C</category><category>C Program to reverse the given string</category><category>C Program to show SEQUENTIAL SEARCH</category><category>C Program to show Working of an array</category><category>C Program to show method of Insertion Sort</category><category>C Program to show recursive function in c with stack overheads massage</category><category>C Program to sort the marks of students in pre defined array</category><category>C Program to sort the name by length</category><category>C Program to swap memory address by using pointers</category><category>C Program to swap two numbers</category><category>C Program to write data in DMA Mode</category><category>C Program tp sort the marks of students given in pre defined Array</category><category>C Program trace path of Any WebSite</category><category>C Program using RECURSIVE FUNCTION TO FIND FACTORIAL OF A NUMBER</category><category>C Programming Interview Question | Tricky Interview Question In C Language | C Programming Confusing Interview Questions | C Language Various Questions for Viva</category><category>C Programming Memory Representation  arrays | Multidimensional Array Memory Representation</category><category>C assignment to convert Decimal to binary</category><category>C assignment to find frequency table</category><category>C code to print or display lower triangular matrix</category><category>C langauge macro</category><category>C program for area of equilateral triangle | Area of equilateral Triangle in C language</category><category>C program for cleardevice</category><category>C program for counting the number of characters and words in a given string</category><category>C program for searching a Node in List | Link List Searching in C</category><category>C program to check perfect number Or Not</category><category>C program to construct a pyramid of numbers</category><category>C program to convert Days into Year months</category><category>C program to convert a decimal number to binary number</category><category>C program to delete a node</category><category>C program to find inverse of a matrix</category><category>C program to find nCr using function | C Assignment to Find nCr in C Language</category><category>C program to find power of a large number</category><category>C program to find whether a number is prime or not.</category><category>C program to input 9 ELEMENTS AND PRINT THEM IN 3*3 MATRIX FORM</category><category>C program to print Armstrong numbers from 1 to 500</category><category>C program to print Pascal triangle using for loop</category><category>C program to print perfect numbers from 1 to 100</category><category>C program to print the Arrow pattern of star using loop</category><category>C program to print the pattern of Kite</category><category>C program to shutdown Ubuntu Linux Computer | turn off Ubuntu Linux PC From C Language</category><category>C program to shutdown Windows 7 PC | Shutdown windows 7 computer from C Language</category><category>C program using do…while loop to print the first m Fibonacci numbers</category><category>C projects</category><category>C++ Program to Find roots are imaginary</category><category>C++ Program to Reverse the given array values</category><category>C++ Program to find Sum of Given Digits</category><category>C++ Program to find given String is Palindrome or Not</category><category>C++ Program to find given number is Prime or Not</category><category>Calloc</category><category>Capital Letter</category><category>Captcha in C</category><category>Check the given number is armstrong number or not using c program</category><category>Concept of SCOPE OF VARIABLES in C</category><category>Consonant in C</category><category>Convert string to int without using library functions in c</category><category>Convert string to integer without using library functions in c</category><category>Converting Fraction to Decimal</category><category>Count characters c Program to count characters in given file</category><category>Creating captcha in C</category><category>Creating rhombus shape in C</category><category>DOS Command Line Arguments</category><category>Dangling pointer in C</category><category>Dangling pointer in C | Working with Dangling pointer | Dangling pointer Concept in C | Dangling pointer Examples in C | C Programming Dangling pointer</category><category>Defining a Union in C | Unions In C | Using Union in C Language</category><category>Diamond Shape in C Language</category><category>Different ways to initialize the array in C | initialize the array in C | Ways to initialize the array in C Language</category><category>Disk buffer data reading in C</category><category>Dynamic allocation of a 2D array | 2D Array Allocation Dynamically | Multi Dimension Array Dynamic Allocation</category><category>Dynamic memory allocation| Calloc</category><category>Error handling</category><category>Escape sequence</category><category>FAQ on Array</category><category>Fibonacci numbers Series</category><category>Find circumference of circle in C</category><category>Find out generic root of a number by c program</category><category>Find prime factors of a number using c program | C Program to Find Prime Factors of given Number | Prime factors of number using C</category><category>Float Number Average</category><category>Floyd's Triangle in C</category><category>Floyd’s Triangle printing using C.</category><category>Function d_addatbeg</category><category>GP Series in C</category><category>Getdate Function in C</category><category>Graphics In</category><category>How to make computer beep through C</category><category>Huge pointer in C | C language Huge Pointer | Huge Pointers in C Language  | Huge Pointers Working in C | Concept of Huge Pointer</category><category>INORDER</category><category>INTEROPERABILITY between FORTRAN  and C</category><category>Important Question On C Language Asked in Interview or Viva</category><category>In C Or C++ How to find the memory leakage in the Program or project project</category><category>Integer Memory 2 bytes</category><category>Java Programs</category><category>Macros in C | Working of Function and macro in C Programming</category><category>Malloc</category><category>Malloc in C Language | DMA</category><category>Memory Allocation By using MALLOC in C</category><category>Most c compilers Most widely used</category><category>Mouse Programming in C</category><category>Multidimensional Array in C</category><category>Multidimensional Arrays Table of 1 to 34 Numbers | Print Numbers in matrix format | Tabular Printing of numbers in C</category><category>Multilevel pointers in c programming | Pointers of Pointers | Pointers in Pointers in C |</category><category>Multiplication of 3x3 Matrix in C</category><category>NCR Factor using C</category><category>NCR and NPC in C</category><category>Null Pointer Assignment in C | Null Pointer concept in c</category><category>Number Patterns in C</category><category>OUTLET TEMP OF COMPRESSOR</category><category>One Dimensional</category><category>Overloading Program in C++</category><category>PDF</category><category>POSTORDER TRAVERSAL in C | Data structure example on Tree Operation in C</category><category>PREORDER</category><category>PUSHBOX Game in C | C Language Games | Fun in C Gaming</category><category>Palindrome</category><category>Palindrome Number in C</category><category>Pascal Triangle in C</category><category>Pascal triangle program in c language</category><category>Pointers FAQ</category><category>Pointers and Pointees in C | Difference between Pointers and Pointees in C | C language Pointers and Pointees concept</category><category>Position the file pointer in C | Moving File Pointer in C To Specific Location | fseek() Function Use Details | rewind() Function in C | Parameters of rewind</category><category>Pre Processing Calculation Example in C Language</category><category>Pre Processor Example in C</category><category>Pre defined array</category><category>Preprocessor in C | How C Preprocessor Works | Preprocessor  Concept in C | Examples on Preprocessor in C | Preprocessor Compiling Steps</category><category>Program for getting the disk status</category><category>Program on array manipulations using c</category><category>Program to Calculating interest C</category><category>Program to Check whether First number is divisible by second number or not</category><category>Program to Concatenation Two Strings In C</category><category>Program to Find HCF Using C Program</category><category>Program to Move car in C</category><category>Program to check given Number is palindrome or Not</category><category>Program to create a DIR Dos Command</category><category>Program to explain Concept of Storage of EXTERNAL REFERENCES of variable in C</category><category>Program to explain Concept of Storage of Variables in memory in c</category><category>Program to explain Working of Union in C</category><category>Program to generate Random numbers in c | Random Numbers in C | Random Numbers printing in C</category><category>Program to print letter S by using loops in C</category><category>Program to read 9 elements and print them in 3 x 3 matrix form using c Language</category><category>Program to show the use of static variables in C Language</category><category>Program to sort country names in C</category><category>Queue implementation on linked lists in C language</category><category>Quick Sort Program in C | Data Structure Quick Sort using C Program | Quick Sort Algorithm in C</category><category>Recursive  Function in C for addition of given two numbers</category><category>Removing spaces and punctuation from a string in C Language</category><category>Representation Of A Queue As An Array</category><category>Reverse the string in c</category><category>Scalar Product in C | C Assignments for Scalar</category><category>Setting pixel C Language</category><category>Setting the video mode in C Graphics</category><category>Shutdown Computers using C Program in Windows 7</category><category>Shutdown Windows XP PC From C | C language Code to Shutdown Windows XP Computer</category><category>Small Letter or Symbol</category><category>Small to capital Letters in C</category><category>Sorting Text file Using C Program</category><category>Special character</category><category>Standard C Library Functions in c programming language</category><category>Strassen algorithm C Program to Multiply matrix</category><category>Strassen algorithm Demo in C Programming Matrix Multiplication</category><category>Strassen algorithm in C Language</category><category>Sum of array</category><category>Switch Case Program to identify given character Vowels and Consonants in C</category><category>Switch case vowel and consonant</category><category>System date printing in C</category><category>Temprature in C</category><category>This is simple addition reader/parser for 2 doubles</category><category>To find greater number without using of Logical  relational Operators</category><category>Traceroot using C language</category><category>Tree Operations - INSERTION</category><category>Triangle pyramid of Numbers in C | C Program to Print Inverse Triangle of Numbers in C</category><category>Trigraph characters</category><category>Two dimensional Array Transpose of Matrix In C</category><category>Typecasting in C | Typecasting Example in C Language | Typecasting Examples in C</category><category>Unix shell script to get cpu usage</category><category>Unix shell script to kill a process by name</category><category>User Defined Functions</category><category>Virus C Program to Corrupt Internet Explorer</category><category>What is Circular Queues?</category><category>What is Doubly Linked Lists?</category><category>What is the difference between array and ordinary variable in C?</category><category>What would be the equivalent pointer expression for referring the array element a[i][j][k][l] ?</category><category>Whats is an array Implementation Of A Priority Queue</category><category>Working of REGISTER VARIABLES in C</category><category>Write a c program to find out transport of a matrix</category><category>Write a function that determines if a number is prime or not by using Reference</category><category>accept two numbers and perform given operation</category><category>adapter design pattern example in C++</category><category>adding two polynomials in C</category><category>algorithm Palindrome C</category><category>and fourth powers</category><category>arc graphics function in c | Drawing Arc in C</category><category>array Value and memory address</category><category>automorphic Numbers finding in C</category><category>c Memory allocation pointers</category><category>c Program to count characters in given file</category><category>c Program to print 1 to 100 without using loop</category><category>c assignment to find the sum of primary diagonal of a matrix</category><category>c program for arriving at a solution using bisection method</category><category>c program for character pattern | Printing Character pattern in C | Patterns of Chars in C | Pyramid of characters in C</category><category>c program to Analyze comma-separated list of words</category><category>c program to add n numbers | Addition of n Numbers in C | C assignments to add N numbers in C</category><category>c program to add two numbers without using addition operator</category><category>c program to check Looking for palindromes</category><category>c program to compare two files without using predefined Function</category><category>c program to count number of lines in a file</category><category>c program to create dos command DIR</category><category>c program to find out NCR factor of given number</category><category>c program to find out the sum of G.P series</category><category>c program to find the area of a right angled triangle | Program to Find Area of Right Angled Triangle in C langauge</category><category>c program to find the area of a trapezium</category><category>c program to find the volume and surface area of sphere | Program to find area of sphere in C language | C Language Volume of Sphere</category><category>c program to generate A random thought for the day</category><category>c program to print Floyd’s triangle</category><category>c program to print diamond pattern</category><category>c program to reverse a number | Reversing Number in C | C Assignment to reverse number</category><category>c program to sort given numbers in ascending order</category><category>c program to subtract two numbers without using subtraction operator</category><category>c program to swap two numbers using bitwise operators | Swap 2 numbers using Bitwise operator | Bit wise Operator Swap two numbers</category><category>c++  Program to Sort Array in ascending order</category><category>callmouse() Function in C</category><category>captcha program in c</category><category>cc</category><category>chdir function in c</category><category>creating a triangle in C</category><category>cubes</category><category>currency rate conversion Program by using pre-processor in C Language</category><category>currency rate conversion Program in C</category><category>decimal number to binary number Conversion in C</category><category>delay function in c</category><category>detect given string is palindrome or not</category><category>evaluate Prefix Expression in C | C Program to show evaluate Prefix Expression in C | evaluate Prefix Expression in C Example</category><category>fopen example in c</category><category>frequency table in C Language</category><category>fseek function in C</category><category>ftell Function in C | Get current position using FTELL Function | using ftell() function in c language</category><category>gettime() Function in C</category><category>given number palindrome or Not</category><category>how array works</category><category>http://www.blogger.com/img/blank.gif</category><category>insertion in Array</category><category>interchanging the values of string in C</category><category>inverse of a matrix  in C</category><category>length of given string Without using STRLEN function</category><category>length of string</category><category>matrix Program in C</category><category>memcpy Function Example in C</category><category>memory address of array</category><category>memory address showing</category><category>mousehide</category><category>mouseposi</category><category>ncr</category><category>palindrome Characters in a given string</category><category>pankaj hingade</category><category>pointers and recursion</category><category>power of series in C</category><category>program to delete an element from the array in C | C Language Program to delete element from array</category><category>program using stream iterator in C++</category><category>read an electric signal through sound card</category><category>reallocin C Language</category><category>reverse string</category><category>rhombus Shape in C</category><category>runtime variable creation in C</category><category>setposi Function in C</category><category>shutdown or turn off computer using C programming code for Windows XP</category><category>sort numbers in ascending order in C</category><category>sorting arrays</category><category>squares</category><category>srtin g reverse</category><category>star patterns</category><category>strategy pattern Program in Cpp</category><category>strategy pattern in c++</category><category>stream iterator in c++</category><category>swamping numbers</category><category>swap numbers using call by reference in C program</category><category>switch case arithmetic operaton</category><category>switch case vowels and consonants by using OR operator</category><category>traffic light program in c</category><category>traffic light simulation in C</category><category>transport of a matrix</category><category>triangle and square  | Area of circle in C | Area of triangle in C</category><category>twin Prime Numbers by using C language</category><category>two dimensional and 3-Dimensional Array Creation in C Language</category><category>use of fopen function in C</category><category>using binary minus operator Write a c program to find largest among three numbers</category><category>using binary minus operator find largest among three numbers in C</category><category>using chdir in c</category><category>vowels in C</category><category>weeks and leftover days</category><category>where the data value of the node to be deleted is known | DS Deleting Node Link List | Link List Program for node deletion</category><category>while loop without any Loop body</category><title>C Tutor... C Tutorial....</title><description>C tutorial, Biggest Collection of C &amp;amp; C++ Programs, Assignments and projects.
From Basic C Programs like if,for, while &amp;amp; arrays  to pointers, Link List,Data structure, Classes &amp;amp; Objects, File Management, inheritance,polymorphism &amp;amp; Many More Every Program will you find here..</description><link>http://lernc.blogspot.com/</link><managingEditor>noreply@blogger.com (Pop's World)</managingEditor><generator>Blogger</generator><openSearch:totalResults>1544</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>© Info Groups..</copyright><itunes:summary>C tutorial, Biggest Collection of C &amp;amp; C++ Programs, Assignments and projects. From Basic C Programs like if,for, while &amp;amp; arrays to pointers, Link List,Data structure, Classes &amp;amp; Objects, File Management, inheritance,polymorphism &amp;amp; Many More Every Program will you find here..</itunes:summary><itunes:subtitle>Life is Good</itunes:subtitle><itunes:category text="Education"><itunes:category text="Language Courses"/></itunes:category><itunes:author>pankaj a.h.</itunes:author><itunes:owner><itunes:email>noreply@blogger.com</itunes:email><itunes:name>pankaj a.h.</itunes:name></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-8773791591986093615</guid><pubDate>Mon, 02 Jun 2014 16:49:00 +0000</pubDate><atom:updated>2014-06-02T09:49:33.432-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to convert infix to postfix expression </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to convert infix to postfix expression&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;

&lt;pre name="code" class="Cpp"&gt;


#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
char infix[100],post[100];
int top=0,stack[10];
void push(int);
char pop();
void postfix();
main()
{
char ch;
clrscr();
printf("\n Infix Expression ");
gets(infix);
postfix();
getch();
}


void postfix()
{
int i=0,j=0;
for(i=0;infix[i]!='\0';i++)
{
switch(infix[i])
{
case '+': while(stack[top]&gt;=1)
                 post[j++]=pop();
                 push(1);
                 break;
case '-': while(stack[top]&gt;=1)
                post[j++]=pop();
                push(2);
                break;
case '*': while(stack[top]&gt;=3)
                post[j++]=pop();
                push(3);
                break;
case '/': while(stack[top]&gt;=3)
                post[j++]=pop();
                push(4);
                break;
case '^': while(stack[top]&gt;=4)
                post[j++]=pop();
                push(5);
                break;
case '(': push(0);
                break;
                top--;
                break;
default: post[j++]=infix[i];
}
while(top&gt;0)
post[j++]=pop();
printf("\n The postfix expression is %s\n",post);
}


void push(int element )
{
top++;
stack[top]=element;
}
char pop()
{
int ele;
char ex;
ele=stack[top];
top--;
switch(ele)
{
case 1: ex='+';
break
case 2: ex='-';
break;
case 3: ex='*';
break;
case 4: ex='/';
break;
case 5= ex='^';
break;
}
return ex;
}



&lt;/pre&gt;


&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2014/06/c-program-to-convert-infix-to-postfix.html</link><thr:total>2</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-139222569544268487</guid><pubDate>Mon, 02 Jun 2014 16:48:00 +0000</pubDate><atom:updated>2014-06-02T09:48:18.490-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to check whether a given matrix is symmetric or not </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to check whether a given matrix is symmetric or not&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;b&gt;A matrix is symmetric if its transpose is same as the matrix itself check the martix by using C Logic.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;

&lt;pre name="code" class="Cpp"&gt;


#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;

//write matrix
void write_mat(int a[][10],int n)
{
int i,j;
{
for(i=0;i&amp;lt;n;i++)
for(j=0;j&amp;lt;n;j++)
printf("%10d",a[i][j]);
printf("\n");
}
}

//read matrix
void read_mat(int a[][10],int n)
{
int i,j;
printf("Enter %d X %d matrix below:\n",n,n);
for(i=0;i&amp;lt;n;i++)
for(j=0;j&amp;lt;n;j++)
scanf("%d",&amp;a[i][j]);
}

//main function
void main()
{
int a[10][10],i,j,n;

//accept matrix
printf("Enter size of square matrix");
scanf("%d",&amp;n);
read_mat(a,n);

//check if the matrix is symmetric or not
for(i=0;i&amp;lt;n;i++)
for(j=i+1;j&amp;lt;n;j++)
if(a[i][j]!=a[j][i])
{
printf("Not symmetric");
return;
}
printf("Symmetric");
getch();
}



&lt;/pre&gt;


&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2014/06/c-program-to-check-whether-given-matrix.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1896824723924004002</guid><pubDate>Mon, 02 Jun 2014 16:45:00 +0000</pubDate><atom:updated>2014-06-02T09:45:23.835-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programs</category><title>Java Program to find nth term in a TRIBONACCI series</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
Java Program to find nth term in a TRIBONACCI series&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code" class="Cpp"&gt;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Tribonacci {

    /**
     * @param args
     */
    public static void main(String[] args) throws IOException {
        // TODO Auto-generated method stub
        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));
        System.out.println(" Enter the number ");
        int num = Integer.parseInt(reader.readLine());
        int first = 0, second = 1, third = 1, nthTerm = 0;
        int num1 = num;
        if (num == 1)
            nthTerm = 0;

        if (num == 2 || num == 3)
            nthTerm = 1;

        while (num &gt; 3) {
            nthTerm = first + second + third;
            // System.out.print(d +"\t");
            num--;
            first = second;
            second = third;
            third = nthTerm;
        }
        System.out.print(num1 + "th term of the Tribonacci is " + nthTerm);
    }
}



&lt;/pre&gt;


&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2014/06/java-program-to-find-nth-term-in.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-8238412483741014203</guid><pubDate>Mon, 02 Jun 2014 16:44:00 +0000</pubDate><atom:updated>2014-06-02T09:44:37.223-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to count the number of ones in a 32 bit number. </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to count the number of ones in a 32 bit number.&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;pre name="code" class="Cpp"&gt;
#include&lt;stdio.h&gt;

int bitcount(unsigned int n)
{
  int count=0;
  while(n)
  {
      count+=n&amp; 0x1u;
      n&gt;&gt;=1;
  }
  return count;
}

void main()
{
     unsigned int g;   int n;
    printf(" \n Enter the number : \n");
    scanf("%u",&amp;g);
    n=bitcount(g);
  printf("It has %d ones",n);
 }





&lt;/pre&gt;


&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2014/06/c-program-to-count-number-of-ones-in-32.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-460871163618650484</guid><pubDate>Thu, 05 Sep 2013 16:44:00 +0000</pubDate><atom:updated>2013-09-05T09:45:20.245-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to Print a Diamond shape using array</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to Print a Diamond shape using array&lt;/h2&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Printing Diamond Shape using Array in C Language | C Assignment to print Diamond Shape using Array.&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;main()

main()


{

int i,j;

char arr[5][5];


for(i=0;i&amp;gt;5;i++)

  { for(j=0;j&amp;gt;5;j++)

     {  
arr[i][j]=' ';

 
         }
           }


	arr[0][2]='*';

	arr[1][1]='*';

	arr[1][2]='*';

	arr[1][3]='*';

	arr[2][0]='*';

	arr[2][1]='*';

	arr[2][2]='*';

	arr[2][3]='*';

	arr[2][4]='*';

	arr[3][1]='*';

	arr[3][2]='*';

	arr[3][3]='*';

	arr[4][2]='*';



for(i=0;i&amp;gt;5;i++)

     {  cout&lt;&lt;endl;

        
for( j=0;j&amp;gt;5;j++)

	{   cout&amp;gt;&amp;gt;" ";

	    cout&amp;gt;&amp;gt;arr[i][j];

	     }

               }


	return 0;

}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/09/c-program-to-print-diamond-shape-using.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-4198836090193639021</guid><pubDate>Thu, 05 Sep 2013 16:36:00 +0000</pubDate><atom:updated>2013-09-05T09:36:01.990-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>c program to check value is prime no or not </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
c program to check value is prime no or not 

&lt;b&gt;C Language to Check Given Number Prime or Not | Fing Given Number Prime or Not&lt;/b&gt;
&lt;pre name="code" class="Cpp"&gt;
main()
{
   int n, c = 2;
 
   printf("Enter a number to check if it is prime\n");
   scanf("%d",&amp;n);
 
   for ( c = 2 ; c &lt;= n - 1 ; c++ )
   {
      if ( n%c == 0 )
      {
         printf("%d is not prime.\n", n);
     break;
      }
   }
   if ( c == n )
 {     printf("%d is prime.\n", n);
 }
getch();
}



&lt;/pre&gt;


&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/09/c-program-to-check-value-is-prime-no-or.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-2058786523669735769</guid><pubDate>Thu, 05 Sep 2013 16:32:00 +0000</pubDate><atom:updated>2013-09-05T09:32:20.057-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>c program to multiply exponent and base </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
c program to multiply exponent and base&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
main()
{
    int pow=1,x,y,i;
    printf("Enter base &amp;amp; exponent:\t");
    scanf("%d%d",&amp;amp;x,&amp;amp;y);
     for(i=1;i&amp;lt;=y;i++)
    {
pow=pow*x;
}
printf("power :%d ",pow);
getch();
}



&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/09/c-program-to-multiply-exponent-and-base.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1682065493743847569</guid><pubDate>Sun, 03 Mar 2013 17:01:00 +0000</pubDate><atom:updated>2013-03-03T09:01:19.689-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to Calculate whether entered year is leap year or not</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to Calculate whether entered year is leap year or not&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;
main()
{
int year;
clrscr();
printf("\n enter the year");
scanf("%d",&amp;year);
if(year%4==0 &amp;&amp; year%100!=0)//(year%400==0)
printf("\n%d is a leap year \n");
else
printf("\n enter year is not leap year\n");
getch();
}
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/c-program-to-calculate-whether-entered.html</link><thr:total>4</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1161483051455799080</guid><pubDate>Sun, 03 Mar 2013 17:00:00 +0000</pubDate><atom:updated>2013-03-03T09:00:24.586-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C  Program to Check whether number is positive, negative, even or odd </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C&amp;nbsp; Program to Check whether number is positive, negative, even or odd&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
int n;
clrscr();
printf("enter the no");
scanf("%d",&amp;n);
if(n&gt;0)
{
printf("\nnumber is +ve");
if(n%2==0)
printf("\n number is even");
else
printf("\n number is odd");
}
if(n&lt;0)
printf("\n number is -ve");
getch();
}

&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/c-program-to-check-whether-number-is_3.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-236861626783124285</guid><pubDate>Sun, 03 Mar 2013 16:59:00 +0000</pubDate><atom:updated>2013-03-03T08:59:30.825-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to calculate power of number </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to calculate power of number &lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
float x,power=1,i;
int y;
clrscr();
printf("enter the base and power values ");
scanf("%f%d",&amp;x,&amp;y);
for(i=1;i&lt;=y;i++)
power*=x;
printf("\n%f raised to %d is %f",x,y,power);
getch();
}


&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/c-program-to-calculate-power-of-number.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-4603481006482805916</guid><pubDate>Sun, 03 Mar 2013 16:57:00 +0000</pubDate><atom:updated>2013-03-03T08:57:24.565-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program To check whether number is armstrong or not </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program To check whether number is armstrong or not&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;
main()
{
int n,tot=0,tmp,d;
clrscr();
printf("\n enter the number");
scanf("%d",&amp;n);
tmp=n;
while(n&gt;0)
{
d=n%10;
tot=(d*d*d)+tot;
n=n/10;
}
if(tmp==tot)
printf("\n enter number is armstrong");
else
printf("enter number is not armstrong");
getch();
}
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/c-program-to-check-whether-number-is.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-7878326529614341802</guid><pubDate>Sun, 03 Mar 2013 16:34:00 +0000</pubDate><atom:updated>2013-03-03T08:34:39.248-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title> Check whether number is positive, negative, even or odd </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
&amp;nbsp;Check whether number is positive, negative, even or odd&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
int n;
clrscr();
printf("enter the no");
scanf("%d",&amp;n);
if(n&gt;0)
{
printf("\nnumber is +ve");
if(n%2==0)
printf("\n number is even");
else
printf("\n number is odd");
}
if(n&lt;0)
printf("\n number is -ve");
getch();
}
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/check-whether-number-is-positive.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-5711732949303532983</guid><pubDate>Sun, 03 Mar 2013 16:34:00 +0000</pubDate><atom:updated>2013-03-03T08:34:05.127-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to caluclate power of number </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to caluclate power of number&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
float x,power=1,i;
int y;
clrscr();
printf("enter the base and power ");
scanf("%f%d",&amp;x,&amp;y);
for(i=1;i&lt;=y;i++)
power*=x;
printf("\n%f raised to %d is %f",x,y,power);
getch();
}
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2013/03/c-program-to-caluclate-power-of-number.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-2460274312842667551</guid><pubDate>Tue, 11 Dec 2012 17:10:00 +0000</pubDate><atom:updated>2012-12-11T09:10:54.910-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Data Structure in C</category><title>C program for Binary search operations</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C program for Binary search operations&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
#define MAX_LEN 10

/* Non-Recursive function*/
void b_search_nonrecursive(int l[],int num,int ele)
{
int l1,i,j, flag = 0;
l1 = 0;
i = num-1;
while(l1 &lt;= i)
{
j = (l1+i)/2;
if( l[j] == ele)
{
printf("\nThe element %d is present at position %d in list\n",ele,j);
flag =1;
break;
}
else
if(l[j] &lt; ele)
l1 = j+1;
else
i = j-1;
}
if( flag == 0)
printf("\nThe element %d is not present in the list\n",ele);
}

/* Recursive function*/
int b_search_recursive(int l[],int arrayStart,int arrayEnd,int a)
{
int m,pos;
if (arrayStart&lt;=arrayEnd)
{
m=(arrayStart+arrayEnd)/2;
if (l[m]==a)
return m;
else if (a return b_search_recursive(l,arrayStart,m-1,a);
else
return b_search_recursive(l,m+1,arrayEnd,a);
}
return -1;
}

void read_list(int l[],int n)
{
int i;
printf("\nEnter the elements:\n");
for(i=0;i scanf("%d",&amp;l[i]);
}

void print_list(int l[],int n)
{
int i;
for(i=0;i printf("%d\t",l[i]);
}

/*main function*/
void main()
{
int l[MAX_LEN], num, ele,f,l1,a;
int ch,pos;

clrscr();
printf("\n\t\t\tMENU");
printf("\n=====================================================");
printf("\n[1] Binary Search using Recursion method");
printf("\n[2] Binary Search using Non-Recursion method");
printf("\n\nEnter your Choice:");
scanf("%d",&amp;ch);

if(ch&lt;=2 &amp; ch&gt;0)
{
printf("\nEnter the number of elements : ");
scanf("%d",&amp;num);
read_list(l,num);
printf("\nElements present in the list are:\n\n");
print_list(l,num);
printf("\n\nEnter the element you want to search:\n\n");
scanf("%d",&amp;ele);


switch(ch)
{
case 1:printf("\nRecursive method:\n");
pos=b_search_recursive(l,0,num,ele);
if(pos==-1)
{
printf("Element is not found");
}
else
{
printf("Element is found at %d position",pos);
}
getch();
break;

case 2:printf("\nNon-Recursive method:\n");
b_search_nonrecursive(l,num,ele);
getch();
break;
}
}
getch();
}

&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/12/c-program-for-binary-search-operations.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-5697835669610134128</guid><pubDate>Tue, 11 Dec 2012 17:08:00 +0000</pubDate><atom:updated>2012-12-11T09:08:50.785-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to print Pascal Traingle</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to print Pascal Traingle&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
void main()
{
int num,x,y,a[50][50];
clrscr();
fflush(stdin);

printf("Enter the number of rows: ");
scanf("%d",&amp;num);

printf("\n\t\t Pascal's Triangle of Order %d\n\n",num);

for(x=0;x{
for(y=0;y&lt;=x;y++)
{
if(x==y || y==0)
a[x][y]=1;
else
a[x][y]=a[x-1][y-1]+a[x-1][y];
printf("%4d",a[x][y]);
}
printf("\n\n");
}

getch();
}


&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/12/c-program-to-print-pascal-traingle.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-3984866497026613985</guid><pubDate>Tue, 11 Dec 2012 16:58:00 +0000</pubDate><atom:updated>2012-12-11T08:58:58.876-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VHDL Programs</category><title>VHDL multiplexer using case statements</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
VHDL multiplexer using case statements&lt;/h2&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;pre class="Cpp" name="code"&gt;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity multiplexer4_1 is
port (
      i0 : in std_logic;
      i1 : in std_logic;
      i2 : in std_logic;
      i3 : in std_logic;
     sel : in std_logic_vector(1 downto 0);
     bitout : out std_logic
     );
end multiplexer4_1;

architecture Behavioral of multiplexer4_1 is
begin

process(i0,i1,i2,i3,sel)
begin
case sel is
  when "00" =&gt; bitout &lt;= i0;
  when "01" =&gt; bitout &lt;= i1;
  when "10" =&gt; bitout &lt;= i2;
  when others =&gt; bitout &lt;= i3;
end case;
end process;

end Behavioral;

The testbench code used for testing the code is given below:

  LIBRARY ieee;
  USE ieee.std_logic_1164.ALL;

  ENTITY testbench IS
  END testbench;

  ARCHITECTURE behavior OF testbench IS
          SIGNAL i0,i1,i2,i3,bitout :  std_logic:='0';
          SIGNAL sel :  std_logic_vector(1 downto 0):="00";
  BEGIN
    UUT : entity work.multiplexer4_1 port map(i0,i1,i2,i3,sel,bitout);

     tb : PROCESS
     BEGIN
            i0&lt;='1';
            i1&lt;='0';
            i2&lt;='1';
            i3&lt;='0';
            sel &lt;="00";
            wait for 2 ns;
            sel &lt;="01";
            wait for 2 ns;
            sel &lt;="10";
             wait for 2 ns;
             sel &lt;="11";
              wait for 2 ns;
            --more input combinations can be given here.
     END PROCESS tb;

  END;

&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/12/vhdl-multiplexer-using-case-statements.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-8624560156355408752</guid><pubDate>Tue, 11 Dec 2012 16:57:00 +0000</pubDate><atom:updated>2012-12-11T08:57:05.328-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Projects In C</category><title>Railway Reservation System Project In C</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
Railway Reservation System Project In C&lt;/h2&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;pre class="Cpp" name="code"&gt;
#include conio.h
#include stdio.h
#include graphics.h
#include stdlib.h
#include dos.h
#include string.h
#include math.h

/***************Global Variable Declarations****************/

union REGS i,o;
int xmax,ymax;
int gdriver = DETECT, gmode, errorcode,x,y;
int count=0,no_pass=0;
FILE *ptr1;
char d[8][3]={{"S1"},{"S2"},{"S3"},{"S4"},{"S5"},{"S6"},{"S7"},{"S8"}};
char x1[2];

/****************************Global Structures declared**********/

struct travel
{
char tno[5];
//char doj[10];
int d1,m1,y1;
char from[4];
char to[4];
char passen[6][20];
char sex[6][2];
char age[6][3];
int seat_no[6];
char coano[3];
   // float pnr;
long int pnr;
float bill;
}passenger;
struct
{
// float pnr;
long int pnr;
}pass;
struct
{
int seat_no;
char coano[3];
char status[1];
}berth;

struct
{
char tno[5];
char tname[20];
}train;


/***********************User Defined Functions***********/

void firstscreen();
void mainmenu();
void reserv();
void clear();
void setgraph();
void clearline();
void drawbox();
void cancel();
void enquiry();
void color(int,int,int);
void printtic(struct travel);

/*****************Main Function*****************************/
void main()
{
int i;
FILE *ptr,*tr;
/***********loop for writing train nos***************/
if((tr=fopen("tra.dat","r"))==NULL)
{
tr=fopen("tra.dat","w");
strcpy(train.tno,"3143");
strcpy(train.tname,"Darjeeling Mail");
fwrite(&amp;train,sizeof(train),1,tr);
strcpy(train.tno,"3147");
strcpy(train.tname,"Uttarbanga Exp");
fwrite(&amp;train,sizeof(train),1,tr);
fclose(tr);
}

/************loop for writing train berth nos*********/
if((ptr=fopen("berths3.dat","r"))==NULL)
{
   ptr=fopen("berths3.dat","wb");
   strcpy(berth.coano,d[0]);
   strcpy(berth.status,"V");
   for(i=1;i&lt;=73;i++)
   {
  if(i&gt;72)
  {
count++;
strcpy(berth.coano,d[count]);
i=1;
  }
  if(count==8)
  break;
  berth.seat_no=i;
  fwrite(&amp;berth,sizeof(berth),1,ptr);

   }
}
fclose(ptr);
if((ptr=fopen("berths7.dat","r"))==NULL)
{
   ptr=fopen("berths7.dat","wb");
   strcpy(berth.coano,d[0]);
   strcpy(berth.status,"V");
   for(i=1;i&lt;=73;i++)
   {
  if(i&gt;72)
  {
count++;
strcpy(berth.coano,d[count]);
i=1;
  }
  if(count==8)
  break;
  berth.seat_no=i;
  fwrite(&amp;berth,sizeof(berth),1,ptr);

   }
     }
     fclose(ptr);
textcolor(WHITE);
textbackground(BLACK);
clrscr();
firstscreen();
mainmenu();
reserv();
cancel();

getch();
}
void firstscreen()
{
int r,c;
for(r=4;r&lt;=20;r++)
{
gotoxy(20,r);
printf("*");
gotoxy(60,r);
printf("*");
}
for(c=20;c&lt;60;c++)
{
gotoxy(c,4);
printf("*");
gotoxy(c,20);
printf("*");
}

gotoxy(36,6);
textattr(LIGHTRED);
cprintf("PROJECT");

gotoxy(39,8);
textcolor(BLUE);
cprintf("ON");

gotoxy(32,10);
textcolor(BROWN);
cprintf("Railway Reservation");

gotoxy(25,13);
textcolor(YELLOW);
putch(1);

textcolor(CYAN);
cprintf(" DEVELOPERS : ");


gotoxy(25,17);
textcolor(YELLOW);
putch(2);

textcolor(CYAN);
cprintf("RRP");
textcolor(CYAN);
cprintf("popsys");
gotoxy(28,23); textcolor(MAGENTA + BLINK);
cprintf("Press a key to continue");
getch();
}

void mainmenu()
{
char choice;
setgraph();
settextjustify(CENTER_TEXT, CENTER_TEXT);
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
outtextxy(xmax,45,"Railway Reservation");
/* draw a rectangle */
rectangle(100,150,500,350);
gotoxy(17,12);
printf("1. For reservation press  1
");
gotoxy(17,14);
printf("2. For cancellation press 2
");
gotoxy(17,16);
printf("3. For enquiry press 3
");
gotoxy(17,18);
printf("4. For closing the program press 4
");
gotoxy(48,25);
printf("Created by SOFTECH SOLUTIONS Ltd.");
gotoxy(20,20);
printf("Choice : ");
scanf("%d",&amp;choice);
switch(choice)
{
case 1:
reserv();
break;
case 2:
closegraph();
clrscr();
cancel();
break;
case 3:
closegraph();
enquiry();
break;
case 4:
exit(1);
default:
gotoxy(29,20);
printf("Not a valid choice");
getch();
main();
}
}
int pass_name(int i,int x, int y)
{
int flag,pos;
do
{
flag=1;
gotoxy(x,y);
fflush(stdin);
gets(passenger.passen[i]);
fflush(stdin);
strupr(passenger.passen[i]);
if (strlen(passenger.passen[i]) == 0)
{
if(i&gt;0)
{
return(7);
}
gotoxy(10,24);
printf("aPassenger Name should not be left BLANK");
flag=0;
//i--;
getch();
clearline(24);
}
else if (strlen(passenger.passen[i]) &gt;20)
{
//gotoxy(10,20);
gotoxy(10,24);
printf("aPassenger Name must be less than 20 characters");
flag=0;
getch();
clearline(24);
}
}while(flag==0);
gotoxy(x,y);
puts(passenger.passen[i]);
i++;
return(i);
}
int pass_sex(int j,int x,int y)
{
int flag,i;
char ch[1][1];
do
{
flag=1;
gotoxy(x,y);
fflush(stdin);
gets(passenger.sex[j]);
fflush(stdin);
strupr(passenger.sex[j]);
if (strlen(passenger.sex[j]) == 0)
{
gotoxy(10,24);
printf("aSex should not be left BLANK");
flag=0;
getch();
clearline(24);
}
else if(strlen(passenger.sex[j])!=1)
{
gotoxy(10,24);
printf("aPassenger's Sex must be 1 characters long");
flag=0;
getch();
clearline(24);
}
}while (flag==0);
gotoxy(x,y);
puts(passenger.sex[j]);
j++;
return(j);
}

int pass_age(int k,int x,int y)
{
int flag,i,j;
do
{
flag=1;
gotoxy(x,y);
if(flag==1)
no_pass++;
gets(passenger.age[k]);
fflush(stdin);
strupr(passenger.age[k]);
if (strlen(passenger.age[k]) == 0)
{
gotoxy(10,24);
printf("aPassenger's Age should not be left BLANK");
flag=0;
getch();
clearline(24);
}
else if (strlen(passenger.age[k])!=2)
{
gotoxy(10,24);
printf("aPassenger's Age must be equal to 2 characters");
flag=0;
// k--;
getch();
clearline(24);
}
else if(strcmp(passenger.age[k],"00")==0)
{
gotoxy(10,24);
printf("aPassenger's Age cannot be less than 1 year");
flag=0;
getch();
clearline(24);
}
for(i=k;i
{
for(j=0;j&lt;2;j++)
{
if(!isdigit(passenger.age[i][j]))
{
gotoxy(10,24);
printf("aEnter a valid age");
flag=0;
getch();
clearline(24);
}
}
}
}while (flag==0);
gotoxy(x,y);
k++;
puts(passenger.age[k]);
return(k);
}

showmouseptr()
{
i.x.ax=1;
int86(0x33,&amp;i,&amp;o);
}
int restrictmouseptr(int x1,int y1,int x2,int y2)
{
i.x.ax=7;
i.x.cx=x1;
i.x.dx=x2;
int86(0x33,&amp;i,&amp;o);

i.x.ax=8;
i.x.cx=y1;
i.x.dx=y2;
int86(0x33,&amp;i,&amp;o);
}

void clear()
{
int i,j;
for(i=0;i&lt;=80;i++)
{
for(j=0;j&lt;=25;j++)
{
printf("%c",' ');
gotoxy(i,j);
}
}
gotoxy(1,1);
}
void setgraph()
{

clrscr();

/* initialize graphics and local variables */
initgraph(&amp;gdriver, &amp;gmode, "c:\tc\bgi");

/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
  printf("Graphics error: %s
", grapherrormsg(errorcode));
  printf("Press any key to halt:");
  getch();
  exit(1);
}

xmax = getmaxx()/2;
ymax = getmaxy()/2;
}
void clearline(int yco)
{
int i,j;
gotoxy(5,yco);
for(i=0;i&lt;70;i++)
{
printf("%c",' ');
}
}
void drawbox()
{
int xr,xc;
int la,ra;
gotoxy(0,0);
for(xr=1;xr&lt;=80;xr++)
printf("Ä");
xc=2;
for(la=1;la&lt;=23;la++)
{
gotoxy(1,xc);
printf("³");
gotoxy(80,xc);
printf("³");
xc++;
}
gotoxy(0,25);
for(xr=1;xr&lt;80;xr++)
printf("Ä");
gotoxy(1,1);
printf("Ú");
gotoxy(80,24);
printf("³");
}


void reserv()
{
int i,flag,j,k,test,found,set_no,count1=0,year;
struct date d;
float pnrno;
char tno[3],ans;
char a[1],c,age[3],ch;
char *p;
FILE *ptr,*pno,*tr;
closegraph();
highvideo();
//Design Part
clear();
drawbox();
gotoxy(3,2);
for(i=0;i&lt;74;i++)
printf("Ä");

j=3;
for(i=0;i&lt;4;i++)
{
gotoxy(3,j);
printf("³");

gotoxy(77,j);
printf("³");
j++;
}
gotoxy(3,6);
for(i=0;i&lt;75;i++)
printf("Ä");
gotoxy(6,2);
printf(" Journey Details ");
color(15,18,3);
gotoxy(5,3);
printf("Train No : ");
color(32,46,3);
gotoxy(20,3);
printf("Train Name :");
color(67,68,3);
color(71,72,3);
color(75,76,3);
gotoxy(49,3);
printf("Date of Booking :");
gotoxy(67,3);
getdate(&amp;d);
printf("%d",d.da_day);
gotoxy(69,3);
putch('-');
gotoxy(71,3);
printf("%d",d.da_mon);
putch(' -');
printf("%d",d.da_year);
color(12,14,5);
gotoxy(5,5);
printf("From :");
color(27,29,5);
gotoxy(20,5);
printf("To :");
color(67,68,5);
color(71,72,5);
color(75,76,5);
gotoxy(49,5);
printf("Date Of Journey :");
gotoxy(3,8);
for(i=0;i&lt;=74;i++)
printf("Ä");
gotoxy(7,8);
printf("Passenger Details");
j=9;
for(i=0;i&lt;14;i++)
{
gotoxy(3,j);
printf("³");

gotoxy(77,j);
printf("³");
j++;
}
gotoxy(3,23);
printf(" ");
gotoxy(3,23);
for(i=0;i&lt;74;i++)
printf("Ä");
gotoxy(4,10);
for(i=0;i&lt;73;i++)
printf("Ä");
color(8,31,11);
gotoxy(22,9);
printf("NAME");

gotoxy(46,9);
printf("SEX");
gotoxy(53,9);
printf("AGE");
gotoxy(65,9);
printf("REMARKS");
j=9;
for(i=0;i&lt;14;i++)
{
gotoxy(44,j);
printf("³");

gotoxy(51,j);
printf("³");

gotoxy(58,j);
printf("³");
j++;
}

for(i=0;i&lt;6;i++)
{
color(5,38,(11+i));
color(46,48,(11+i));
color(53,56,(11+i));
color(5,38,(16+i));
color(46,48,(16+i));
color(53,56,(16+i));
}

//User input part
gotoxy(15,3);
do
{
int len;
fflush(stdin);
//name input
gets(passenger.tno);
if(len=(strlen(passenger.tno))!=4)
{
gotoxy(10,24);
printf("Train No Must be 4 digits long");
getch();
clearline(24); //clears the line
gotoxy(15,3);
}
tr=fopen("tra.dat","r");
fread(&amp;train,sizeof(train),1,tr);
while(!feof(tr))
{
if((strcmp(passenger.tno,train.tno))==0)
{
found=0;
flag=0;
break;
}
else
found=2;
fread(&amp;train,sizeof(train),1,tr);
}
if(found==2)
{
gotoxy(8,24);
printf("This Train No does not exist");
getch();
clearline(24);
gotoxy(15,3);
flag=1;
}
}while(strlen(passenger.tno)!=4||flag==1);
if(found==0)
{
gotoxy(32,3);
puts(train.tname);
found=1;
}

fflush(stdin);
do
{
flag=1;
gotoxy(12,5);
fflush(stdin);
scanf("%[^
]",passenger.from);
fflush(stdin);
strupr(passenger.from);
if (strlen(passenger.from) == 0)
{
gotoxy(10,24);
printf("aFrom field should not be left BLANK");
flag=0;
getch();
clearline(24);
}
else if (strlen(passenger.from) != 3)
{
gotoxy(10,24);
printf("aFrom should be equal to 3 characters");
flag=0;
getch();
clearline(24);
}
for(i=0;i&lt;3;i++)
{
ch=passenger.from[i];
if(isdigit(ch))
{
gotoxy(10,24);
printf("aEnter a valid Boarding Place");
flag=0;
getch();
clearline(24);
break;
}
}
}while (flag==0);
gotoxy(12,5);
puts(passenger.from);

do
{
flag=1;
gotoxy(27,5);
fflush(stdin);
scanf("%[^
]",passenger.to);
fflush(stdin);
strupr(passenger.to);
if (strlen(passenger.to) == 0)
{
gotoxy(10,24);
printf("aTo field should not be left BLANK");
flag=0;
getch();
clearline(24);
}
else if (strlen(passenger.to) != 3)
{
gotoxy(10,24);
printf("aTo should be equal to 3 characters");
flag=0;
getch();
clearline(24);
}
for(i=0;i&lt;3;i++)
{
ch=passenger.to[i];
if(isdigit(ch))
{
gotoxy(10,24);
printf("aEnter a valid Destination Place");
flag=0;
getch();
clearline(24);
break;
}
}
}while (flag==0);
gotoxy(27,5);
puts(passenger.to);
i=j=k=0;

gotoxy(67,5);
while(c!=13)
{
   fflush(stdin);
   c=getch();
   if((c&lt;'0'||c&gt;'9')&amp;&amp;c!=13&amp;&amp;c!=8)
   {
if(c==27)
 return;
gotoxy(5,24);
printf("Please Enter Valid Date.");
getch();
gotoxy(67,5);
printf("  ");
gotoxy(5,24);
clearline(24);
gotoxy(67,5);
count1=0;
c='a';
   }
   else if(c==8)
   {
  if(wherex()&gt;69)
  {
 gotoxy(wherex()-1,15);
 putch(' ');
 count1--;
 gotoxy(wherex()-1,15);
  }
   }
   else if(c!=13)
   {
  if(wherex()&lt;69)
  {
 putch(c);
 age[count1]=c;
 count1++;
  }
  else
  {
 gotoxy(5,24);
 printf("Date Can Be Only 2 Digits.");
 getch();
 clearline(24);
 gotoxy(67,5);
  }
   }
else
{
age[count1]='


&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/12/railway-reservation-system-project-in-c.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-222624022745584758</guid><pubDate>Mon, 19 Nov 2012 03:10:00 +0000</pubDate><atom:updated>2012-11-18T19:10:37.206-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to read text File on Disk using FREAD function </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to read text File on Disk using FREAD function&amp;nbsp;&lt;/h2&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Its Basic C Program to read any text from disk using FRead Function which belongs to stdio.h, using this function with file pointers you can read the TEXT contents of any file.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main()
{
    int cur_char;
    FILE *out_file;

    out_file = fopen("test.txt", "w");
    if (out_file == NULL) {
        fprintf(stderr,"Can not open output file\n");
        exit (8);
    }

    for (cur_char = 0; cur_char &lt; 128; ++cur_char) {
        fputc(cur_char, out_file);
    }
    fclose(out_file);
    return (0);
}



&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-to-read-text-file-on-disk.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-3096246356110768664</guid><pubDate>Thu, 15 Nov 2012 10:14:00 +0000</pubDate><atom:updated>2012-11-15T02:14:59.480-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program accept 10 values and sort them</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program accept 10 values and sort them&lt;/h2&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;br /&gt;&lt;/h2&gt;&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
 void main()
 {
  int num[10],i,j,temp;
  clrscr();
  printf("\n Enter 10 values of an array...........\n");
  for(i=0;i&amp;lt;10;i++)
   scanf("%d",&amp;num[i]);

 printf("\n array before sort .........\n");
  for(i=0;i&amp;lt;10;i++)
   printf("%d\t",num[i]);

 for(i=0;i&amp;lt;9;i++)
 {
  for(j=i+1;j&amp;lt;10;j++)
  {
   if(num[i]&amp;lt;num[j])
   {
    temp=num[i];
    num[i]=num[j];
    num[j]=temp;
   }
  }
 }

 printf("\n array after sort .........\n");
  for(i=0;i&amp;lt;10;i++)
   printf("%d\t",num[i]);

   getch();
  }



&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-accept-10-values-and-sort-them.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-5028307953035993373</guid><pubDate>Thu, 15 Nov 2012 10:09:00 +0000</pubDate><atom:updated>2012-11-15T02:09:36.092-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to find Sum of Series using Function</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to find Sum of Series using Function&lt;/h2&gt;
&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
long int sum_sqr(int);
main()
 {
  int n;
  clrscr();
  printf("\n Enter any number : ");
  scanf("%d",&amp;n);
  printf("\n Sum of Series is %ld",sum_sqr(n));
  printf("\n\n Press any key to exit. . .");
  getch();
}

 long int sum_sqr(int m)
 {
  if(m&lt;=1)
   return 1;
  else
   return (m*m+sum_sqr(m-1));
  }
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-to-find-sum-of-series-using.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-859994724288053816</guid><pubDate>Thu, 15 Nov 2012 10:02:00 +0000</pubDate><atom:updated>2012-11-15T02:02:51.992-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to calculate Sum and Average of Marks and validate also</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to calculate Sum and Average of Marks and validate also&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
main()
{
 int m[5],i,sum=0,avg;
 clrscr();
 printf("Enter the marks of five subjects=");
 for(i=0;i&lt;=4;i++)
 {
  scanf("%d",&amp;m[i]);
 }
 for(i=0;i&lt;=4;i++)
 {
  if(m[i]&gt;100)
  {
   printf("Invalid\n");
   break;
  }
  else
  {
   sum=sum+m[i];
  }
 }
 printf("Sum=%d\n",sum);
 avg=sum/5;
 printf("Avg=%d",avg);
 getch();
}

&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-to-calculate-sum-and-average.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1118319552524276253</guid><pubDate>Sun, 04 Nov 2012 15:32:00 +0000</pubDate><atom:updated>2012-11-04T07:32:38.869-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C While Loop Program to show Difference Between Pre-Increment  and Post-Increment </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2&gt;
C While Loop Program to show Difference Between Pre-Increment &amp;nbsp;and Post-Increment&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;

#include&lt;stdio.h&gt;

 int main(void) {
  int i;
 
  i = 0;
  while(i++ &lt; 5) {
   printf("%d\n", i);
  }
  printf("\n");
  i = 0;
  while(++i &lt; 5) {
   printf("%d\n", i);
  }
  return 0;
 }


&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-while-loop-program-to-show-difference.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-207928829536896371</guid><pubDate>Sun, 04 Nov 2012 15:30:00 +0000</pubDate><atom:updated>2012-11-04T07:30:50.824-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to show Example of While .. Continue</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to show Example of While .. Continue&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;

 int main()
 {
  int i;

  i = 0;
       while ( i &lt; 20 )
       {
            i++;
            
            printf(" to see\n");
continue;
printf("Nothing to see\n");
       }
       return 0;
 }

&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-to-show-example-of-while.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1220210415575856864</guid><pubDate>Sun, 04 Nov 2012 15:27:00 +0000</pubDate><atom:updated>2012-11-04T07:27:55.690-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to print 1 to 10 Numbers using While and Break </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to print 1 to 10 Numbers using While and Break&lt;/h2&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;#include&lt;stdio .h=".h"&gt;

 int main()
 {
       int i;

  i = 0;
  while ( i &amp;lt; 20 )
       {
            i++;
            if ( i == 10)
                 break;
       }
       return 0;
 }

&lt;/stdio&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/11/c-program-to-print-1-to-10-numbers.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7092135066960371093.post-1346741995769791757</guid><pubDate>Mon, 29 Oct 2012 02:48:00 +0000</pubDate><atom:updated>2012-10-28T19:48:20.248-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Assignments</category><title>C Program to Print Number Pattern</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 style="text-align: left;"&gt;
C Program to Print Number Pattern&lt;/h2&gt;
&lt;br /&gt;
&lt;b&gt;Triangle of Numbers in C, C Program to print Number RightAngle, Pattern of Number in C&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;b&gt;1&lt;br /&gt;
2 3&lt;br /&gt;
4 5 6&lt;br /&gt;
7 8 9 10&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
int i,j,n,a=1;
clrscr();
printf("enter the range\n");
scanf("%d",&amp;n);
for(i=1;i&amp;lt;=n;i++)
{
for(j=1;j&amp;lt;=i;j++)
{
printf("%d ",a);
a=a+1;
}
printf("\n");
}
getch();
}


&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;Thanks Friends For Visiting..!&lt;/div&gt;</description><link>http://lernc.blogspot.com/2012/10/c-program-to-print-number-pattern.html</link><thr:total>0</thr:total><author>noreply@blogger.com (pankaj a.h.)</author></item></channel></rss>