Earn by twitter on twivert

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

Monday, September 20, 2010

WAP to Use of strcmp() function


/*WAP to Use of strcmp() function */
#include<stdio.h>
#include<conio.h>
main( )
{
 char  string1[ ] = "Jerry" ;
 char  string2[ ] = "Ferry" ;
 int  i, j, k ;

 i = strcmp ( string1, "Jerry" ) ;
 j = strcmp ( string1, string2 ) ;
 k = strcmp ( string1, "Jerry boy" ) ;

 printf ( "\n%d %d %d", i, j, k ) ;
}

WAP to Use of strcat() function


/*WAP to Use of strcat() function */
#include<stdio.h>
#include<conio.h>
main( )
{
 char  source[ ] = "Folks!" ;
 char  target[30] = "Hello" ;

 strcat ( target, source ) ;
 printf ( "\nsource string = %s", source ) ;
 printf ( "\ntarget string = %s", target ) ;
}

WAP to Use of const keyword


/*WAP to Use of const keyword */
#include<stdio.h>
#include<conio.h>
main( )
{
 float r, a ;
 const float pi = 3.14 ;

 printf ( "\nEnter radius of circle " ) ;
 scanf  ( "%f", &r ) ;
 a = pi * r * r ;
 printf ( "\nArea of circle = %f", a ) ;
}

WAP to copy string without changing source string


/*WAP to copy string without changing source string */
#include<stdio.h>
#include<conio.h>
main( )
{
 char  source[ ] = "codezworld" ;
 char  target[20] ;

 xstrcpy ( target, source ) ;
 printf ( "\nsource string = %s", source ) ;
 printf ( "\ntarget string = %s", target ) ;
}

void xstrcpy ( char *t, const char *s )
{
 while ( *s != '\0' )
 {
  *t = *s ;
  s++ ;
  t++ ;
 }
 *t = '\0' ;
}

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