1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

beginner in c

Discussion in 'Meet and Greet' started by imported_divya, Sep 18, 2011.

  1. imported_divya

    imported_divya New Member

    Joined:
    Sep 18, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    pls help me...........i want some small examples in c programs simple one:):):party:
     
  2. gpk kishore

    gpk kishore New Member

    Joined:
    Jun 30, 2011
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    #include<stdio.h>
    #include<conio.h>
    int main()
    {
    printf("Welcome to CFanatic");
    return 0;
    getch();
    }
     
  3. gpk kishore

    gpk kishore New Member

    Joined:
    Jun 30, 2011
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    \*Arithmetic operations on two numbers*/
    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int a=7,b=5;
    clrscr();
    printf("%d \n",a+b);    \\output=12;
    printf("%d \n",a-b);    \\output=2;
    printf("%d \n",a*b);    \\output=35;
    printf("%d \n",a/ b);     \\output=1; (actually 7/5=1.4 but since we denoted it as integer
                                                             decimal part will be truncated);
    priintf("%d \n",a%b);     \\output=2
    getch();
    }
    these are the basic programs in c language
     
  4. zachry00

    zachry00 New Member

    Joined:
    Jul 20, 2011
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    want more basic than that?..
     

Share This Page