/*WAP to Formatting strings with 't' tab */
#include<stdio.h>
#include<conio.h>
main( )
{
printf ( "You\tmust\tbe\tcrazy\nto\thate\tthis\tbook" ) ;
getch();
}
there is some good c ,java, sql and vb6 programs,Windows tricks, sms shorthand etc
#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();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int d=1,i,x,n,fact=1;
float s=0;
clrscr(); // clear screen.
printf("\nEnter value of x and n:");
scanf("%d%d",&x,&n);
for(i=1;i<=n*2-1;i++) // loop executes n+2 times
{
d=d*x; // find x,x^2,x^3...
fact=fact*i; // count factorial of i
if(i%2!=0)
s=s+(float)d/fact; //count sum only when i is odd
else
d=-d; // if even then d becomes -ve.
}
printf("The Sum of Series Is :%0.2f",s); // print result
getch();
}