Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Friday, October 8, 2010

WAP to using putch (),putchar (), fputchar (), putch (), fputchar ()


/*WAP to using putch (),putchar (), fputchar (), putch (), fputchar (),*/
#include<stdio.h>
#include<conio.h>
main( )
{
 char  ch = 'A' ;

 putch ( ch ) ; 
 putchar ( ch ) ;
 fputchar ( ch ) ;
 putch ( 'Z' ) ;
 putchar ( 'Z' ) ;
 fputchar ( 'Z' ) ;
       getch();
}

WAP of take user input for continue using getch( ), getche( ), getchar( ), fgetchar( )


/*WAP of take user input for continue using getch( ), getche( ), getchar( ), fgetchar( )*/
#include<stdio.h>
#include<conio.h>
main( )
{
 char  ch ;

 printf ( "\nPress any key to continue" ) ;
 getch( ) ;  /* will not echo the character */

 printf ( "\nType any character" ) ;
 ch = getche( ) ;  /* will echo the character typed */

 printf ( "\nType any character" ) ;
 getchar( ) ;  
/* will echo character, must be followed by enter key */ 
 printf ( "\nContinue Y/N" ) ;
 fgetchar( ) ;  
/* will echo character, must be followed by enter key */ 
       getch();
}

WAP to Formatting


/*WAP to Formatting*/
#include<stdio.h>
#include<conio.h>
main( )
{
 int  i = 10 ;
 char  ch = 'A' ;
 float  a = 3.14 ;
 char  str[20] ; 

 printf ( "\n%d %c %f", i, ch, a ) ;
 sprintf ( str, "%d %c %f", i, ch, a ) ;
 printf ( "\n%s", str ) ;
       getch();
}

WAP of Formatting2


/*WAP of Formatting2*/
#include<stdio.h>
#include<conio.h>
main( )
{
 char  ch = 'z' ;
 int  i = 125 ;
 float  a = 12.55 ;
 char  s[ ] = "hello there !" ;

 printf ( "\n%c %d %f", ch, ch, ch ) ;
 printf ( "\n%s %d %f", s, s, s ) ;
 printf ( "\n%c %d %f",i ,i, i ) ;
 printf ( "\n%f %d\n", a, a ) ;
       getch();
}

WAP to Formatting strings with 't' tab


/*WAP to Formatting strings with 't' tab */
#include<stdio.h>
#include<conio.h>
main( )
{
 printf ( "You\tmust\tbe\tcrazy\nto\thate\tthis\tbook" ) ;
       getch();
}

WAP to Formatting strings with printf( )


/*WAP to Formatting strings with printf( ) */
#include<stdio.h>
#include<conio.h>
main( )
{
 char  firstname1[ ] = "Sandy" ;
 char  surname1[ ] = "Malya" ;
 char  firstname2[ ] = "AjayKumar" ;
 char  surname2[ ] = "Gurubaxani" ;

 printf ( "\n%20s%20s", firstname1, surname1 ) ;
 printf ( "\n%20s%20s", firstname2, surname2 ) ;
       getch();
}

WAP to formatting integer


/*WAP to formatting integer*/
#include<stdio.h>
#include<conio.h>
main( )
{
 int  weight = 63 ;

 printf ( "\nweight is %d kg", weight ) ;
 printf ( "\nweight is %2d kg", weight ) ;
 printf ( "\nweight is %4d kg", weight ) ;
 printf ( "\nweight is %6d kg", weight ) ;
 printf ( "\nweight is %-6d kg", weight ) ;
       getch();
}

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share