-->

input and output programs



Here are some programs with solution. The solution is also provided with  explanation such that you can understand  it easily.
Before you go for program, ensure yourself that you have sufficient knowledge about theory. If not then you can go to tutorial section of C.
                            First you try yourself and if you could not then you can click "show the solution".button.
You can put comment if any problem arises or if you want to go for theory then you can go to
  tutorial section of "C".
 You can get solution of programs given in books of different national and international authors.
                   Following are some programs related to input and output functions

P1)Write a program to get area of circle(.area=pi*r2)
                                                                                solution  
                                                                     
P2)Write a program to get area and perimeter of rectangle.
                                                                                 solution                                                                           

P3)Write a program to get volume of sphere.
                                                                               solution

P4)Write a program to get area of triangle.(1/2*b*h)
                                                                                solution
                                                                                                                         
P5)Write a program to get value of s=ut+1/2*at2. Here symbols have as usual meaning.

                                                                                solution
P6)Write a program to get value of v2=u2+2as.
                                                                             
                                                                               solution
P7) Write a program to get simple interest and amount. (I=PTR/100, A=P+I)

                                                                                solution

P8)Write a program to get area of parallelogram.(b*h).

                                                                                solution
P9)Write a program to get area of square.(b*b).

                                                                                solution

P10)Write a program to get perimeter and area of triangle.(perimeter=a+b+c)

                                                                                solution
P11)Write a program to convert paisa to rupees.(1Rs=100paisa)

                                                                                solution

P12)Write a program to convert kilometer to meter. (1km=1000meter).

                                                                                solution

P13)Write a program to input a single character (may be number or a letter) and to display them.

                                                                                solution

P14)Write a program to input a string (may be numbers' or a letters' with/out space) and to display them.Like, I am a student.or I am 13.

                                                                                solution
P15) Write a program to get sum of any three numbers.

                                                                                solution
P16)Write a program to get value of (a+b)n. Here 'n' can have any +ve value.

                                                                                solution

P17)Write a program to get value of  expression xy.
                                                                                                      solution

P18)Write a program to get area of circle using macro concept.(define constant).                                                                                                    
                                                                                        solution


click for more programs

Write a program to display following star pattern.

//Write a program to display following star pattern.
/*
              *
            **                                                                                                           
          ***
        ****
      *****
*/
#include <stdio.h>
#include<conio.h>
void main()
{
    int i,j,k;
    for(i=1;i<=5;i++)
    {
        int k;
        for(k=i;k<=5;k++)
        {
            printf(" ");
        }
        for(j=1;j<=i;j++)
        {
            printf("*");
        }
        printf("\n");
    }
    getch();
}

programs in "C" language

I have written many programs in "C" language. These are written to make your understanding level clear and sharp. Some where if you do not understand then you can leave a comment. I will explain that further.

click the link given below.
--------------------------------------------

 input and output related programs :  contains programs using gets(),scanf(), puts() getchar() ,putchar() with explanation.

if..else programs collection : contains programs using if, if ...else, if....elseif switch etc with explanation

loop related programs(loop,nested loop) : contains programs using for, while and do.. while loop

array related programs : contains program using one and multidimensional array.

array with string programs: contains programs related to string processing (with/out library)

Function related programs: contains programs using user defined function.

struct,typedef and union related program : contains programs using struct, union and typedef 

Pointer programs: Contains programs related to pointer, array as pointer,pointer as an array,pointer in function, call by value and call by reference

Data file handling relatedprogram: contains programs using file handling functions getc(),putc(),getw(),putw(),fscanf(),fprintf(),fread(),fwrite,ftell(),fseek(),rewind(),remove(),rename() etc

other programs:- It conatains programs on different subject matter.Like, escape sequence,random number generator etc.

Graphics related program: It contains programs written using graphics.h to handle all graphics. Graphics means working with colours and different shapes. Like Circle,triangle,straight line,background color,foreground colour,rectangle etc.other

Mouse related program: It contains programs where we can learn how to handle mouse.

some more topics related programs:It contains programs with different tricks and tips. 

c projects:- Here We have some projects developed in C language using codeblocks IDE.