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
Write a C program to compute the value of a sine wave from 0 to 2P with an increment of 0.1 radians.   #include stdio.h #include math.h #define pi 3.1415927 void main() {   c

Can copy constructor admit an object of the same class as parameter, rather than reference of the object?

what is the syntax to get a coloured output.


Write a program to act as an electronic safe. If the correct code has been entered the program should display "Safe Open".  If an incorrect code is input it should display "Alarm"


Prepare an Application in C# or C++ Project Description: We are seeking someone who can write a program in C# or C++. The idea is to prepare the program using a Cross Plat

(a) client server or multithreaded client-server, where server will create pool of worker threads (say 5) to provide services to pool of clients (say 5 ).Server should be behaving

How to Create A Data File? A data file should be created before it can be processed. A stream-oriented data file is able to be created in two ways. One is to create the file st

By pressing ‘6’ (i.e. key’6’ one time) on the keypad, the mobile shows ‘m’ on display screen in write text message area .