C program for string address, C/C++ Programming

C Program for STRING ADDRESS

#include stdio.h>

#include conio.h>

#include string.h>

void main()

{

          char *name;

          int length;

          char *ch=name;

          clrscr();

          printf("ENTER THE STRING:  ");

          gets(name);

          while(*ch!='\0')

          {

                   printf("%c IS SORTED AT ADDRESS %u\n",*ch,ch);

                   ch++;

          }

          length=ch-name;

          printf("\nLENGTH OF THE STRING IS %d\n",length);

          getch();

}

OUTPUT :

ENTER THE STRING : KAMLESH

K  IS SORTED  AT ADDRESS 928

A  IS SORTED  AT ADDRESS 929

M IS SORTED  AT ADDRESS 930

L  IS SORTED  AT ADDRESS 931

E  IS SORTED  AT ADDRESS 932

S  IS SORTED  AT ADDRESS 933

H  IS SORTED AT ADDRESS 934

Posted Date: 9/10/2012 8:11:55 AM | Location : United States







Related Discussions:- C program for string address, Assignment Help, Ask Question on C program for string address, Get Answer, Expert's Help, C program for string address Discussions

Write discussion on C program for string address
Your posts are moderated
Related Questions
Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

I need Computer application/program. Project Description:                                                                I want a project done. It is a computer desktop appli

What is the difference among malloc/free and new/delete? A: Malloc/free do not know about destructors and constructors. New & delete create and destroy objects, whereas malloc &

#write a program that counts the number of occurances of the string in the n-th padovan string p(n)


Explain The Type Conversion in Expressions in c language? When variables and constants of different types are used in an expression they are all converted to same type. The com

find area uder the curve y=f(x) between x=a and x=b

how to create program in c that will system restart

You are going to write a function that computes the total interest charged on a credit card before it is paid off. List all the inputs the function will need.

write a program to calculate the cuboid