Sunday, 24 November 2013

Print Integer in C

0
This c program first inputs an integer and then prints it. Input is done using scanf function and number is printed on screen using printf.

void main()
{
    char a[20];
    cout<<"Enter 1 word: ";
    cin>>a;
   
    MyString s(a);
    cout<<endl;
    cout<<"Direct Output: "<<endl;
    s.printString();
    cout<<endl;
    cout<<endl;
    cout<<"After UpperCase: "<<endl;
    s.UpperCase();
    s.printString();
    cout<<endl;
    cout<<endl;
    cout<<"After LowerCase: "<<endl;
    s.LowerCase();
    s.printString();
    cout<<endl;
    getch();
}

C Hello World Program

0

It is a basic program of C to print the message "HELLO WORLD" on the console of your computer. Every programmer start C programming by doing this program.


//C hello world example
#include <stdio.h>
int main()
{
  printf("Hello world\n");
  return 0;
}

Purpose of Hello world program may be to say hello to people or the users of your software or application.


© 2013 iPRESS. All rights resevered. Designed by Templateism