Delicious Digg Facebook Favorites More Stumbleupon Twitter

Tuesday, 9 October 2012

String functions programs

       Program for comparison between two strings :-        #include<stdio.h>        #include<string.h>        main()        {                    char a[100], b[100];   ...

string functions

               Strings are used in string handling operations such as, Counting the length of a string. Comparing two strings. Copying one string to another. Converting lower case string to upper case. Converting upper case string to lower case. Joining two strings. Reversing string. STRINGS STANDARD FUNCTION:-----------------------------------------------strlen():-determines...

Monday, 8 October 2012

string examples

#include<string.h> main() {      char arr1[9]={'w','e','l','','c','o','m','e'};      char arr2[9]="welcome";      char arr3[9]={{'w'},{'e'},{'l'},{''},{'c'},{'o'},{'m'},{'e'}};      clrscr();      pf("\narray1=%s",arr1);      pf("\narray2=%s",arr2);      pf("\narray3=%s",arr3); }   output...

strings in c-language

                                              STRINGS        String :- A string is a collection of characters. Strings are always enlosed in double quotes as "string_constant".   In...

check addresses are correct or not

    /* cosider 3 variables and find the addresses ,first two variables         addresses difference is equal to another two variables           addresses  difference. */ #include<stdio.h> main() { int x=10,y=20,z=30; clrscr(); printf("address of x=%d\n",&x); printf("value of x=%d\n",x); printf("address...

pointer examples

      1)   Meaning of following simple pointer declaration and definition:   int a=5; int * ptr; ptr=&a; Explanation: About variable a: 1. Name of variable: a 2. Value of variable which it keeps: 5 3. Address where it has...