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
overload assignment opertor to assign the data of one object to anthor

Structures A structure is a derived data type. It is a combination of logically related data items. Unlike arrays, which are a collection of such as data types, structures can

Data is required to be fed into the program (input) and sent out of the program (output). Considering the draughtsman using a CAD station, the input is his commands to cause lines/

how to write code for z transformer

Discuss the saleint featuresand application of c

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Define Internal static storage class - computer programming? The Internal static variables are those that declared inside a function. The scope of the internal static variables

HOW THE C PROGRAM CODING IMPLEMENTED DY ITSELF UNDERSTANDING . ALSO HOW I CAN A BECOME A GOOD PROGRAMMER IN C WHAT I DO FOR GOOD PROGRAMMING ,TELL ME HOW C CODING DEVELOP DY ITSELF

write a program that calculates points along a rhodonea curve.... ? int fillArray( double data[ ], int nValues, double min, double max ); o Used to fill in the theta array. Return

Described the differences among a C++ struct & C++ class? A: The default member & base class access specifies are distinct. It is one of the commonly misunderstood aspects of C+