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

Assignment Help:

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


Related Discussions:- C program for string address

Define the char data type of c language, Define the Char Data Type of C Lan...

Define the Char Data Type of C Language? The char defines characters. The char type will usually require only 1 byte of internal storage. Every char type has an equivalent inte

Priority Queue, Ask question #Minimum 100 words acceptedEducational Objecti...

Ask question #Minimum 100 words acceptedEducational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms i

What is class definition, Class Definition The following is the general...

Class Definition The following is the general format of defining a class template: class tag_name                  {                    public  :               // Must

Class and object, write a class player that contain attributes for the play...

write a class player that contain attributes for the player,s name,average and team

Write code to implement constructor and assessors, Study the given class sp...

Study the given class specification and answer the questions that follow: class Person { private:   string name;   int yrBorn;   int yrDied;   public:   Per

What is difference between require_once () and require(), What is differenc...

What is difference between require_once (), require(), include()? require() includes and evaluates a specific file, if file isn't found then it shows a Fatal Error. require_

Queue, write a queue program in c langauge?

write a queue program in c langauge?

Structure of cpp program, Structure of C++ Program: Chronological orde...

Structure of C++ Program: Chronological order of C++ program. 1.   Class declaration 2.   Main function program 3.   Member functions definitions 4.   Include heade

Write a program read words from file, Write a program IdentyfyWordsMain.jav...

Write a program IdentyfyWordsMain.java reading a fi le (like HistoryOfProgramming) and divide the text into a sequence of words (word=sequence of letters). Save the result in a new

Super ASCII String Cost, A string S is said to be "Super ASCII", if it cont...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd