-->

Facebook

Jasper Roberts - Blog

CPU Experiments

List of Experiments


c. Writea program to convert years intomonths and days. 
d. Write a program to solve Quadratic Equation.


PRACTICAL-SET—2

 4. The distance between two cities (In KM) is input through key board. Write a program to convert and print this distance in meters, feet, inches & centimeters.


PRACTICAL-SET-3

2.  Program to print Patterns.
*
*  *
*   *   *
*    *   *    *
click here
3. 12345
       2345
          345
            45
              5
       click here.




4.  Write a program to add two matrixes.



PRACTICAL-SET-5

5.   Write a program convert character into TOggLe character.



PRACTICAL-SET-6

3.   Write a function power that computes x raised to the power y for integer x and y and returns double type value.
5.   Write a program that used user defined function Swap ( ) and interchange the value   of two variable.
6.   Write a function prime that return 1 if it‘s argument is prime and return 0 otherwise.
7.   Write a calculator program(add,subtract,multiply,divide). Prepare user defined function for each functionality.




PRACTICAL-SET-7

          1.   Define a structure type, personal, that would contain person name, date of joining and salary.
          Using this structure, write a program to read this information for one person from the key                     board and print the same on the screen.
          2. Define a structure called cricket that will describe the following information:
           a.   Player name
            b.   Team name
             c.   Batting average
           3.   Write a function to enter rollno, marks of the three subject for 3 student and find total                        obtained by each student

PRACTICAL-SET-8

i.   Write a program using pointer to copy one string to another string.


PRACTICAL-SET-9

1.   Write a program that uses a table  of integers  whose size will be specified interactively at run time.
2.   Write a program to store a character string in block of memory space created by malloc and then modify the same to store a large string.




PRACTICAL-SET-10

1.   A program to illustrate reading files contents.
2.   A program to illustrate the use of fgets( ).
3.   A program to illustrate the use of fputc ( ) and fputs( ).


DOWNLOAD IN .DOCX FORMAT

DOWNLOAD IN .PDF FORMAT



9 comments:

  1. #include
    #include

    void main( )
    {
    int x,equation,na ,nb nc ;
    clrscr( );
    printf("\nenter the value of na");
    scanf("%d",na);
    printf( "\nenter the value of nb");
    scanf("%d",&nb);
    printf("\nenter the value of nc");
    scanf("%d",&nc);
    printf("enter the value of x");
    scanf("%d",&x);
    equation=na*x*x+nb*x+nc;
    printf("solution of equation=%d",equation);
    getch( );
    }

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. #include
    #include

    void main(){
    float km,m,feet,inch,cm;
    printf("Enter the distance between two cities(in km) - ");
    scanf("%f",&km);
    m = km*1000; //since 1km = 1000m
    feet= km*3280.84; //since 1km=3280.84feet
    inch=km*39370.1; //since 1 km=39370.1inches
    cm=km*100000; //since 1km = 100000cm
    printf("\nDistance in kilometres = %f ",km);
    printf("\nDistance in metres = %f ",m);
    printf("\nDistance in feet = %f ",feet);
    printf("\nDistance in inches = %f ",inch);
    printf("\nDistance in centimetres = %f ",cm);
    getch();
    }

    ReplyDelete
  5. Intro to Computer and Programming

    HOME
    LAB TASKS
    ASSIGNMENTS
    LET US C SOLUTIONS

    Monday, 17 October 2011
    Printing of Isosceles Triangle of Star
    //prints isosceles triangle of star//
    #include
    #include
    main()
    {
    int row, clm, space;
    for(row = 1; row <= 20; row+=2)
    {

    //printing spaces//
    for(space=18; space >= row; space-=2)
    {
    printf("%c",' ');
    }
    //printing stars//
    for(clm = 1; clm <=(row); clm++ )
    {
    printf("*");
    }
    printf("\n");
    }
    getche();
    return 0;
    }


    Posted by AbdulMuqsit Butt at 20:35 No comments:
    Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
    Printing Right Angel Triangel of Stars (Right angel at upper right corner)
    //prints triangle of star with right angle at upper right corner//
    #include
    #include
    main()
    {
    int row, clm,space;
    for(row = 1; row <= 10; row++)
    {
    //printing spaces//
    for(space=2; space <= row; space++)
    {
    printf("%c",' ');
    }

    //printing Stars//
    for(clm = 9; clm >=row; clm--)
    {
    printf("%c",'*');
    }
    printf("\n");
    }
    getche();
    return 0;
    }


    Posted by AbdulMuqsit Butt at 20:19 No comments:
    Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
    Printing Right Angel Triangel of Stars (Right angel at lower right corner)
    //prints triangle of star with right angle at lower right corner//
    #include
    #include
    main()
    {
    int row, clm, space;
    for(row = 1; row <= 10; row++)
    {
    //printing spaces//
    for(space=9; space >= row; space--)
    {
    printf("%c",' ');
    }
    //printing Stars//
    for(clm = 1; clm <=row; clm++)
    {
    printf("%c",'*');

    }

    //going to new line//
    printf("\n");
    }
    getche();
    return 0;
    }


    Posted by AbdulMuqsit Butt at 20:15 No comments:
    Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
    Home
    Subscribe to: Posts (Atom)
    Search This Blog

    Followers
    Blog Archive

    ▼ 2011 (3)
    ▼ October (3)
    ▼ Oct 17 (3)
    Printing of Isosceles Triangle of Star
    Printing Right Angel Triangel of Stars (Right ange...
    Printing Right Angel Triangel of Stars (Right ange...

    About Me

    AbdulMuqsit Butt

    View my complete profile

    Picture Window template. Template images by A330Pilot. Powered by Blogger.

    ReplyDelete
  6. Create your own PayPal.Me link and share it instantly with anyone: friends, customers, or partners. If you don't already have a PayPal account, signing up is fast and free. And you can start accepting money …
    https://sites.google.com/view/paypal-loginusa/home

    ReplyDelete