/*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(); }
there is some good c ,java, sql and vb6 programs,Windows tricks, sms shorthand etc
#include<stdio.h> #include<conio.h> main( ) { char ch = 'A' ; putch ( ch ) ; putchar ( ch ) ; fputchar ( ch ) ; putch ( 'Z' ) ; putchar ( 'Z' ) ; fputchar ( 'Z' ) ; getch(); }
#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(); }
#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(); }
#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(); }
#include<stdio.h> #include<conio.h> main( ) { printf ( "You\tmust\tbe\tcrazy\nto\thate\tthis\tbook" ) ; getch(); }
#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(); }
#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(); }